From: Pascal Hambourg <pascal.mail@plouf.fr.eu.org>
To: netfilter@lists.netfilter.org
Subject: Re: can i have boolean OR between multiple addresses in iptables expression?
Date: Sat, 10 Jun 2006 09:34:28 +0200 [thread overview]
Message-ID: <448A7604.6040701@plouf.fr.eu.org> (raw)
In-Reply-To: <01b501c68bc7$22461990$0419a8c0@fly>
Hello,
Pablo Sanchez a écrit :
>>
>>for example i would like to have a rule with -s !127.0.0.1 OR
>>!172.16.0.0/24
>
> I believe you can't. What I've done is simply create several rules with the
> predicate slightly different in each to accomplish an OR. If you'd like to
> make it obvious, you can create a new chain and place your different rules
> there.
I think that using a user defined chain is not only a matter of
obviousness, in some case the result may be different from using two
separate rules. For example :
iptables -A INPUT -s 127.0.0.1 -m limit -j ACCEPT
iptables -A INPUT -s 172.16.0.0/24 -m limit -j ACCEPT
and :
iptables -A INPUT -s 127.0.0.1 -j user_chain
iptables -A INPUT -s 172.16.0.0/24 -j user_chain
iptables -A user_chain -m limit -j ACCEPT
behave differently because, if I understand correctly, each 'limit'
match has its own counters and timers. Am I right ?
next prev parent reply other threads:[~2006-06-10 7:34 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-09 0:32 can i have boolean OR between multiple addresses in iptables expression? prosolutions
2006-06-09 13:18 ` can i have boolean OR between multiple addresses in iptablesexpression? Pablo Sanchez
2006-06-10 7:34 ` Pascal Hambourg [this message]
2006-06-10 10:56 ` can i have boolean OR between multiple addresses in iptables expression? Pablo Sanchez
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=448A7604.6040701@plouf.fr.eu.org \
--to=pascal.mail@plouf.fr.eu.org \
--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