Agreed about nftables, however iptables syntax is still generally used and translated via iptables-nft (“translated” might not be the right word, it’s more complex than that). The device has iptables-nft and iptables-translate but the support is very limited, in fact too limited to be a functioning firewall (even router), which imo is what this device wants to become for basically anyone that invests in it. For example things like TCPMSS, MASQUERADE, SET, DNAT, SNAT are not even understood by iptables-nft. The kernel will need additional support for iptables-nft to function when applying those rules.
Kernel Issues:
Warning: Extension TCPMSS revision 0 not supported, missing kernel module?
Warning: Extension SET revision 0 not supported, missing kernel module?
Warning: Extension DNAT revision 0 not supported, missing kernel module?
Warning: Extension SNAT revision 0 not supported, missing kernel module?
Warning: Extension MASQUERADE revision 0 not supported, missing kernel module?
Those are just the ones I noticed so far…
So I think (but not sure if this is inclusive enough)…
Feature Kernel module/config
-------------- -----------------------------------------------
TCPMSS clamp | xt_TCPMSS / TCPMSS match
ipset sets | xt_set, ip_set, ip_set_hash_net
NAT (iptables) | xt_nat, xt_snat, xt_dnat, xt_masquerade, nf_nat
NAT helpers | nf_nat_ftp, nf_conntrack_ftp
Conntrack | nf_conntrack, xt_conntrack
nftables NAT | nft_nat
I have not tried to build a kernel yet, but maybe it is time for me to give it a try? Any guide out there to get started? How difficult is it?
If this is doable, is there a place to grab your most recent build file and then modify it, that way it is easy to stay in sync with your testing and validation work?