From: Piyush Pangtey <gokuvsvegita@gmail.com>
To: Arturo Borrero Gonzalez <arturo.borrero.glez@gmail.com>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: Regarding libxt_multiport translation in nft
Date: Wed, 9 Mar 2016 20:04:28 +0530 [thread overview]
Message-ID: <56E03474.1000408@gmail.com> (raw)
In-Reply-To: <CAOkSjBimhamOTLjrQghozFRdj=FvRMO=nkGG0ADui7fw5-7KQQ@mail.gmail.com>
On Wednesday 09 March 2016 03:36 PM, Arturo Borrero Gonzalez wrote:
> On 9 March 2016 at 08:05, FaTe <gokuvsvegita@gmail.com> wrote:
>> Hello Pablo,
>>
>> I would require some guidance regarding the libxt_multiport translation in nft.
>>
>> If the translation is over ip4 family :
>> $ iptables-translate -A INPUT -p tcp -m multiport --ports 3:4 -j ACCEPT
>> nft add rule ip filter INPUT ip protocol tcp dport { 3-4 } tcp sport { 3-4 } counter accept
>> ^^^^^^^^^^^
>> this causes problem.
>> Similarly for ipv6 :
>> $ ip6tables-translate -A input -p tcp -m multiport --dports 1024:2048,2049:3333 -j ACCEPT
>> nft add rule ip6 filter input meta l4proto tcp dport { 1024-2048,2049-3333 } counter accept
>> ^^^^^^^^^^^^
>> this is causing problem.
>>
>> both the strings "ip protocol" and "meta l4proto" is not introduced by libxt_multiport.
>> And in the absence of both , the command works.
>>
>> For example ,
>> $ nft add rule ip filter INPUT tcp dport { 3-4 } tcp sport { 3-4 } counter accept
>>
>> $ nft add rule ip6 filter input tcp dport { 1024-2048,2049-3333 } counter accept
>>
>> Any comment regarding this behaviour ?
>
> They are different statements, rules should be something like:
> * meta l4proto tcp tcp dport XX
> * ip protocol tcp tcp dport XX
>
> However, the two statements are redundants... the second implies the first.
Thanks Arturo !
It works.
next prev parent reply other threads:[~2016-03-09 14:34 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-07 21:21 [PATCHv3] extensions: libipt_icmp: Add translation to nft Laura Garcia Liebana
2016-03-08 10:53 ` Pablo Neira Ayuso
2016-03-09 6:58 ` [PATCH] libxt_multiport: " FaTe
2016-03-09 12:32 ` Pablo Neira Ayuso
2016-03-09 14:37 ` Piyush Pangtey
2016-03-09 14:39 ` [PATCH v2] " Piyush Pangtey
2016-03-09 17:30 ` Pablo Neira Ayuso
2016-03-10 12:50 ` [PATCH v3] " Piyush Pangtey
2016-03-10 18:31 ` Pablo Neira Ayuso
2016-03-09 7:05 ` Regarding libxt_multiport translation in nft FaTe
2016-03-09 10:06 ` Arturo Borrero Gonzalez
2016-03-09 14:34 ` Piyush Pangtey [this message]
2016-03-09 7:12 ` [PATCH] libip6t_hbh: Add translation to nft FaTe
2016-03-10 18:47 ` Pablo Neira Ayuso
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=56E03474.1000408@gmail.com \
--to=gokuvsvegita@gmail.com \
--cc=arturo.borrero.glez@gmail.com \
--cc=netfilter-devel@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;
as well as URLs for NNTP newsgroup(s).