From: Jason Opperisano <opie@817west.com>
To: netfilter@lists.netfilter.org
Subject: Re: Blocking Netranges Based on IP-to-Country CSV
Date: Mon, 20 Sep 2004 10:09:12 -0400 [thread overview]
Message-ID: <1095689352.1898.30.camel@wolfpack.ljm.dom> (raw)
In-Reply-To: <200409201357.i8KDvZNg022820@outbound3.mail.tds.net>
On Mon, 2004-09-20 at 09:57, nutbrownhares@tds.net wrote:
> With all due respect, I initially asked a technical question: given a data file, how does one block ranges from that file. I didn't ask if people agreed or disagreed with why we want to do this. The "why" isn't relevant to the discussion. I'm also not interested in whether it is or is not 100% effective; I know it isn't. It will still eliminate 95% of the traffic I want to stop. So far I've seen a lot of political opinions. Does anyone have a technical answer?
>
true that.
FILE="/path/to/file"
for ADDR in `cat $FILE`; do
iptables -A mychain -s $ADDR -j DROP
done
the above assumes that $FILE contains a list of IP addresses or
IP/PREFIX values, one per line. it also assumes that "mychain" exists,
and that you want to block the addresses in $FILE by source. adjust as
needed for your exact situation.
-j
--
Jason Opperisano <opie@817west.com>
next prev parent reply other threads:[~2004-09-20 14:09 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-09-20 13:57 Blocking Netranges Based on IP-to-Country CSV nutbrownhares
2004-09-20 14:09 ` Jason Opperisano [this message]
2004-09-20 14:10 ` Alexis
-- strict thread matches above, loose matches on Subject: below --
2004-09-17 20:16 Hudson Delbert J Contr 61 CS/SCBN
2004-09-20 11:57 ` Nick Drage
2004-09-16 16:33 Hudson Delbert J Contr 61 CS/SCBN
2004-09-17 11:46 ` Nick Drage
2004-09-18 13:25 ` Pascal Vilarem
2004-09-19 11:09 ` Nick Drage
2004-09-19 14:59 ` Alexis
2004-09-19 9:09 ` Mohamed Eldesoky
2004-09-19 11:01 ` Nick Drage
2004-09-19 11:17 ` Mohamed Eldesoky
2004-09-19 11:45 ` George Alexandru Dragoi
2004-09-20 11:53 ` Nick Drage
2004-09-20 12:06 ` Thomas Lußnig
2004-09-20 12:26 ` Chris Brenton
2004-09-20 13:20 ` George Alexandru Dragoi
2004-09-20 12:16 ` Chris Brenton
2004-09-15 23:41 Gary & Mic McFall
2004-09-16 0:54 ` Frank Gruellich
2004-09-15 12:57 McFall, Gary
2004-09-16 14:16 ` Aleksandar Milivojevic
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=1095689352.1898.30.camel@wolfpack.ljm.dom \
--to=opie@817west.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.