OpenVPN – Enable OpenVPN Tunnel to Dynamic IP Without DynDNS

vpn

I need to get acces to multiple remote LAN (not specially at the same time) from my office (Fixed IP).

All these remote LAN will be connected to internet via 3 or 4G USB key and will have dynamic IP address.

An OpenVPN Server is running in my Office

Note : I want to avoid DynDNS service to reduce cost.

enter image description here

__EDIT__

Question :
How can I tunnel to my 3/4G gateway if it has dynamic IP (and no DynDNS) ?

My first guest was to establish a first tunnel from my 3/4G gateway to my office which have a fixed IP. And then establish a second tunnel from my office to the 3/4G gateway.

Note : I have multiple 3/4G gateway with the same LAN configuration and I want to find a way to tunnel to each one.

Best Answer

My understanding is that you have multiple remote sites to connect to with:

  • dynamic public IPs
  • identical LAN IPs from one to the other.

Those are actually two separate issues with completely different types of solutions. Handling dynamic public IPs can be done with a standard OpenVPN configuration (no DynDNS). Once the VPN part is in place, you should NAT each LAN to a distinct private IP range, such that your workstation thinks it sees different remote LANs.

So if all the LANs use 192.168.1.0/24, you would map the first one to (for example) 10.0.1.0/24, the second one to 10.0.2.0/24, etc...

Without knowing more about the specific hardware, it's hard to say whether this is best done on your central gateway or on the remote site gateways, though.