From: Frank Gruellich <frank@home.manuelm.org>
To: netfilter@lists.netfilter.org
Subject: Re: Dinamic (www list) IP BAN ...
Date: Thu, 22 Apr 2004 19:00:25 +0200 [thread overview]
Message-ID: <20040422170025.GE6219@home.manuelm.org> (raw)
In-Reply-To: <1331752368.20040422174719@lpgc.net>
Hello,
* Roque <roque@lpgc.net> 22. Apr 04:
> 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
WARNING: this is very, very bad! Don't insert rules automatic from an
untrusted source (anything outside of your net _is_ untrusted). Said
this...
> I have read the iptables man pages and haven´t seen nothing similar.
> Is it really posible to do so?
# iptables -N banned_ips 2>/dev/null
# iptables -F banned_ips
# wget --output-document=- http://www.url.com/ip/banned.txt |
> while read ip reason
> iptables -A banned_ips -d $ip -j REJECT
> done
Repeat this every 30min by cron. Insert the chain banned_ips whereever
you need it (likely in your FORWARD).
HTH,
regards, Frank.
--
Sigmentation fault
next prev parent reply other threads:[~2004-04-22 17:00 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 [this message]
2004-04-22 17:07 ` Antony Stone
-- 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=20040422170025.GE6219@home.manuelm.org \
--to=frank@home.manuelm.org \
--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