From: Davide Caratti <dcaratti@redhat.com>
To: Arturo Borrero Gonzalez <arturo.borrero.glez@gmail.com>
Cc: Pablo Neira Ayuso <pablo@netfilter.org>,
Patrick McHardy <kaber@trash.net>,
Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>,
Florian Westphal <fw@strlen.de>,
Netfilter Development Mailing list
<netfilter-devel@vger.kernel.org>,
coreteam@netfilter.org
Subject: Re: [PATCH nf-next 0/2] netfilter: autoload NAT support for non-builtin L4 protocols
Date: Fri, 07 Oct 2016 11:59:29 +0200 [thread overview]
Message-ID: <1475834369.3103.14.camel@redhat.com> (raw)
In-Reply-To: <CAOkSjBiQ0p+jP8tEq78Fighdhj34uoaLvTvn205ZsN8btmNJqg@mail.gmail.com>
On Fri, 2016-10-07 at 09:35 +0200, Arturo Borrero Gonzalez wrote:
> Since I can add the same rule in nftables, I wonder if the same problem
> happens:
>
> chain postrouting {
> type nat hook postrouting priority 0; policy accept;
> ip protocol sctp snat 10.0.0.1:61000
> }
>
hello Arturo,
thank you for looking at this. I just did a test following your suggestion:
# iptables -F -t nat
# rmmod nf_nat_proto_sctp
# nft add table nat
# nft add chain nat prerouting { type nat hook prerouting priority 1 \; }
# nft add chain nat postrouting { type nat hook postrouting priority 0 \; }
# nft add rule nat postrouting oif eth1 ip protocol sctp snat 10.0.0.1:61000
# IP 10.0.0.1.55836 > 10.0.0.2.2000: sctp
IP 10.0.0.2.2000 > 10.0.0.1.55836: sctp
IP 10.0.0.1.55836 > 10.0.0.2.2000: sctp
IP 10.0.0.2.2000 > 10.0.0.1.55836: sctp
IP 10.0.0.1.55836 > 10.0.0.2.2000: sctp
IP 10.0.0.2.2000 > 10.0.0.1.55836: sctp
IP 10.0.0.1.55836 > 10.0.0.2.2000: sctp
IP 10.0.0.2.2000 > 10.0.0.1.55836: sctp
IP 10.0.0.1.55836 > 10.0.0.2.2000: sctp
# modprobe nf_nat_proto_sctp
# IP 10.0.0.1.61000 > 10.0.0.2.2000: sctp
IP 10.0.0.2.2000 > 10.0.0.1.61000: sctp
IP 10.0.0.1.61000 > 10.0.0.2.2000: sctp
IP 10.0.0.2.2000 > 10.0.0.1.61000: sctp
IP 10.0.0.1.61000 > 10.0.0.2.2000: sctp
IP 10.0.0.2.2000 > 10.0.0.1.61000: sctp
IP 10.0.0.1.61000 > 10.0.0.2.2000: sctp
IP 10.0.0.2.2000 > 10.0.0.1.61000: sctp
IP 10.0.0.1.61000 > 10.0.0.2.2000: sctp
#
you are right, unless you manually modprobe nf_nat_proto_sctp.ko, you will
see wrong port translation also with nftables, and this patch does not fix
it. Then I will submit a v2 that also handles nftables.
regards,
--
davide
next prev parent reply other threads:[~2016-10-07 10:00 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-06 17:09 [PATCH nf-next 0/2] netfilter: autoload NAT support for non-builtin L4 protocols Davide Caratti
2016-10-06 17:09 ` [PATCH nf-next 1/2] netfilter: persistent aliases for l4 nat protocols Davide Caratti
2016-10-06 17:09 ` [PATCH nf-next 2/2] xt_nat: probe module for non-builtin L4 protocols Davide Caratti
2016-10-07 7:35 ` [PATCH nf-next 0/2] netfilter: autoload NAT support " Arturo Borrero Gonzalez
2016-10-07 9:59 ` Davide Caratti [this message]
2016-10-07 10:32 ` Arturo Borrero Gonzalez
2016-10-07 14:20 ` Florian Westphal
2016-10-17 17:58 ` Pablo Neira Ayuso
2016-10-18 9:12 ` Davide Caratti
2016-10-19 12:23 ` Pablo Neira Ayuso
2016-10-19 12:57 ` Florian Westphal
2016-10-19 15:56 ` 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=1475834369.3103.14.camel@redhat.com \
--to=dcaratti@redhat.com \
--cc=arturo.borrero.glez@gmail.com \
--cc=coreteam@netfilter.org \
--cc=fw@strlen.de \
--cc=kaber@trash.net \
--cc=kadlec@blackhole.kfki.hu \
--cc=netfilter-devel@vger.kernel.org \
--cc=pablo@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 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.