From: Pascal Hambourg <pascal.mail@plouf.fr.eu.org>
To: netfilter@lists.netfilter.org
Subject: Re: multiport tolerance changes
Date: Wed, 26 Jul 2006 13:35:24 +0200 [thread overview]
Message-ID: <44C7537C.7070509@plouf.fr.eu.org> (raw)
In-Reply-To: <44C73691.1080302@regnard.org>
Hello,
Vincent Regnard a écrit :
>
> With iptables 1.2.7 I had some rules where I could write some multiport
> (port lists or ranges) both for source and destination ports, like this:
>
> /sbin/iptables -A fw2net_eth3 -p tcp -m multiport -s 82.67.103.87
> --sport 1024:65535 -d 0.0.0.0/0 --dports 80,8080,81,8000,1755 -j ACCEPT
>
> iptables was coping well with this and expanded the port matrix into
> appropriate single rules
What do you mean ? Could you give an example of such expansion ?
> But iptables 1.3.5 refuses to have multiport for both
> source and destination ports and objects:
>
> iptables v1.3.5: multiport can only have one option
Well, it seems that my old iptables 1.2.6a already had the same
limitation. I submitted your rule to it and got an error too.
> So I have to re-write my firewall rules.
How did you rewrite the above rule ?
If I reorder the options, so that the --sport parameter appears to
belong to the implicit "-m tcp" match created by "-p tcp", the rule is
accepted by my iptables 1.2.6a :
/sbin/iptables -A fw2net_eth3 -s 82.67.103.87 -d 0.0.0.0/0 \
-p tcp --sport 1024:65535 -m multiport --dports 80,8080,81,8000,1755 \
-j ACCEPT
As a general rule it seems to me that it is more logical and readable to
put the parameters of a match right behind the match.
PS: what's the use of "-d 0.0.0.0/0" ?
next prev parent reply other threads:[~2006-07-26 11:35 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-26 9:32 multiport tolerance changes Vincent Regnard
2006-07-26 11:35 ` Pascal Hambourg [this message]
2006-07-26 14:21 ` Vincent Regnard
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=44C7537C.7070509@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