View Single Post
  #2 (permalink)  
Old 10-07-2006, 07:16 PM
nixcraft's Avatar
nixcraft nixcraft is offline
Never say die
User
 
Join Date: Jan 2005
Location: BIOS
OS: RHEL
Scripting language: Bash and Python
Posts: 2,710
Thanks: 11
Thanked 245 Times in 184 Posts
Rep Power: 10
nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute
Default

You need to setup ACL as follows

Sample ACL
Code:
acl fullAccess src 10.120.1.51 10.120.1.52 10.120.1.100 
acl RestrictedAccess src 10.120.1.1 10.120.1.2 10.120.1.50
acl RestrictedAccessSites dstdomain "/etc/squid/restrictedsites.txt"
http_access allow localhost
http_access allow fullAccess
http_access allow RestrictedAccess RestrictedAccessSites
Sample file /etc/squid/restrictedsites.txt
Code:
.cyberciti.biz
.yahoo.co.in
.google.co.in
.google.com
IP address 10.120.1.1-50 will allow to access only above four url. It can match both cyberciti.biz and forum.cyberciti.biz domain. And ip address 10.120.1.51-100 will allowed to access anything.

Restart squid. You can also use IP range (10.120.1.1-10.120.1.50/24) or put ips in text file.

If you need furher help just reply back
__________________
Vivek Gite
Linux Evangelist
Be proud RHEL user, and let the world know about your enterprise choices! Join RedHat user group.
Always use CODE tags for posting system output and commands!
Do you run a Linux? Let's face it, you need help
Reply With Quote