LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   How to exclude certain ip from proxy restriction rule (https://www.linuxquestions.org/questions/linux-server-73/how-to-exclude-certain-ip-from-proxy-restriction-rule-710287/)

uwa45 03-09-2009 12:32 PM

How to exclude certain ip from proxy restriction rule
 
Hi all,
i have install cent os as my internet gateway router and i also install squid in transperant mode so as to enforce my proxy restriction rules so all clints must go through squid to the internet weather their browser is set to the squid ip or not.
Now my issue is this. i have two other server with static ips that i don't want the restriction rules to affect so how do i do it as i would still want them to go through the squid but i don't want them to be affected by my restriction rules.

all other systems gets ip from the router which is also a dhcp server and the restriction rules are to deny certain websites.

Thanks.

anomie 03-09-2009 04:43 PM

Set up a second ACL to explicitly allow access to the two servers. Documentation here: http://www.visolve.com/squid/squid26...ntrols.php#acl

uwa45 03-11-2009 06:24 AM

hello,thanks for your reply. i tried the option in the link you sent but i got this error mesg. aclparse ipdata: warning:Netmask masks away paart of the specified ip in 10.234.0.2-10.234.0.3/255.255.255.0
Also the rule still apllies to the servers i want excluded from my rules. what do i do next?
Thanks.

maxut 03-11-2009 06:47 AM

squid checks the rules from begging to end, and it applies first rule that matches, doesnt check other rules.
so your excluded rules for servers, must be defined before the restriction rules.

for example:
.......
acl server1 src 10.234.0.2
acl server2 src 10.234.0.3
http_acces allow server1
http_acces allow server2

other access/deny rules..

best regards

uwa45 03-25-2009 03:39 AM

Hey, thanks alot Maxut. you helped me get it working.

anomie 03-25-2009 10:39 AM

Quote:

Originally Posted by uwa45
warning:Netmask masks away paart of the specified ip in 10.234.0.2-10.234.0.3/255.255.255.0

As for that specific warning, squid is telling you exactly what is wrong with your ACL. You're telling him to add 10.234.0.2 and 10.234.0.3 to the ACL, but then you're also telling him to add 10.234.0.0/24 to the ACL. Doesn't make sense, because the latter encompasses the former plus many more IPs.


All times are GMT -5. The time now is 08:14 PM.