Squid IP BLOCKING
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. |
If you use iptables try:
iptables -A INPUT -s IP_OF_BAD_MACHINE -j DROP |
Quote:
this should be the syntax: acl banned_ips src 192.168.42.1-192.168.42.11/255.255.255.0 http_access deny banned_ips u can also try tcpwrappers - /etc/hosts.allow, /etc/hosts.deny hth. |
how to block any site using squid as well as iptables
hi friends i want to block suppose yahoo.com then how can i block this site in squid as well as in iptables becasue suppose i don't user squid proxy i directly user gateway so now i wanto block sites from gateway so as many people are using internet through gateway will not be able to visit site.
|
Quote:
### 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 |
All times are GMT -5. The time now is 10:51 AM. |