October 12, 2024, 10:23:38 AM

News : LinuxSolved.com Linux Help Community Forum..


Author Topic: How to Restrict Web site from squid  (Read 5956 times)

Offline rockyr

  • New Member
  • Posts: 1
How to Restrict Web site from squid
« 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

Offline aktiwari4u

  • LST CareTaker
  • Crescent
  • *****
  • Posts: 161
    • http://aktiwari4u.tk/
Re: How to Restrict Web site from squid
« Reply #1 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

Offline Avin

  • Linux Learner
  • ***
  • Posts: 54
  • L!nuX
Re: How to Restrict Web site from squid
« Reply #2 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

Offline shivaprasad

  • Linux Noob !
  • *
  • Posts: 5
Re: How to Restrict Web site from squid
« Reply #3 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