Quote:
Originally Posted by secrets
Hi, I want to block some of my users to access the net i have added a acl in linux squid:
acl ban 192.168.42.1-192.168.42.11
http_access deny !ban
but this does not work.
Help Me.
|
Your ACL is incomplete
### src is source IP
acl ban src 192.168.42.1
### here we deny access to ban(with source IP 192.168.42.1). If you use '!' it will deny all but 'ban'
http_access deny ban
## now lets make it complicated
## We want to allow linuxquestions.org and linux-faqs.com from 192.168.42.2 but deny all other websites
# creating ACL for 192.168.42.2
acl LinuxIP src 192.168.42.2
# creating ACL for websites
acl LinuxSite url_regex -i linuxquestions.org
acl LinuxSite url_regex -i linux-faqs.com
# Building the List
http_access allow LinuxIP LinuxSite
http_access deny LinuxIP