Closed champtar closed 1 week ago
The ip6 rules are also invalid,
kubelet[4258]: /dev/stdin:18:41-48: Error: syntax error, unexpected string
kubelet[4258]: add rule ip6 cni_hostport hostports ip6 protocol tcp th dport 8446 dnat ip6 addr . port to fd61:7465:6d65:1000::3cd . 18446 comment "30ba0c9d53d293e8ed7b7dcdc37cd0cb8380f78cbd2b3977bc57f8e9931e04e7"
kubelet[4258]: ^^^^^^^^
ip6 protocol tcp
gives a syntax error, we can use meta l4proto tcp th dport
, but I'm curious why aren't we just using tcp dport
? @danwinship ?
nft 'add rule ip cni_hostport hostports meta l4proto tcp th dport 81 dnat ip addr . port to 198.18.3.235 . 10081 comment "1"'
nft 'add rule ip cni_hostport hostports ip protocol tcp th dport 81 dnat ip addr . port to 198.18.3.235 . 10081 comment "2"'
nft 'add rule ip cni_hostport hostports tcp dport 81 dnat ip addr . port to 198.18.3.235 . 10081 comment "3"'
# nft list ruleset
tcp dport 81 dnat to 198.18.3.235:10081 comment "1"
tcp dport 81 dnat to 198.18.3.235:10081 comment "2"
tcp dport 81 dnat to 198.18.3.235:10081 comment "3"
hm... I had tested all of this at one point... I must have made a "minor fix" at some point and broken it
I think instead of
need to think about this and compare with iptables portmap and nftables kube-proxy rules...
I'm curious why aren't we just using
tcp dport
probably I copied from somewhere else and simplified/rewrote and didn't notice it ended up having unnecessary clauses in the end.
Trying the new nftables backend, it fails on EL 9.4
conf
Error
Using strace, the rules are:
I think instead of
we should use
(and rename input to prerouting)