From: Antony Stone <Antony@Soft-Solutions.co.uk>
To: netfilter@lists.netfilter.org
Subject: Re: Dinamic (www list) IP BAN ...
Date: Thu, 22 Apr 2004 18:07:50 +0100 [thread overview]
Message-ID: <200404221807.50204.Antony@Soft-Solutions.co.uk> (raw)
In-Reply-To: <1331752368.20040422174719@lpgc.net>
On Thursday 22 April 2004 5:47 pm, Roque wrote:
> Hi all, i wonder if someone could help me with a little problem ...
> I need to ban a number of IP´s that are posted in a plain text file on
> a web site; the file changes every 30Min. The file is as simple as
>
> banned-ip1 #Reason1
> banned-ip2 #Reason
> ...
> The url can be reached in this way: http://www.url.com/ip/banned.txt
>
> I have read the iptables man pages and haven´t seen nothing similar.
> Is it really posible to do so?
I would suggest you set up a cron job which runs a shell script to fetch the
list (using wget or lynx etc), then add the current IPs to a user-defined
chain, then switch a rule in INPUT or FORWARD (you don't say which it is you
want to ban, possibly both) to that chain from the previous one which was in
place, then flush the old list ready for populating the next time around.
ie: you have two user-defined chains, one of which is in use, and the other of
which you are populating with the banned IPs, then you switch between them.
Don't try adn use just one list, or else you will either (a) have trouble
removing the old entries, or (b) have some period of time when there are no
IPs in the banned list (which presumably is undesirable).
Regards,
Antony.
--
Success is a lousy teacher. It seduces smart people into thinking they can't
lose.
- William H Gates III
Please reply to the list;
please don't CC me.
next prev parent reply other threads:[~2004-04-22 17:07 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-04-22 16:47 Dinamic (www list) IP BAN Roque
2004-04-22 17:00 ` Frank Gruellich
2004-04-22 17:07 ` Antony Stone [this message]
-- strict thread matches above, loose matches on Subject: below --
2004-04-22 17:16 cky
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200404221807.50204.Antony@Soft-Solutions.co.uk \
--to=antony@soft-solutions.co.uk \
--cc=netfilter@lists.netfilter.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox