From: Vitaly <vitaly_il@yahoo.com>
To: netfilter@lists.netfilter.org
Subject: Re: How to combine a few addresses?
Date: Tue, 11 Sep 2007 05:27:10 -0700 (PDT) [thread overview]
Message-ID: <554137.97540.qm@web60322.mail.yahoo.com> (raw)
In-Reply-To: <46E683A7.70604@rtij.nl>
--- Martijn Lievaart <m@rtij.nl> wrote:
> Vitaly wrote:
> > How I can combine a few addresses in one rule? For
> > example, I'd like to add two IPs 10.10.10.1 and
> > 10.10.10.2 to the same rule.
> >
> >
>
> Either use ipset (needs a patched kernel), or
> iprange (if the addresses
> are consecutive) or use a subchain, e.g:
>
> -A -s 10.10.10.1 -j CUSTOM
> -A -s 10.10.10.2 -j CUSTOM
> -N CUSTOM
> -A CUSTOM <rest of rule>
>
Thank you!
Subchains seem to be OK for my needs. But will
subchains work in case when I need to *exclude* some
IPs?
For example, can I add 10.10.10.2 to this rule using
subchain?
iptables -I INPUT -p tcp --dport 80 ! -s 10.10.10.1
-m state --state NEW -m recent --set
____________________________________________________________________________________
Pinpoint customers who are looking for what you sell.
http://searchmarketing.yahoo.com/
next prev parent reply other threads:[~2007-09-11 12:27 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-11 11:52 How to combine a few addresses? Vitaly
2007-09-11 12:01 ` Martijn Lievaart
2007-09-11 12:27 ` Vitaly [this message]
2007-09-11 17:50 ` Martijn Lievaart
2007-09-17 10:39 ` Kernel crash. Are ipt_recent and ipt_conntrack culprit? Vitaly
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=554137.97540.qm@web60322.mail.yahoo.com \
--to=vitaly_il@yahoo.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox