From: Florian Westphal <fw@strlen.de>
To: Ian Pilcher <arequipeno@gmail.com>
Cc: netfilter@vger.kernel.org
Subject: Re: nftables and IPv6 prefix delegation (regression vs ip6tables)
Date: Fri, 4 Nov 2022 00:12:45 +0100 [thread overview]
Message-ID: <20221103231245.GD29268@breakpoint.cc> (raw)
In-Reply-To: <tk16fd$hd2$1@ciao.gmane.io>
Ian Pilcher <arequipeno@gmail.com> wrote:
> My plan to migrate from iptables to nftables seems to have hit a major
> snag. nftables seems to lack the ability to use prefix-independent
> masks when matching IPv6 addresses.
>
> For example, my ISP delegates a /56 prefix, which I can divide into as
> many as 256 separate /64 subnets. So a routable IPv6 address in my
> network can be broken down like this.
>
> pppp:pppp:pppp:ppNN:hhhh:hhhh:hhhh:hhhh
>
> Where the p's represent the delegated prefix, the N's represent an
> internal "network ID", and the h's represent the host address. The
> prefix is relatively stable, but it can change occasionally, so hard-
> coding it into firewall rules is not really an option.
>
> Assume that I want to match a particular host (pppp:pppp:pppp:ppc8::1)
> in a rule. With ip6tables, I can match this address with this
> expression:
>
> 0:0:0:c8::1/::ff:ffff:ffff:ffff:ffff
ip6tables-translate suggests:
nft add rule ip6 filter INPUT 'ip6 saddr & ::ff:ffff:ffff:ffff:ffff == ::c8:0:0:0:1'
next prev parent reply other threads:[~2022-11-03 23:12 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-03 19:57 nftables and IPv6 prefix delegation (regression vs ip6tables) Ian Pilcher
2022-11-03 23:12 ` Florian Westphal [this message]
2022-11-07 21:54 ` Ian Pilcher
2022-11-08 9:13 ` Pablo Neira Ayuso
2022-11-08 14:12 ` Ian Pilcher
2022-11-08 19:03 ` Gordon Fisher
2022-11-09 14:19 ` Ian Pilcher
2022-11-09 14:33 ` Jeremy Sowden
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=20221103231245.GD29268@breakpoint.cc \
--to=fw@strlen.de \
--cc=arequipeno@gmail.com \
--cc=netfilter@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 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.