LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices



Reply
 
Search this Thread
Old 11-04-2006, 12:00 AM   #1
sarmadys
Member
 
Registered: Nov 2001
Distribution: Solaris, Redhat AS, SUSE
Posts: 47

Rep: Reputation: 15
Squid, Limited Service


Hello,

I need to configure a squid which is intended to allow access to only 1 specific website. (this proxy is open to all internal network users and we are going to use it to access to a specific portal only).

Below config allows users to browse every website:

acl ourportal urlpath_regex www.ourportal.com
acl our_networks src 10.10.0.0/16
http_access allow ourportal
http_access allow our_networks

Now how can I limit access to just this specific website?

I appereciate your help.

Regards,
Mac
 
Old 11-04-2006, 04:46 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,415

Rep: Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968
just put "http_access deny all" on the end to block everything else. assuming "all" is already defined as 0.0.0.0/0 which it should be. also the two access lines you already have there are probably best as a single one, that could actually be what you're having a problem with. that says allow anyone to ourportal or our_networks to go anywere. if you combine them on one line it becomes a logical AND not an OR, i.e allow our_networks to go to ourportal, yeah?
 
Old 11-06-2006, 12:11 AM   #3
sarmadys
Member
 
Registered: Nov 2001
Distribution: Solaris, Redhat AS, SUSE
Posts: 47

Original Poster
Rep: Reputation: 15
There is already a "http_access deny all" at the end of those commands (I had not listed it).


acl ourportal urlpath_regex www.ourportal.com
acl our_networks src 10.10.0.0/16
http_access allow ourportal
http_access allow our_networks
http_access deny all

I tried to combine lines 3 & 4 into one line by "http_access allow ourportal our_networks" but it does not allow access to any website including my desired websites.

Any hints please?
 
Old 11-06-2006, 03:35 AM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,415

Rep: Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968
i think you're using the wrong regex, that matches against the entire url, try using dstdom_regex if you do want a regex, but it looks more like just using dstdomain would be more suitable as you aren't making any use fo the regex functionaltiy: http://www.visolve.com/squid/squid24...s_controls.php
 
Old 11-06-2006, 07:22 AM   #5
sarmadys
Member
 
Registered: Nov 2001
Distribution: Solaris, Redhat AS, SUSE
Posts: 47

Original Poster
Rep: Reputation: 15
Thank you very much. This fixed the problem.

acl ourportal dstdomain .ourportal.com
acl our_networks src 10.10.0.0/16

http_access allow our_networks ourportal
http_access deny all

Regards,
Mac
 
  


Reply

Tags
access control list, squid


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 as a service jason.rohde Linux - Networking 1 08-22-2005 12:36 PM
I can't "service squid start" , and chkconfig squid on not working Niceman2005 Linux - Software 0 11-10-2004 09:18 PM
Squid limited to 3 concurrent downloads lukebeales Linux - Software 0 06-14-2004 01:40 PM
Can't start Squid service. stan georgen Linux - Software 1 11-11-2003 03:25 PM
squid service fails to stop farhan Linux - Networking 1 03-09-2003 09:12 PM


All times are GMT -5. The time now is 06:48 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration