Home > linux > how to block websites with squid

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 :

nano /etc/squid/no_cache.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
Categories: linux
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: