I am starting to admin Windows server and have some troubles with network tools.
I am trying to configure nat on Windows Server 2012.
My Windows VM has two networks adapters, the first one connected to my private network with the settings 10.38.1.1/26
. The second one is a virtual loopback with the settings 10.12.1.1/32
.
The first one is used for all the communication and the second one is used only to host my application (wich listening on 10.12.12.1:30001
and can't change it).
The network 10.12.X.X
must stay local on the VM and should not be seen from the network. So I want to NAT all the outbound traffic comming from my local application 10.12.1.1
to another application host on 10.38.1.2:30002
I already did something similar on linux with this iptables rule :
iptables -t nat -I OUTPUT -o eth1 -d 10.12.1.2 -p tcp --dport 30002 -j DNAT --to-destination 10.38.1.2:30002
How can I do that with netsh ?