From: Mike Wright <xktnniuymlla@mailinator.com>
To: netfilter <netfilter@lists.netfilter.org>
Subject: Re: can this be written as one rule ?
Date: Sun, 01 Jul 2007 09:42:53 -0700 [thread overview]
Message-ID: <4687D98D.7070105@mailinator.com> (raw)
In-Reply-To: <4687C1D4.3090704@gatworks.com>
U. George wrote:
>> $IPTABLES -t nat -A PREROUTING -i $INET_IFACE -s 121.124.176.0/20 -j DROP
>> $IPTABLES -t nat -A PREROUTING -i $INET_IFACE -s 121.124.32.0/20 -j DROP
>> $IPTABLES -t nat -A PREROUTING -i $INET_IFACE -s 121.127.64.0/17 -j DROP
<snip />
>> And so on ?
>
You could use ipset:
http://ipset.netfilter.org
Once a set of type nethash has been created and populated its usage is
very simple. e.g. To test whether a source|destination address is in a
nethash set named BADNETS use:
iptables -A INPUT -m set --set BADNETS src|dst -j NETHANDLER
Not sure if this extension is in the kernel yet but it's relatively easy
to add by following the instructions at their website.
:m)
next prev parent reply other threads:[~2007-07-01 16:42 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-01 15:01 can this be written as one rule ? U. George
2007-07-01 15:04 ` Stephen Frost
2007-07-01 16:42 ` Mike Wright [this message]
2007-07-02 20:03 ` Clister
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=4687D98D.7070105@mailinator.com \
--to=xktnniuymlla@mailinator.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.