Here are my nft rules:
table inet filter {
flowtable f {
hook ingress priority filter
devices = { lan0, lan1, lan2, lan3, wan }
flags offload
}
chain input {
type filter hook input priority filter; policy drop;
iifname "br-lan" accept comment "Allow local network to access the router"
iifname "wan" ct state { established, related } accept comment "Allow established traffic"
iifname "wan" icmp type { destination-unreachable, echo-request, time-exceeded } counter accept comment "Allow select ICMP"
iifname "wan" counter packets drop comment "Drop all other unsolicited traffic from wan"
iifname "lo" accept comment "Accept everything from loopback interface"
}
chain forward {
type filter hook forward priority filter; policy drop;
ip protocol { tcp, udp } flow add @f
iifname "br-lan" oifname "wan" accept comment "Allow trusted LAN to WAN"
iifname "wan" oifname "br-lan" ct state established,related accept comment "Allow established back to LANs"
}
}
table ip nat {
chain postrouting {
type nat hook postrouting priority srcnat; policy accept;
oifname "wan" masquerade
}
}
The offloading seems to work for the cable-based interfaces.
If I try to add wlan0
and wlan1
to that the service fails to start with following error:
systemd[1]: Reloaded nftables firewall.
systemd[1]: Reloading nftables firewall...
0iqi9cnxh7dy79sjqaldp26bcs4fnlcx-nftables-rules[11751]: /nix/store/0iqi9cnxh7dy79sjqaldp26bcs4fnlcx-nftables-rules:8:14-14: Error: Could not process rule: Operation not supported
0iqi9cnxh7dy79sjqaldp26bcs4fnlcx-nftables-rules[11751]: flowtable f {
0iqi9cnxh7dy79sjqaldp26bcs4fnlcx-nftables-rules[11751]: /nix/store/0iqi9cnxh7dy79sjqaldp26bcs4fnlcx-nftables-rules:25:30-44: Error: Could not process rule: No such file or directory
0iqi9cnxh7dy79sjqaldp26bcs4fnlcx-nftables-rules[11751]: ip protocol { tcp, udp } flow offload @f
0iqi9cnxh7dy79sjqaldp26bcs4fnlcx-nftables-rules[11751]:
wlan0
and wlan1
are managed by hostapd.