Dynamic DNS

Google uses many IP addresses. However, everyone enters google.com into a browser's URI (or URL) box rather than one of google's IP address because the name is easier to remember than the IP address.

A home gateway (or router) also has an IP address. I can't remember my home IP address and don't need to. DNS is an internet service to translate a name, such as google.com, into an IP address. I can create a name for my home web server that is easy to remember.

Another consideration, is a home IP address can change. It is up to the Internet Service Provider (ISP) when it changes my home IP address. It doesn't change often, but it can change and the ISP doesn't have to tell me it changed. Which means I do not own my home IP address. Anyways, dynamic DNS is a way for me to name an IP address that I do not own, and allows me to associate a name with an IP address that may change from time-to-time.

If the IP address changes, I can update the IP address through my dynamic DNS provider's website.

Step 1. Choose a Dynamic DNS Service:

I was using DynDNS (deleted account on 18APR2020). However, as of 18APR2020, DynDNS is not supported by Let's Encrypt and DynDNS is a pay service.

DuckDNS is free. I have also used GoDaddy Dynamic DNS.

Here is link to several dynamic DNS vendors.

Step 2. Login to DuckDNS

I used my github account

Step 3. Enter your domain name

In the image above, in the sub domain text box, enter your domain name

Click add domain

DuckDNS gets your Gateway's IP address

Record your:

♣dynamic-dns-domain♣

♣duckdns-token♣ , which is in the top part of the display

♣your-gateway-ip-address♣ , which is shown in bottom left under Current IP

Step 4. Test your dynamic DNS name

It might take a few hours for your DNS Name to propagate through the internet

From a terminal window run the command:

$ ping ♣dynamic-dns-domain♣ .duckdns.org

and you see:

PING ♣dynamic-dns-domain♣.duckdns.org (♣your-gateway-ip-address♣): 56 data bytes

64 bytes from ♣your-gateway-ip-address♣: icmp_seq=0 ttl=64 time=2.631 ms

If you see the following, then wait a bit:

PING ♣dynamic-dns-domain♣.duckdns.org (♣your-gateway-ip-address♣): 56 data bytes

Request timeout for icmp_seq 0

Use CTRL-c to stop ping

Or you can try:

$ curl "https://www.duckdns.org/update?domains=♣dynamic-dns-domain♣&token=♣duckdns-token♣&IP="

and you should get:

OK

References:

Dynamic DNS explained more fully: Practically Networked