From: Florian Westphal <fw@strlen.de>
To: Daniel <tech@tootai.net>
Cc: Netfilter list <netfilter@vger.kernel.org>
Subject: Re: Nftables 2 WAN
Date: Sun, 16 Aug 2020 23:54:01 +0200 [thread overview]
Message-ID: <20200816215401.GK1660@breakpoint.cc> (raw)
In-Reply-To: <044c6480-b7d0-a60a-211c-ff80e5affe98@tootai.net>
Daniel <tech@tootai.net> wrote:
>
> Le 16/08/2020 à 23:27, Florian Westphal a écrit :
> > Daniel <tech@tootai.net> wrote:
> > > Le 16/08/2020 à 20:40, Pablo Neira Ayuso a écrit :
> > > > On Fri, Aug 14, 2020 at 11:26:31PM +0200, Daniel wrote:
> > > > [...]
> > > > > UPDATE: I discover that the traffic I see on interface gretunnel is only the
> > > > > local generated one which is going out with the eth0 ipv6 address. I modify
> > > > > mangle table which now looks like
> > > > >
> > > > > # nft table mangle ip6
> > > > > #
> > > > > $fwtables delete table ip6 mangle 2>/dev/null || true
> > > > > $fwtables add table ip6 mangle 2>/dev/null || true
> > > > > $fwtables add chain ip6 mangle output "{ type nat hook output priority -199
> > > > > ; policy accept ; }"
> > > > Why chain type 'nat' ? Probably you meant to specify here 'mangle'.
> > > > NAT chains only see the first packet of flows.
> > > Because mangle is not accepted.
> > :-)
> >
> > Its 'route'. You need this for output in case you want to re-route the
> > packet if e.g. skb->mark has been altered.
> >
> > Default 'filter' won't do that.
>
> Like this ?
>
> $fwtables add chain ip6 mangle output "{ type route hook output priority
> -199 ; policy accept ; }"
>
> No changes.
Then you have another problem. Make sure that
ip route get $daddr and/or ip route get $daddr mark $MARK
give the expected results, then make sure the ip6 output chain that
serves as 'route' logic marks those packets correctly.
prev parent reply other threads:[~2020-08-16 21:54 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-14 16:27 Nftables 2 WAN Daniel
2020-08-14 21:26 ` Daniel
2020-08-16 18:40 ` Pablo Neira Ayuso
2020-08-16 21:24 ` Daniel
[not found] ` <20200816212759.GJ1660@breakpoint.cc>
2020-08-16 21:39 ` Daniel
2020-08-16 21:54 ` Florian Westphal [this message]
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=20200816215401.GK1660@breakpoint.cc \
--to=fw@strlen.de \
--cc=netfilter@vger.kernel.org \
--cc=tech@tootai.net \
/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