LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 02-20-2009, 03:42 PM   #1
darren_a
LQ Newbie
 
Registered: Feb 2009
Posts: 2

Rep: Reputation: 0
Talking 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
 
Old 02-20-2009, 11:31 PM   #2
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Nagpur, India
Distribution: Cent OS 5/6, Ubuntu Server 10.04
Posts: 4,629

Rep: Reputation: Disabled
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.
 
Old 02-23-2009, 07:24 AM   #3
darren_a
LQ Newbie
 
Registered: Feb 2009
Posts: 2

Original Poster
Rep: Reputation: 0
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
 
Old 02-23-2009, 11:15 PM   #4
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Nagpur, India
Distribution: Cent OS 5/6, Ubuntu Server 10.04
Posts: 4,629

Rep: Reputation: Disabled
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.
 
  


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 to block all the sites except 1 or 2 sites winxandlinx Linux - Networking 8 10-27-2010 02:53 AM
squid 2.6 not blocking sites even i entered ACL to block sites mohantorvalds Linux - Server 1 01-08-2009 04:17 AM
How To Block Sites Using Squid In Linux saha.sandipan Linux - Networking 3 11-04-2007 04:00 PM
Squid block sites linuxnirmal Linux - Security 5 11-15-2006 10:59 AM
how to block sites with squid.conf boakiba Linux - Networking 1 08-11-2003 05:45 AM


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