I have a need to catch all packets going to an external IP/Port redirected to an ssh tunnel. Can't use VPN, it as to go via ssh tunnel. This will be citrix redirection
I have an iptables rule that allow me to do the redirection
iptables -t nat -A OUTPUT -p tcp -d w.x.y.z --dport 1494 -j DNAT --to-destination 127.0.0.1:2494
I have to mention that I did also have the sysctl setting to make the iptables rules working
sysctl -w net.ipv4.conf.eth0.route_localnet=1
When I test the citrix connection with telnet, I do get the ICA prompt from both
telnet w.x.y.z 1494 telnet 127.0.0.1 2494
But when I start citrix from an ica file with the server IP being at w.x.y.z:2494
, I cannot get the connection. On the other side, if I use the same configuration file and change the IP to 127.0.0.1:1494
it does work.
I do miss something but simply do not know what.
Any idea ??