0

I am trying to setup an OpenVPN server similar to LiquidVPN.com. WIth their VPN server when a client connects it receives the public IP address of the server. All network traffic to the public IP is forwarded to the connected client.

I know this is sometimes referred to NATless routing but I cannot for the life of me figure out how to do this.

I have an AWS EC2 instance setup with the OpenVPN AS server working. I can connect and browse using a dynamically assigned IP. If I attempt to statically assign the server IP to myself (client) while I DO get the server public IP assigned to my client I cannot send or receive data.

The END goal (because maybe there is an easier way to do this) is to connect a local mail server via this OpenVPN server. My ISP blocks ports like 80 and 25. Connecting my local server to the OpenVPN server, I can send and receive data like my local server IS the OpenVPN server thus having access to those ports. LiquidVPN was able to allow me to host those services on port 80 and 25 but port forwarding wasn't needed because there was no NAT.

djreisch
  • 101
  • Are you sure you receive “the public address of the server” rather than “a public address”? How can you communicate with the VPN server if you have the same IP address as it? – user2233709 Jan 06 '19 at 19:51
  • 1
    "_My ISP blocks ports like 80 and 25._" That would be for a residential network. – Ron Maupin Jan 06 '19 at 20:29
  • @user2233709: Yes. I was given the public IP of the server to connect to, and when connecting to the server my computer receives that same IP and when asking "what's my IP" it shows that same IP. – djreisch Jan 07 '19 at 04:44
  • @RonMaupin Yes you're correct. Unfortunately Cox does block those ports. Those on Time Warner Cable get to enjoy all those ports. – djreisch Jan 07 '19 at 04:45
  • `I know this is sometimes referred to NATless routing but I cannot for the life of me figure out how to do this.` - Simple you get a range of addresses. The VPN server is assigned one address, the clients are assigned other addresses. You can't have a NAT-less setup with a single address. – Zoredache Jan 07 '19 at 07:18
  • If you get the exact same address as the server on your client system, how do you maintain the VPN connection to the server? That IP address is now local, so how do the VPN packets reach the real VPN server? Answer: they can't. So I do not think you are getting the server's IP address. "What's my IP" uses a web service probably, which will work with the normal NAT solution. Use "ip a" on your local system to show the IP addresses configured on your interfaces. – wurtel Jan 08 '19 at 10:52
  • @Zoredache I am certain the IP I am being assigned on my local machine is the server IP. I have linux running which reports the machine IP. The local network adapter has an address from my network and the tun adapter for OpenVPN is reporting the IP of the server (the address I connect to which is the same address that shows up via ip a or a dig command or google) – djreisch Jan 10 '19 at 05:34
  • Some goes to you @wurtel read my above comment – djreisch Jan 10 '19 at 05:35

0 Answers0