Trouble with nftables on OpenWrt

Hi everyone.
I can't apply nftables rule.

root@OpenWrt:~# service nftables restart
/etc/nftables.conf:35:17-73: Error: Could not process rule: No such file or directory
                oif "wg0" tcp flags syn tcp option maxseg size set rt mtu
                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Rule in /etc/nftables.conf

table ip filter {
  chain forward {
    type filter hook forward priority 0;
    oif "wg0" tcp flags syn tcp option maxseg size set rt mtu
  }
}

But i can apply this rule on my laptop (Archlinux, all update includes).
Look at wiki - https://wiki.nftables.org/wiki-nftables/index.php/Mangle_TCP_options

root@OpenWrt:~# uname -a
Linux OpenWrt 4.14.63 #0 Wed Aug 15 20:42:39 2018 mips GNU/Linux
root@OpenWrt:~# nft --version
nftables v0.9.0 (Fearless Fosdick)

Can someone tell me, why it doesn't work on OpenWrt?

Just enable NETFILTER_ADVANCED in kernel and rule will be works.

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.