LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-21-2012, 07:21 AM   #1
sandeepc04
Member
 
Registered: Jun 2012
Location: India
Posts: 66

Rep: Reputation: Disabled
Smile Regarding Squid ACL rules


Hi friends,

I am new user for this site and also for linux, I have installed squid on RHEL-5, and created one file for site blocking, this site blocking applying for all users, now i wanted to give permission to particular IP ex: 172.16.4.50 (facebook access permission) how to do?

MY SQUID.CONF ACL RULES:

acl business_hours time S M T W H F A 00:01-23:59
acl blocksite url_regex -i "/etc/squid/blocksite.txt"
acl freetime time S M T W H F A 09:00-18:00
http_access deny blocksite freetime
http_access allow blocksite


I have tried below things,

acl special_client src 172.16.4.50
acl facebook dstdomain .facebook.com
acl orkut dstdomain .orkut.com
http_access allow facebook special_client
http_access deny facebook
http_access deny orkut
http_access allow all


This is not working....

Please help me on this,

Thanks and Regards,
Sandeep CC
 
Old 06-21-2012, 01:06 PM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,204
Blog Entries: 1

Rep: Reputation: 2059Reputation: 2059Reputation: 2059Reputation: 2059Reputation: 2059Reputation: 2059Reputation: 2059Reputation: 2059Reputation: 2059Reputation: 2059Reputation: 2059
Hi,

How is it not working? Is it denying access to 172.16.4.50 for facebook or it allows everyone?
Anyway make sure facebook is not included in the blocksite.txt file and use:
Code:
http_access deny facebook !special_client
and remove "http_access deny facebook"

Regards
 
Old 06-22-2012, 08:16 AM   #3
sandeepc04
Member
 
Registered: Jun 2012
Location: India
Posts: 66

Original Poster
Rep: Reputation: Disabled
Thanks bathory,


your post got helpfull to me, But here one clarification, as you said i have did and it got worked out, my network is on DHCP so i cant give by IP, same thing i have tried with Host name by giving srcdomain <host_name> but its not working, If it is in dhcp then how to do same thing for host name?


Regards,
Sandeep CC
 
Old 06-22-2012, 03:57 PM   #4
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,204
Blog Entries: 1

Rep: Reputation: 2059Reputation: 2059Reputation: 2059Reputation: 2059Reputation: 2059Reputation: 2059Reputation: 2059Reputation: 2059Reputation: 2059Reputation: 2059Reputation: 2059
Quote:
my network is on DHCP so i cant give by IP, same thing i have tried with Host name by giving srcdomain <host_name> but its not working, If it is in dhcp then how to do same thing for host name?
How is not working?
If the host in question is on the same switch as the squid server you can use an acl based on the mac address of the client. Note that squid must be compiled with mac filtering support, that is not usually the case, because mac filtering does not work across different switches.
Or you (or the dhcpd server admin) can assign a static IP to the specific host based on its mac address.

Regards
 
1 members found this post helpful.
Old 06-25-2012, 11:06 PM   #5
sandeepc04
Member
 
Registered: Jun 2012
Location: India
Posts: 66

Original Poster
Rep: Reputation: Disabled
Thanks for your help...
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
squid acl amartlk Linux - Newbie 15 01-03-2011 04:41 AM
squid acl fernfrancis Linux - Newbie 1 10-21-2010 07:48 AM
squid cache proxy server acl rules guideline salimshahzad Linux - Server 1 02-08-2010 10:05 AM
SQUID: Can anyone help me out with the ACL's foubie Linux - Server 5 10-07-2009 08:55 AM
Squid acl help cgelectek Linux - Networking 3 11-10-2005 11:04 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:44 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration