Visit the LQ Articles and Editorials section
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 07-04-2003, 11:39 AM   #1
LQ Newbie
Registered: Jun 2003
Location: Pakistan
Distribution: Redhat Linux
Posts: 4

Rep: Reputation: 0
Exclamation Squid IP BLOCKING

Hi, I want to block some of my users to access the net i have added a acl in linux squid:
acl ban
http_access deny !ban
but this does not work.
Help Me.
Old 07-04-2003, 02:02 PM   #2
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 65
If you use iptables try:
Old 07-04-2003, 02:19 PM   #3
Senior Member
Registered: Sep 2002
Location: Philippines
Distribution: Slackware, RHEL&variants, AIX, SuSE
Posts: 1,127

Rep: Reputation: 49
Originally posted by david_ross
If you use iptables try:
why would u do that? he only asks for squid access control. your suggestion will drop all connections (incoming and active) from IP_OF_BAD_MACHINE (not just squid).

this should be the syntax:

acl banned_ips src

http_access deny banned_ips

u can also try tcpwrappers - /etc/hosts.allow, /etc/hosts.deny


Last edited by born4linux; 07-06-2003 at 08:17 PM.
Old 06-13-2007, 06:43 AM   #4
LQ Newbie
Registered: Aug 2006
Posts: 11

Rep: Reputation: 0
Talking how to block any site using squid as well as iptables

hi friends i want to block suppose then how can i block this site in squid as well as in iptables becasue suppose i don't user squid proxy i directly user gateway so now i wanto block sites from gateway so as many people are using internet through gateway will not be able to visit site.
Old 06-14-2007, 10:36 AM   #5
Peeyush Maurya
Registered: Apr 2004
Location: Delhi, India
Distribution: Red Hat , WhiteBox
Posts: 31

Rep: Reputation: 15
Originally Posted by secrets
Hi, I want to block some of my users to access the net i have added a acl in linux squid:
acl ban
http_access deny !ban
but this does not work.
Help Me.
Your ACL is incomplete

### src is source IP
acl ban src

### here we deny access to ban(with source IP If you use '!' it will deny all but 'ban'
http_access deny ban

## now lets make it complicated
## We want to allow and from but deny all other websites

# creating ACL for
acl LinuxIP src

# creating ACL for websites
acl LinuxSite url_regex -i
acl LinuxSite url_regex -i

# Building the List
http_access allow LinuxIP LinuxSite
http_access deny LinuxIP


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 for blocking yahoo and msn [inc squid.conf] chrisfirestar Linux - Security 10 03-03-2008 08:33 AM
SQUID - Blocking port 80 tekquest Linux - Software 2 08-27-2005 06:05 AM
Blocking squid through iptables jomy Linux - Networking 1 12-20-2004 09:24 AM
squid website blocking? belkens Linux - Networking 2 12-11-2004 07:34 AM
Squid is blocking me out of one particular website. danielw Linux - Software 0 07-02-2004 11:30 PM

All times are GMT -5. The time now is 03:12 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration