how to block websites with squid
Using squid, we can optimize the performance of the squid to block porn sites or sites which we want.
This time we will discuss how to block sites using no-cache option.
1. Add this command in your squid.conf :
acl block-sites dstdomain "/etc/squid/block.txt" no_cache deny block-sites
2. Then we create the file /etc/squid/block.txt :
3. Create a list of sites you want to block in the file block.txt
yahoo.com microsoft.com porn.com squid.com
4. After making changes such as in the example above, run :
squid -S -k reconfigure