LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 10-15-2008, 05:36 PM   #1
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
Can't get squidclamav redirecting with squid 2.6


I've been trying for some time to get squidclamav working properly with squid 2.6 in CentOS 5.2., but to no avail.

Squidclamav correctly scans the relevant files and tries to redirect to squid:
Quote:
Thu Oct 16 07:23:04 2008 [22965] LOG Redirecting URL to: /var/www/cgi-bin/clwarn.cgi?url=http://www.tech-pro.net/files/eicar.zip&source=192.168.1.100/-&user=-&virus=stream:+Eicar-Test-Signature+FOUND
The file /var/www/cgi-bin/clwarn.cgi exists
Quote:
ls -l /var/www/cgi-bin/clwarn.cgi
-rwxrwxrwx 1 root root 798 Feb 22 2008 /var/www/cgi-bin/clwarn.cgi
As far as I can tell I've added all the necessary settings to squid.conf (it's a little hard to tell because my basic squid.conf is more complex than inplied by teh install instructuctions)
Code:
SQUID 2.6 / 2.7 / 3.0 CONFIGURATION:
------------------------------------

As 2.6 has signifiant change in the configuration file regarding
redirector, to integrate squidclamav to your squid cache just edit
the squid.conf file and set the following:

on ACL definition you should have declared:

        acl localhost src 127.0.0.1/255.255.255.255
        acl to_localhost dst 127.0.0.0/8

on http_acces definition you should declared the follwing :

        http_access deny to_localhost
        http_access allow localhost
        url_rewrite_access deny localhost

and on the redirect section the following:

        url_rewrite_program /usr/local/bin/squidclamav
        url_rewrite_children 15

If you have huge access and enough memory set the url_rewrite_children to
upper value.
Squid is configured as a transparent proxy, and it is not an SELinux issue.

The end result is nothing happens - the file can be downloaded and no redirectin appears to happen. I've tried various entries for

redirect /var/www/cgi-bin/clwarn.cgi

in squidclamav.conf but to no avail.


Has anyone gotten this to work? I'm sure it's something really simple.
 
Old 11-12-2008, 07:08 PM   #2
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Original Poster
Rep: Reputation: 122Reputation: 122
Update and solution

The issue seems to be that in squid.conf, I had

Code:
        http_access allow my_network
        http_access deny to_localhost
        http_access allow localhost
        url_rewrite_access deny localhost
But what I should have had was

Code:
        http_access deny to_localhost
        http_access allow my_network
        http_access allow localhost
        url_rewrite_access deny localhost
Pretty silly really, but easy enough to do.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
squidclamav neelendhar Linux - Server 0 09-17-2007 02:37 AM
Squid: Redirecting oursite.net to oursite.com? neocookie Linux - Software 1 09-29-2006 06:23 AM
Squid not redirecting SquidGuard lesneely Linux - Networking 3 12-21-2005 05:35 AM
Squid redirecting weird problem mchanea Linux - Networking 0 01-29-2004 10:25 AM
Redirecting Half_Elf Linux - Networking 2 09-04-2002 10:51 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:07 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration