On my Windows PC (192.168.1.123) , I have an application that connects to 1.2.3.4 on port 3333 by default, I would like to redirect the traffic to 127.0.0.1 port 2222.
Under Linux, this can be accomplished by entering this on my PC.
iptables -t nat -A OUTPUT -s 192.168.1.123 -p tcp -d 1.2.3.4 --dport 3333 -j DNAT --to-destination 127.0.0.1:2222
Is there a way to do the above on Windows?
nc
likenc -l 1234 | nc 1.2.3.4 5678
and you can get nc on windows with cygwin and possibly with gow. Another way in windows is with the netsh command , something likenetsh add v4tov4 listenport..........
. you can google that netsh command.