Page 1 of 1

Secure NAT and Alias IPs

Posted: Sat Nov 05, 2016 12:37 pm
by moreaujames
My goal is to set up a private VPN server to access the internet anonymously. I currently have softether with SECURE NAT enabled and this accomplishes the basic goal. However, I do not want to expose my primary IP address on my cloud based softether VPN server. My cloud based server only allows one ethernet adapter but I have two additional alias ip addresses on the adapter. I would like my VPN client to connect via one alias ip address (currently working) but have the NAT translated traffic to the internet route to the 2nd alias ip address, instead it routes to the primary ip address of the ethernet interface. How can I change SECURE NATs routing to the alias IP instead of the primary IP address?

Regards

Re: Secure NAT and Alias IPs

Posted: Tue Nov 08, 2016 9:38 am
by moatazelmasry
Use the iptables command to POSTROUTE all traffic coming out of your main IP to the alias ip and PREROUTE to route incoming traffic on alias ip to your primary ip (which SoftEther is using )

Re: Secure NAT and Alias IPs

Posted: Tue Nov 08, 2016 9:48 am
by moatazelmasry
For example:

iptabls -t nat -A PREROUTING -d ALIAS_IP -j DNAT --to PRIMARY_IP
iptabls -t nat -A POSTROUTING -s ALIAS_IP -j SNAT --to PRIMARY_IP

Re: Secure NAT and Alias IPs

Posted: Wed Nov 09, 2016 11:43 am
by moreaujames
Thank you for your response, I should have stated that my Softether VPN server is running on Windows 7 Ultimate OS, is there any similar facility in Windows?

Re: Secure NAT and Alias IPs

Posted: Wed Nov 09, 2016 10:18 pm
by moatazelmasry
I have no idea sorry, but a quick google search yields some interesting results, for example netsh for windows 7:

http://serverfault.com/questions/207620 ... f-iptables

Re: Secure NAT and Alias IPs

Posted: Mon Nov 28, 2016 6:21 am
by thisjun
I found a tool.
http://www.nat32.com/v2/

Re: Secure NAT and Alias IPs

Posted: Mon Nov 28, 2016 12:18 pm
by moreaujames
Thanks for all the suggestions