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 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
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
0 comments:
Post a Comment