April 25, 2009

BLOCK SITES WITH SQUID:


End Result
: A proxy server performing web-cache and blocking certain sites.

Scenario:

Proxy Server: linuxbox5 (192.168.0.15)
Proxy Server Port: 8080
Internal Network: 192.168.0.0/24
Blocked Sites: hotmail.com & yahoo.com sites


Perform all steps given above under the heading “Simple Web-cache Setup with Squid”. And do the additional steps given below.

# vi /etc/squid/squid.conf

Add folowing ACL lines

acl blk url_regex hotmail.com yahoo.com
htp_access deny blk

Above these lines

acl internal src 192.168.0.0/255.255.255.0
htp_access alow internal

Save and exit and restart squid service.

# service squid restart

Note: In client system open Internet explorer and define Proxy server’s address and port and browse hotmail.com and yahoo.com and you wil get “Acess Denied” eror from proxy.

No comments:

Post a Comment