So I've hit:
https://bugzilla.redhat.com/show_bug.cgi?id=2252550
and would like to do something equivalent to:
iptables -t filter -A OUTPUT -p tcp --syn --tcp-option 34 -j DROP
(for both OUTPUT and FORWARD on the 464-xlat device)
The 'nft' equivalent is:
# iptables-translate -4 -t filter -A OUTPUT -p tcp --syn --tcp-option 34 -j DROP
nft 'add rule ip filter OUTPUT tcp option 34 exists tcp flags syn / fin,syn,rst,ack counter drop'
I've tried to set this up via the LUCI web UI, and got as far as
/etc/config/firewall:
config rule
option name 'Disallow-TCP-FastOpen'
option direction 'out'
option device '464-xlat'
option family 'ipv4'
list proto 'tcp'
option dest 'wan'
option target 'DROP'
option src '*'
option enabled '0'
But now I'm stumped.
Do I need custom rules?
If so how/where?
I've come up with:
root@mf286a:~# cat /usr/share/nftables.d/table-post/disable-ipv4-fastopen.nft
chain postrouting {
type filter hook postrouting priority filter; policy accept;
meta nfproto ipv4 oifname "464-xlat" tcp flags syn / fin,syn,rst,ack tcp option 34 exists counter drop comment "Drop Outbound IPv4 TCP FastOpen"
}
root@mf286a:~# fw4 check
Automatically including '/usr/share/nftables.d/table-post/disable-ipv4-fastopen.nft'
Ruleset passes nftables check.
(the more logical chain-pre/postrouting directory doesn't appear to work)