Search

Howto Block websites using Squid Proxy in Ubuntu Linux PDF Print E-mail
User Rating: / 4
PoorBest 
Linux / Unix - Ubuntu
Wednesday, 17 February 2010 09:10

 


 

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 orkut.com, gmail.com, sex.com, yahoo.com and so on. Second define and Access Control List (ACL). Third and final step Restart Squid.

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


add domain names in the file ,

eg:
orkut.com
gmail.com
sex.com
yahoo.com

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/blocked.domains.acl"

Deny http access, enter

http_access deny blockeddomain

Close and save the file. Restart squid proxy server

# /etc/init.d/squid restart

 



Add this page to your favorite Social Bookmarking websites
 
 

Add comment


Security code
Refresh

We have 65 guests online