I'm trying to upgrade my router from 21.02.2. I'm not using the OpenWRT firewall but a script generated by fwbuilder that has thrived since I converted from FreeBSD to OpenWRT.Backfire in 2011.
The script uses the conntrack module. I tried to convince several ways to add rules to NFT without writing them in NFT (fwbuilder has been more or less unmaintained for years now, so I can't expect a new version supporting NFT directly any day now ).
iptables-nft fails because of a missing /usr/lib/iptables/libxt_conntrack.so
:
statx(AT_FDCWD, "/usr/lib/iptables/libipt_conntrack.so", AT_STATX_SYNC_AS_STAT, STATX_BASIC_STATS, 0x7fcd1300) = -1 ENOENT (No such file or directory)
statx(AT_FDCWD, "/usr/lib/iptables/libxt_conntrack.so", AT_STATX_SYNC_AS_STAT, STATX_BASIC_STATS, 0x7fcd1300) = -1 ENOENT (No such file or directory)
writev(2, [{iov_base="iptables v1.8.8 (nf_tables): ", iov_len=29}, {iov_base=NULL, iov_len=0}], 2iptables v1.8.8 (nf_tables): ) = 29
writev(2, [{iov_base="Couldn't load match `conntrack':"..., iov_len=58}, {iov_base=NULL, iov_len=0}], 2Couldn't load match `conntrack':No such file or directory
) = 58
I tried to use iptables-translate but the result does not work, either:
root@splat:~# iptables-translate -w -A INPUT -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT
nft add rule ip filter INPUT ct state related,established counter accept
root@splat:~# nft add rule ip filter INPUT ct state related,established counter accept
Error: Could not process rule: No such file or directory
add rule ip filter INPUT ct state related,established counter accept
^^^^^^
root@splat:~# nft list ruleset
I haven't used NFT directly yet, and I'd like to avoid that. So a fix to the problem of the missing module would be very welcome. I've searched the packages for 23.05.0 high and low, but I haven't found a conntrack or any other module.
And, yes, I use it in 21.02.2.