You are not logged in.
I would like to put IPv4 of Linux Containers behind NAT but still allow them to use IPv6 from ISP. Previously, I attempted to configure broute with ebtables like this
sudo ebtables -t broute -A BROUTING -i enp1s0 -p ! ipv6 -j DROP && sudo brctl addif lxdbr0 enp1s0
However, it outputs errors as below
ebtables: No chain/target/match by that name
Turns out that ebtables support is now dropped from ArchLinux and now I have no idea how to do the BROUTING on ArchLinux these days. Anyone know how to workaround this? Or perhaps there's already permanent solution? Thanks!
Offline
nftables has an equivalent: the bridge family.
Offline
nftables has an equivalent: the bridge family.
Wow thanks! Anyway, any recommended command for that case? I'm trying to digest the documentation as it has kinda different configuration structure
Offline
If I understand your ebtables command correctly, you want to enable bridge forwarding coming in from enp1s0 for IPv6 only:
% nft add table bridge filter
% nft add chain bridge filter forward '{type filter hook forward priority 0; }'
% nft add rule bridge filter forward iifname "enp1s0" meta nfproto != ipv6 drop
Offline
The iptables-nft package has also tools that take old style commands and apply them to nftables. Then you can dump the nftable rules to see the result.
Sometimes that works, but other times it uses some compatibility modules in the kernel, so I would suggest not to rely too much on these tools.
Last edited by progandy (2022-04-20 15:33:34)
| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |
Offline
If I understand your ebtables command correctly, you want to enable bridge forwarding coming in from enp1s0 for IPv6 only:
% nft add table bridge filter % nft add chain bridge filter forward '{type filter hook forward priority 0; }' % nft add rule bridge filter forward iifname "enp1s0" meta nfproto != ipv6 drop
I get this error
Error: meta nfproto is only useful in the inet family
add rule bridge filter forward iifname enp1s0 meta nfproto != ipv6 drop
^^^^^^^^^^^^
Wonder if I missed something
Offline
The iptables-nft package has also tools that take old style commands and apply them to nftables.
Which tool? Is it supports broute?
Offline
progandy wrote:The iptables-nft package has also tools that take old style commands and apply them to nftables.
Which tool? Is it supports broute?
ebtables-nft. And I just found a note in the manpage that broute tables are unsupported.
Last edited by progandy (2022-04-21 21:08:59)
| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |
Offline
Error: meta nfproto is only useful in the inet family add rule bridge filter forward iifname enp1s0 meta nfproto != ipv6 drop ^^^^^^^^^^^^
Wonder if I missed something
No - my mistake. I wrongly assumed that meta matches can be used in bridge tables.
This should work:
nft add rule bridge filter forward iifname "enp1s0" ether type != ip6 drop
Offline