I don't think I'm missing anything obvious here, but I can't get .nft files from nftables.d/ruleset-pre
to be included. I'm trying to do some weird broadcast relaying for some janky hardware, and the only way I was able to get this working is adding the rule in its own table:
table ip relay4 {
chain input {
type filter hook input priority filter; policy accept;
iifname "br-lan.1" udp dport 9999 ip daddr 255.255.255.255 dup to 192.168.2.108
}
}
But I can't figure out how to preserve this between restarts because I can't figure out how to create tables using the nftables.d
directory. My understanding was that putting that definition in an .nft file in the ruleset-pre
directory would insert it before the inet fw4
table. I've also tried adding:
table ip relay4
flush table ip relay4
to the top of the file, but this also doesn't seem to work.
I'm suspicious the file isn't being processed at all though, since if I just type in gibberish I don't get any errors restarting the firewall service. And for what it's worth, ruleset-post
doesn't work either. I do have some rules successfully being included from files in the nftables.d
directory into the inet fw4
table, so at least that bit is working.
Edit: Sorry, should have added that I'm running 23.05-rc1