I have a few PCs/services that I want to access remotely, which are inside a VPN and gets assigned local IP addresses using DHCP.

How can I setup dynamic DNS to access the PCs on their internal VPN IP using a domain name eg. pc1.server.com?


I tried using www.noip.com to set up dynamic DNS, but how can I make the domain pc1.server.com point to an internal IP inside the VPN, eg 10.15.x.x instead of the public IP? If the PC trying to access it is not on the VPN this would not work obviously, but could it work if the PC trying to access it is in the VPN and thus can see the internal IP 10.15.x.x?

  • Unfortunately, questions about host/server configurations and protocols above OSI layer-4 are off-topic here. You could try to ask this question on Server Fault for a business network. – Ron Maupin Jul 28 '19 at 16:27
  • Okay thanks! I will post there – Sonja Brits Jul 29 '19 at 14:46

You need to set up site-to-site VPN, allowing you to tunnel the private IP addresses across the VPN link. Then simply map the DNS names to the internal IPs. [edit] You might want to make the internal IPs static or reserve them on the DHCP server, or you'll have to update DNS when they change.

When one VPN tunnel end uses dynamic IP addresses you need to establish the VPN link from the dynamic end to the static end.

If both ends are dynamic you need a VPN solution that can use DNS names instead of just IP addresses, and configure a dynamic DNS service and its updater.

However, dynamic internal IP addresses and dynamic external/WAN IP addresses are different problems and need to be addressed differently.

  • How would this mapping of DNS names work? Using an external service such as noip? Also, would this work with non-static internal IPs? – Sonja Brits Jul 29 '19 at 14:47
  • You can use any DNS service you like. An external service can be queried by anyone and you might not want that. (Setting up and configuring DNS is off-topic here though.) If your internal IPs are changing you need to update your DNS server (by client, DHCP, manually). The easiest way is to use reservations on the DHCP server. – Zac67 Jul 29 '19 at 15:09

Not the answer you're looking for? Browse other questions tagged or ask your own question.