{"id":172,"date":"2005-01-05T16:48:08","date_gmt":"2005-01-05T21:48:08","guid":{"rendered":"http:\/\/192.168.33.66\/wp\/?p=172"},"modified":"2005-01-05T16:48:08","modified_gmt":"2005-01-05T21:48:08","slug":"use-squid-to-block-via-ip-address","status":"publish","type":"post","link":"http:\/\/www.wildow.com\/blog\/?p=172","title":{"rendered":"use squid to block via ip address"},"content":{"rendered":"<p>in squid.conf<\/p>\n<p>acl CONNECT method CONNECT<br \/>\nacl BLACKLIST url_regex -i &#8220;\/etc\/squid\/blacklist.txt&#8221;    #keyword url blocking<br \/>\nacl WHITELIST url_regex -i &#8220;\/etc\/squid\/whitelist.txt&#8221;   #keywork url allow<br \/>\n#added next line to test deny by ipaddress  scw<br \/>\n#acl BAD dst 66.115.136.0\/66.115.137.0   #example if you just want 1 ip<br \/>\n#acl BAD2 dst 221.0.0.0\/8<br \/>\nacl BAD dst &#8220;\/etc\/squid\/blackip.txt&#8221;<\/p>\n<p>see more for the rest of the rules&#8230;<br \/>\n<!--more--><\/p>\n<p># INSERT YOUR OWN RULE(S) HERE TO ALLOW ACCESS FROM YOUR CLIENTS<br \/>\n#<br \/>\n# And finally deny all other access to this proxy<br \/>\nhttp_access allow localhost<br \/>\nhttp_access allow allowed_hosts WHITELIST<br \/>\nhttp_access deny allowed_hosts BLACKLIST<br \/>\n# added this line to test denying by ip addresses   scw<br \/>\nhttp_access deny allowed_hosts BAD<br \/>\n#http_access deny allowed_hosts BAD2<br \/>\nhttp_access allow allowed_hosts<br \/>\nhttp_access deny all<\/p>\n","protected":false},"excerpt":{"rendered":"<p>in squid.conf acl CONNECT method CONNECT acl BLACKLIST url_regex -i &#8220;\/etc\/squid\/blacklist.txt&#8221; #keyword url blocking acl WHITELIST url_regex -i &#8220;\/etc\/squid\/whitelist.txt&#8221; #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 &#8230; <a class=\"more-link\" href=\"http:\/\/www.wildow.com\/blog\/?p=172\">Read More &raquo;<\/a><\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-172","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"http:\/\/www.wildow.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/172","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.wildow.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.wildow.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.wildow.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"http:\/\/www.wildow.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=172"}],"version-history":[{"count":0,"href":"http:\/\/www.wildow.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/172\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.wildow.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=172"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.wildow.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=172"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.wildow.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=172"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}