Fabian Bläse
157fa4eac5
Include nftables and appropriate modules. Translate ip- and ebtables rules to their nftables counterparts. Remove ip/ebtables and modules. This change intentionally tries to keep structural changes at a minimum to keep the rule translation comprehensible. kmod-nft-bridge is not required for fff-node, because it was merged into a single kernel module since Linux 4.17: [1]02c7b25e5f
[2]fbaf48387e
Fixes: #252 Signed-off-by: Fabian Bläse <fabian@blaese.de> Co-authored-by: Johannes Kimmel <fff@bareminimum.eu>
31 lines
1.0 KiB
Plaintext
31 lines
1.0 KiB
Plaintext
nft -f - <<__EOF
|
|
table bridge filter {
|
|
chain INPUT {
|
|
# No input from/to local node ip from batman
|
|
|
|
# -p IPv6 -i bat0 --logical-in br-client --ip6-src fdff::1 -j DROP
|
|
iifname "bat0" ether type ip6 ip6 saddr fdff::1 counter drop
|
|
# -p IPv6 -i bat0 --logical-in br-client --ip6-dst fdff::1 -j DROP
|
|
iifname "bat0" ether type ip6 ip6 daddr fdff::1 counter drop
|
|
}
|
|
|
|
chain FORWARD {
|
|
# Do not forward local node ip
|
|
|
|
# -p IPv6 --logical-out br-client -o bat0 --ip6-dst fdff::1 -j DROP
|
|
oifname "bat0" ether type ip6 ip6 daddr fdff::1 counter drop
|
|
# -p IPv6 --logical-out br-client -o bat0 --ip6-src fdff::1 -j DROP
|
|
oifname "bat0" ether type ip6 ip6 saddr fdff::1 counter drop
|
|
}
|
|
|
|
chain OUTPUT {
|
|
# Do not output local node ip to batman
|
|
|
|
# -p IPv6 --logical-out br-client -o bat0 --ip6-dst fdff::1 -j DROP
|
|
oifname "bat0" ether type ip6 ip6 daddr fdff::1 counter drop
|
|
# -p IPv6 --logical-out br-client -o bat0 --ip6-src fdff::1 -j DROP
|
|
oifname "bat0" ether type ip6 ip6 saddr fdff::1 counter drop
|
|
}
|
|
}
|
|
__EOF
|