Re: [squid-users] Creating a file of banned IP#s

From: Amos Jeffries <squid3_at_treenet.co.nz>
Date: Sat, 19 Jul 2008 06:06:19 +1200

-ronin- wrote:
> Much like the fullspeed.dat file, where you can list hosts/domains to which
> you want squid to allow undelayed access....
>
> # fullspeed.dat
>
> hostname.com
> anotherhost.com
> yetanotherhost.net
>
> .... and then in the squid.conf file, I would add a rule as follows:
>
> acl fullspeed dstdomain "/etc/squid/fullspeed.dat"
>
>
> Can I also create a file for single IP#s? I want to use them in an access
> rule, e.g.
>
> # bannedips.dat
> 123.4.5.66
> 234.1.2.34
> 189.2.1.45
> ....
> ....
>
> And then include a line in squid.conf:
>
> acl banned_clients "/etc/squid/bannedips.dat"
> http_access deny banned_clients
>
>
> Is this correct? Would this be the way to go about it?

Yes if you want to edit the list with any automatic tools.

I've found some bugs with the file reader recently, so I'd advise
against adding #comments to the file itself. Otherwise fine.

Just remember the acl _type_ in the final config ;-)

Amos

-- 
Please use Squid 2.7.STABLE3 or 3.0.STABLE8
Received on Fri Jul 18 2008 - 18:06:08 MDT

This archive was generated by hypermail 2.2.0 : Sat Jul 19 2008 - 12:00:03 MDT