There's more than one way to do things | |
PerlMonks |
Re: Advice for moving forward with modulesby zengargoyle (Deacon) |
on Feb 28, 2003 at 02:20 UTC ( [id://239322]=note: print w/replies, xml ) | Need Help?? |
my favorite way to block people has lot's of watcher daemons sending block requests to a database, and a blocker daemon that updates firewall-filters at the border. no muss, no fuss. (it's a current project, can't 'ya tell? =) Net::Netmask has everything you need for blocking whole ranges of ip's, but it might not be easy to serialize to/from a file. if i were you, i would have done something with one of the Cache::Cache modules:
the auto expire can come in quite handy. or if you can, a decent database, DBI and some SQL will let you easily access the blocked info from anywhere w/o worrying about locking and such, plus you can store the IP and Mask in the database as Integer values and then build a SELECT that will match ranges using SQL's math operators.
or since TMTOWTDI i'm pretty sure CPAN has something that will tie a hash to a file/db
In Section
Meditations
|
|