LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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 08-07-2007, 10:20 AM   #1
shifflav
LQ Newbie
 
Registered: Mar 2007
Location: Ohio
Distribution: SUSE 10
Posts: 6

Rep: Reputation: 0
In SQUID - Block all websites but a couple - but only apply to a particular IP range


I'm using SQUID and would like to block all websites except for a couple. I copied the code below from an old post that should do the trick. However, I want to take it a step further and only apply it to a certain IP range.

In other words:
Range: 192.168.0.x - .x - Access any websites
Range: 10.10.0.x - .x - Deny all websites, but two.

Sample SQUID Code:

acl whitelist dstdomain .google.com .mycompany.com
acl all src 0.0.0.0/0.0.0.0

http_access permit whitelist
http_access deny all
 
Old 08-07-2007, 10:54 AM   #2
linusali
LQ Newbie
 
Registered: Jul 2007
Location: Dubai
Distribution: Kubuntu - 9.04
Posts: 18

Rep: Reputation: 1
Hi,

Try this one

--------

acl allow_net src 192.168.0.1-192.168.0.254
acl deny_net src 10.10.0.1-10.10.0.254
acl all src 0.0.0.0/0.0.0.0

acl whitelist dstdomain .google.com .mycompany.com

http_access allow whitelist allow_net
http_access deny all

---------
Here we did not use the acl 'deny_net', because the last rule will filter out every thing, including the 'deny_net'

Hope this will help you.
 
  


Reply



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
How To Block Websites? Maybe /etc/hosts (.deny maybe) How? aaron4katie Linux - Security 7 01-08-2007 04:58 PM
block certain websites in konqueror rcrummett Linux - Networking 3 12-31-2006 04:29 AM
How to block specific Websites? alfredh SUSE / openSUSE 3 06-24-2006 05:17 AM
How to block Firefox to visit some websites? yumener Linux - Networking 1 03-11-2006 05:18 AM
how to block websites .. huno Linux - Software 5 04-22-2004 08:31 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 04:53 AM.

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