in squid.conf
acl CONNECT method CONNECT
acl BLACKLIST url_regex -i “/etc/squid/blacklist.txt” #keyword url blocking
acl WHITELIST url_regex -i “/etc/squid/whitelist.txt” #keywork url allow
#added next line to test deny by ipaddress scw
#acl BAD dst 66.115.136.0/66.115.137.0 #example if you just want 1 ip
#acl BAD2 dst 221.0.0.0/8
acl BAD dst “/etc/squid/blackip.txt”
see more for the rest of the rules…
# INSERT YOUR OWN RULE(S) HERE TO ALLOW ACCESS FROM YOUR CLIENTS
#
# And finally deny all other access to this proxy
http_access allow localhost
http_access allow allowed_hosts WHITELIST
http_access deny allowed_hosts BLACKLIST
# added this line to test denying by ip addresses scw
http_access deny allowed_hosts BAD
#http_access deny allowed_hosts BAD2
http_access allow allowed_hosts
http_access deny all