From: "Michal Kubeček" <mkubecek@suse.cz>
To: Mail List - Netfilter <netfilter@vger.kernel.org>
Cc: "Usuário do Sistema" <maiconlp@ig.com.br>
Subject: Re: iptables rule for more than one target
Date: Fri, 27 Jan 2012 09:08:31 +0100 [thread overview]
Message-ID: <1506397.Ja1Gdm6TYs@alaris> (raw)
In-Reply-To: <CAMTjHrzUgXbHviHAYmaBZyTzV-pwXJYpOR4puWxgQ1WCf2TDYQ@mail.gmail.com>
On Thursday 26 of January 2012 18:12EN, Usuário do Sistema wrote:
> /sbin/iptables -t mangle -I PREROUTING -s 10.10.10.10 -d !
> 192.100.100.8 10.254.253.1 172.16.0.1 -j MARK --set-mark 5
...
> I need add some "-d ! x y z ..."
You can do
iptables -t mangle -N mark5
for a in 192.100.100.8 10.254.253.1 172.16.0.1; do
iptables -t mangle -A mark5 -d $a -j RETURN
done
iptables -t mangle -A mark5 -j MARK --set-mark 5
iptables -t mangle -I PREROUTING -s 10.10.10.10 -j mark5
Or maybe it will suffice to first mark all packets from 10.10.10.10 with
mark 5 and then remark packets with those three destinations back to 0
(or anything else).
Michal Kubeèek
next prev parent reply other threads:[~2012-01-27 8:08 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-26 20:12 iptables rule for more than one target Usuário do Sistema
2012-01-26 22:23 ` Jan Engelhardt
2012-01-27 8:08 ` Michal Kubeček [this message]
2012-01-27 12:17 ` Usuário do Sistema
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=1506397.Ja1Gdm6TYs@alaris \
--to=mkubecek@suse.cz \
--cc=maiconlp@ig.com.br \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox