Wednesday, November 19, 2008

Howto Block websites using Squid Proxy in Ubuntu Linux

You can block websites using squid proxy with 3 easy steps. First you have to create a text file with blocked domain name list such as,,, and so on. Second define and Access Control List (ACL). Third and final step Restart Squid.

First, create a file called /etc/squid/ (any file name you can use)
# cd /etc/squid
# vi

add domain names in the file ,


Save and close the file.

Open /etc/squid/squid.conf file:

# vi /etc/squid/squid.conf

Create acl called blockeddomain

acl blockeddomain dstdomain "/etc/squid/"

Deny http access, enter

http_access deny blockeddomain

Close and save the file. Restart squid proxy server

# /etc/init.d/squid restart


bornfree said...

sure it can block of http sites... what about https sites?

Anonymous said...

Cool blog as for me. It would be great to read a bit more concerning that topic. The only thing it would also be great to see on this blog is a few pictures of some devices.
Alex Watcerson
Cell phone jammers

Tech support said...

in the file the format of the url should be like this