I'm trying to use the TPROXY feature of iptables.
For example :
iptables -A PREROUTING -t mangle -p tcp -i eth0 -j TPROXY --on-port 5000 --tproxy-mark 1
This feature works perfectly on Ubuntu 16.04 (tested in a VM).
I would like to use this feature on a 22.04 ubuntu release. However, it doesn't seem to work. I have these errors :
unknown option "--on-port"
or
unknown option "--tproxy-mark"
The kernel modules required are there and set with a "m" value in the boot config. And I tried to enable these modules manually and it doesn't change anything...
modprobe nft_tproxy
modprobe nft_socket
modprobe nf_tproxy_ipv4
modprobe nf_tproxy_ipv6
If you have any leads, I'm interested!
Thanks !