Configure the squid proxy as Web Filter HARDWARE NETWORKING LINUX SOFTWAREIt Tech Technology

It Tech Technology

COMPUTER HARDWARE NETWORKING

Breaking

Home Top Ad

Post Top Ad

Thursday, January 28, 2016

Configure the squid proxy as Web Filter






Block specific web site:
For example, we can see how to block specific web sites like this facebook ,yahoo and orkut.

Step1:Create the file and add the site names

#vim /etc/squid/badsite.conf
###block site

Step2:Open squid configuration file and create new acl
#vim /etc/squid/squid.conf

acl Safe_ports port 591 # filemaker
acl Safe_ports port 777 # multiling http
acl CONNECT method CONNECT

##Add acl Badsites##
acl badsits dstdomain "/etc/squid/badsites.conf"

# Recommended minimum Access Permission configuration:
#
# Only allow cachemgr access from localhost
http_access allow manager localhost
http_access deny manager

##Deny access to badsites##
http_access deny badsites

Step3: Restart the service
#service squid restart
     you try to access the facebook ,google and orkut in your browser. you could see blocked page as below.





To block a particular web sites URL and Domain:
###Block URL ###
Step1:Open the squid.conf and add the URL name
#vim /etc/squid/squid.conf
###Block URL###
acl bad_url dstdomain www.facebook.com
http_access deny bad_url

Step2: Restart the service and try to access the URL
#service squid restart.
Open -Web browser – Enter the URL: http//www.facebook.com.
You could see the block messages.

###Block Domain Names####
Step1:Open the squid configuration file and add the domain names
#vim /etc/squid/squid.conf
###Block particular Domain###
acl bad-domain dstdomain .facebook .yahoo.com .orkut.com
http_access deny bad-domain

Step2: Restart the service and try to access the domain names
#service squid restart
Open -Web Browser -Enter Doamin Name: facebook.com , orkut.com, yahoo.com



Post Bottom Ad