From: "U.Mutlu" <for-gmane@mutluit.com>
To: netfilter@vger.kernel.org
Subject: [iptables] Effect of negating multiple source or dest IPs (-s or -d)
Date: Tue, 08 Nov 2011 16:56:59 +0100 [thread overview]
Message-ID: <j9bjgb$v1f$1@dough.gmane.org> (raw)
What's the effect of this rule on a multihomed box
(the IPs below are just some examples, not real):
iptables -A INPUT ! -d 1.2.3.4,2.3.4.5 -p all -j DROP
Will it drop all packets not destined to both these IPs?
Or will it drop all packets but for the first IP?
Ie. when negating a rule on multiple elements, is then
the result an AND or an OR combination?
Ie. is it then !ip1 AND !ip2, or is it !ip1 OR !ip2 ? :-)
Man page says this:
[!] -s, --source address[/mask][,...]
[!] -d, --destination address[/mask][,...]
A "!" argument before the address specification inverts the sense of the address. [...]
Multiple addresses can be specified, but this will expand to multiple rules (when adding with -A),
or will cause multiple rules to be deleted (with -D).
next reply other threads:[~2011-11-08 15:56 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-08 15:56 U.Mutlu [this message]
2011-11-08 16:16 ` [iptables] Effect of negating multiple source or dest IPs (-s or -d) sim
2011-11-08 16:19 ` U.Mutlu
2011-11-08 16:44 ` Jan Engelhardt
2011-11-08 17:11 ` U.Mutlu
2011-11-08 19:23 ` Jan Engelhardt
2011-11-08 20:22 ` Jozsef Kadlecsik
2011-11-08 21:59 ` U.Mutlu
2011-11-08 22:18 ` Amos Jeffries
2011-11-08 23:40 ` Jozsef Kadlecsik
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='j9bjgb$v1f$1@dough.gmane.org' \
--to=for-gmane@mutluit.com \
--cc=netfilter@vger.kernel.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.