LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   Squid - Error (http://www.linuxquestions.org/questions/linux-software-2/squid-error-694023/)

ajkannan83 12-31-2008 04:10 AM

Squid - Error
 
Dear Friends

I am using RHEL5 Edition With Squid proxy. I am using 4 windows machine (10.0.0.1 - 10.0.0.4). I want restrict hotmail, yahoo website in two mahcines (10.0.0.3, 10.0.0.4) how to restrict it.

I have configured squid. But it doesn't working properly.

----------------------------------------------------------
acl block_url url_regex -i "/etc/squid/block_url"
acl brow_ip1 src 10.0.0.1 10.0.0.2
acl brow_ip2 src 10.0.0.3 10.0.0.4

http_access allow brow_ip1 block_url
http_access allow brow_ip2
http_access deny block_url

------------------------------------------------------------

#vim "/etc/squid/block_url
http://www.hotmail.com
http://www.yahoo.com

How to solve this problem please help me.

Thank you
Kannan

ZAMO 12-31-2008 06:13 AM

Do you want to deny the block_url to which IP group?

Code:

http_access allow brow_ip1 block_url
http_access allow brow_ip2
http_access deny block_url

Suppose you want to allow brow_ip1 and deny brow_ip2, I will write the squid.conf like this.


Code:

http_access  block_url deny all
http_access  block_url  allow brow_ip1

All the best

ajkannan83 12-31-2008 10:43 PM

Sir,

Your answer is not working properly.

Please reply

n03x3c 01-01-2009 02:08 AM

http_access allow brow_ip1 block_url
http_access allow brow_ip2
http_access deny block_url

I think this should be getting conflict... You're both allowing and denying same acl...

ajkannan83 01-01-2009 05:01 AM

how to restrict?
Please help me

chitambira 02-24-2009 05:57 AM

This is what you gotta do:


acl block_url url_regex -i "/etc/squid/block_url"
acl brow_ip1 src 10.0.0.1-10.0.0.2/32
acl brow_ip2 src 10.0.0.3-10.0.0.4/32

http_access deny brow_ip2 block_url
http_access allow brow_ip1 brow_ip2
http_access deny all


All times are GMT -5. The time now is 10:48 PM.