LinuxQuestions.org
Visit Jeremy's Blog.
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 11-04-2007, 06:07 AM   #1
saha.sandipan
LQ Newbie
 
Registered: Nov 2007
Location: Kolkata
Posts: 2

Rep: Reputation: 0
Exclamation How To Block Sites Using Squid In Linux


How to block sites using SQUId. the conventional was like using regex.. failed.... Plz suggest.........
 
Old 11-04-2007, 06:42 AM   #2
vanstra
Member
 
Registered: Mar 2005
Distribution: Ubuntu 10.04 - CentOS 5.4
Posts: 40

Rep: Reputation: 15
Use http://www.dansguardian.org.
 
Old 11-04-2007, 09:45 AM   #3
edclancy7715
LQ Newbie
 
Registered: Nov 2007
Location: Murder mitten
Posts: 13

Rep: Reputation: 0
Quote:
Originally Posted by saha.sandipan View Post
How to block sites using SQUId. the conventional was like using regex.. failed.... Plz suggest.........
A really simple and extremely dynamic/flexible solution would be to go to www.opendns.com. Then sign up for a FREE dns account. Set it up on your gateway (will have to change it from automatically receiving DNS servers from ISP) and then log into their web configuration interface from their homepage. From there you can check your DNS Lookup statistics, disable certain hosts from being DNS resolved, it also can filter phish and spam! Then you could configure it remotely as well...
I think that method would be compatible with your squid.

Last edited by edclancy7715; 11-04-2007 at 09:47 AM.
 
Old 11-04-2007, 04:00 PM   #4
win32sux
LQ Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 380Reputation: 380Reputation: 380Reputation: 380
The methods suggested above would be okay for some people, but neither of them use Squid for the blocking - which is what has been asked. The simplest way to block sites with Squid is to use a dstdomain ACL. Lets say for example you want to block Slashdot.org, Freshmeat.net, and DistroWatch.com for clients on the 192.168.1.0/255.255.255.0 subnetwork:
Code:
acl my_subnetwork src 192.168.1.0/255.255.255.0
acl blocked_sites dstdomain .slashdot.org
acl blocked_sites dstdomain .freshmeat.net
acl blocked_sites dstdomain .distrowatch.com
http_access deny blocked_sites my_subnetwork

Last edited by win32sux; 11-04-2007 at 04:02 PM.
 
  


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
Squid to block all the sites except 1 or 2 sites winxandlinx Linux - Networking 8 10-27-2010 02:53 AM
How do I block web pages/sites? Is squid what I should use? RHLinuxGUY Linux - Networking 3 02-06-2010 12:07 PM
Squid block sites linuxnirmal Linux - Security 5 11-15-2006 10:59 AM
NAT Linux Router, How to filter Porn and Ad sites ?(no squid) phtkiller Linux - Networking 8 10-15-2003 12:04 PM
how to block sites with squid.conf boakiba Linux - Networking 1 08-11-2003 05:45 AM

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

All times are GMT -5. The time now is 03:37 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