Squid is a free, open source HTTP proxy used by systems administrators and ISPs to minimise bandwidth by caching common Web pages on their own servers. If Squid is installed, then all Web traffic first passes through the software, making it a powerful tool for administrators to block unwanted websites from being accessed on their networks.
- Skill level:
- Moderately Easy
Other People Are Reading
Open the "squid.conf" file in your text editor of choice. On a Linux machine, this file should be located in "/etc/squid/squid.conf." On a Windows machine, it will be located instead in "C:\squid\etc\squid.conf."
Paste the following code at the bottom of the squid.conf file and save it:
acl blocksites url_regex "/etc/squid/squid-block.acl"
http_access deny blocksites
If you are on a Windows machine, you should replace the Linux style path (/etc/squid/squid-block.acl) with a Windows style path (C:\squid\etc\squid-block.acl). This tells Squid to block all the websites listed in the "squid-block.acl" file in the Squid directory.
Open the "squid-block.acl" file in your text editor of choice. On a Linux machine, this should be located in "/etc/squid/squid-block.acl," while a Windows machine will have it in "C:\squid\etc\squid-block.acl." If the file does not exist, just save a new text file with that name.
Paste the URLs of any websites you wish you block. You can also paste terms to search for in the names of the URLs. For example, to block pornographic websites, a good start may be:
This will block any URLs which contain, anywhere within them, the words "sex," "porn" or "xxx."
Tips and warnings
- Overzealous blocking of URLs by keyword can lead to sites being unintentionally blocked. For example, blocking the word "sex" will also block, among many other sites, the University of Sussex (www.sussex.ac.uk), since it contains the word "sex" within its URL.
- 20 of the funniest online reviews ever
- 14 Biggest lies people tell in online dating sites
- Hilarious things Google thinks you're trying to search for