Review your favorite Linux distribution.
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, 12:39 PM   #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, 03:02 PM   #2
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 67
If you use iptables try:
Old 07-04-2003, 03: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 09:17 PM.
Old 06-13-2007, 07: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, 11: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 09:33 AM
SQUID - Blocking port 80 tekquest Linux - Software 2 08-27-2005 07:05 AM
Blocking squid through iptables jomy Linux - Networking 1 12-20-2004 10:24 AM
squid website blocking? belkens Linux - Networking 2 12-11-2004 08:34 AM
Squid is blocking me out of one particular website. danielw Linux - Software 0 07-03-2004 12:30 AM > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 05:22 AM.

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
Open Source Consulting | Domain Registration