Block Blacklisted Domain in Squid

Posted by Planet Malaysia on August 8, 2006

advertisement

Squid can unconditionally block all outbound requests to certain domains. Privoxy is preferred for this, as privoxy will replace images with images, and squid will put in a dummy html page instead (which just means your pages will have broken images, no big deal). Other than that it will work just fine.

How do you block “Blacklisted Domain in Squid?” I used blacklist.current.domains file from sterns.org

Download sa-blacklist.current.domains to /etc/squid/

edit sa-blacklist.current.domains for adding more domain as you need to block

Edit squid.conf, adding the line: acl spammers url_regex “/etc/squid/sa-blacklist.current.domains” & http_access deny all spammers (above your http_access lines (order does matter here)).

Restart Squid

Gongratulation! You’re done.

Possibly Related Posts:


Comments

2 Responses to “Block Blacklisted Domain in Squid”

  1. Rodrigo Rocha on April 2nd, 2007 11:31 pm

    Hi,

    I’m trying to use your file in my squid box but when I get ‘segmentation falt’. Do you have any idea ? Squid have any limitation about files ?

  2. ehcache.net on March 9th, 2011 10:52 am

    Block Blacklisted Domain in Squid…

    Squid can unconditionally block all outbound requests to certain domains. Privoxy is preferred for this, as privoxy will replace images with images, and squid will put in a dummy html page instead (which just means your pages will have broken images, n…

Leave a Reply




Planet Malaysia

  • Follow us on Twitter


  • web www.planetmy.com