Secure NAT and Alias IPs

Post your questions about SoftEther VPN software here. Please answer questions if you can afford.
Post Reply
moreaujames
Posts: 3
Joined: Sat Nov 05, 2016 11:31 am

Secure NAT and Alias IPs

Post by moreaujames » Sat Nov 05, 2016 12:37 pm

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

moatazelmasry
Posts: 336
Joined: Sat Aug 15, 2015 7:41 pm

Re: Secure NAT and Alias IPs

Post by moatazelmasry » Tue Nov 08, 2016 9:38 am

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 )

moatazelmasry
Posts: 336
Joined: Sat Aug 15, 2015 7:41 pm

Re: Secure NAT and Alias IPs

Post by moatazelmasry » Tue Nov 08, 2016 9:48 am

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

moreaujames
Posts: 3
Joined: Sat Nov 05, 2016 11:31 am

Re: Secure NAT and Alias IPs

Post by moreaujames » Wed Nov 09, 2016 11:43 am

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?

moatazelmasry
Posts: 336
Joined: Sat Aug 15, 2015 7:41 pm

Re: Secure NAT and Alias IPs

Post by moatazelmasry » Wed Nov 09, 2016 10:18 pm

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

thisjun
Posts: 2458
Joined: Mon Feb 24, 2014 11:03 am

Re: Secure NAT and Alias IPs

Post by thisjun » Mon Nov 28, 2016 6:21 am

I found a tool.
http://www.nat32.com/v2/

moreaujames
Posts: 3
Joined: Sat Nov 05, 2016 11:31 am

Re: Secure NAT and Alias IPs

Post by moreaujames » Mon Nov 28, 2016 12:18 pm

Thanks for all the suggestions

Post Reply