Linux Forums - Linux Help,Advice & support community:LinuxSolved.com

Network Troublshooting => Linux Servers Support => Topic started by: rockyr on November 21, 2009, 06:06:26 AM

Title: How to Restrict Web site from squid
Post by: rockyr on November 21, 2009, 06:06:26 AM
Hi,
I am using squid proxy and i want to restrict some web site to users.
Please tell me how it is possible?


Thanks,
Rocky R
Title: Re: How to Restrict Web site from squid
Post by: aktiwari4u on November 22, 2009, 05:28:58 AM
using acl you may restrict the perticular websit
first you need to create a acl group and that put that in the deny list . refer to how to section for detail
Title: Re: How to Restrict Web site from squid
Post by: Avin on December 07, 2009, 07:13:58 AM
Hi

Create one ACL before http_access deny all
 
acl employee src  "/etc/squid/employeeip"
acl employeeallowedsite dstdomain "/etc/squid/employeeallowedsite"
acl employeedeniedsite dstdomain  "/etc/squid/employeedeniedsite"
http_access deny employee employeedeniedsite
http_access allow employee employeeallowedsite


Now you have to make three text file using your favorite text editor (like vim, nano or gedit)
1) /etc/squid/employeeip   - List of your Employee IP (each line one IP)
    or You can use apply for all.

2) /etc/squid/employeeallowedsite - List of allowed site for employee

3) /etc/squid/employeedeniedsite - List of restricted /denied site for employee

and Restart Squid Server

Thanks,
Avin Tokade
Title: Re: How to Restrict Web site from squid
Post by: shivaprasad on January 09, 2010, 11:43:21 AM
 by using acl (access control list) we can restrict websites @ particular ip addresses &hosts


acl employee src  "/etc/squid/employeeip"
acl employeeallowedsite dstdomain "/etc/squid/employeeallowedsite"
acl employeedeniedsite dstdomain  "/etc/squid/employeedeniedsite"
http_access deny employee employeedeniedsite
http_access allow employee employeeallowedsite