LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Setup Squid Block All sites but xyz.com and 12.123.23.1 (https://www.linuxquestions.org/questions/linux-newbie-8/setup-squid-block-all-sites-but-xyz-com-and-12-123-23-1-a-706289/)

darren_a 02-20-2009 03:42 PM

Setup Squid Block All sites but xyz.com and 12.123.23.1
 
I am trying to setup a Squid Proxy server, I have looked through the forums and found some on how to block a site or two, but I need basically to setup ours to only allow one or two sites, how is this done? it will need to be by IP address to allow range of computers on network....10.214.25.XXX thru 10.214.28.XXX not to be allowed to go to any websites but XYZ.com and a IP address of XXX.XXX.XXX.XXX, how is this written in the conf file????

Thanks for all your help in advance,

Darren

linuxlover.chaitanya 02-20-2009 11:31 PM

You will need to create access control lists for each of them.
The best way is to allow access to those you want to and then deny access to all the others. So by default they will be denies access.

Like if you have a list of ips that you want to allow and deny others

acl allowed_stations src 10.214.25.10-10.214.25.100

In http_access area you will need this:

http_access allow allowed_stations
http_access deny all.

This will by default restrict the access to only above mentioned stations.

darren_a 02-23-2009 07:24 AM

Thank you for the reply but that is not exactly what I need.

Restricting all IP's works, but I need to restrict all ip's to all sites with the exception of 2 websites for corporate webmail/email etc. How would you control this, without blocking all sites or listing all sites on the web as being blocked. I basically need to restrict all sites and have a small acl listing acceptable sites?

Darren

linuxlover.chaitanya 02-23-2009 11:15 PM

So create another acl like

acl allowed_sites srcdom xyz.com abc.org

In http_access area

http_access allowed_stations allowed_sites
http_access deny all

Now by default only those two sites would be allowed and none other.


All times are GMT -5. The time now is 07:09 AM.