How to exclude certain ip from proxy restriction rule
Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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.
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..
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.