I am basically trying to do a simple port forward to a nodeport.
sudo iptables -t nat -A PREROUTING -p tcp --dport 27000 -j REDIRECT --to-port 30000
But for some reason it doesn’t work.
If I try to do something like
sudo iptables -t nat -A PREROUTING -p tcp --dport 29000 -j REDIRECT --to-port 22
Then it works as expected.
If I connect to port 30000 from a remote host it also works, so its just the ‘port forward’ to the ‘node port’ that isn’t working.
Can anyone help me understand what I am missing?
I am running this on a ‘rancher 2’ custom cluster with Canal as network provider. (kubernetes 1.12.3-rancher1-1).