Dynamic DNS (DDNS) explained
What is Dynamic DNS (DDNS)?
The DDNS abbreviation stands for Dynamic Domain Name System. While the typical DNS can link domain names to IP addresses via A or AAAA DNS records, the Dynamic DNS can automatically refresh and change the host’s IP address, so even if its IP address changes, the clients can reach it.
Let’s see an example of DDNS use:
You want to use a remote desktop application and access your home computer from your office. You have set up a server application on your home computer, and you know its public IP address.
If you haven’t disconnected the computer and there is not much time between the start of the server application and the office’s connection, you will probably connect without problems.
But! There comes a big problem.
The IP address that you have at your home was provided by the Internet service provider, and it was given by a DHCP server for a limited amount of time. If you disconnect and connect later, or simply your IP address lease expires, you will get a new one.
If that happens, and you are still trying to use the previous IP address to connect to your home server, the connection won’t happen.
But can you do something for this ever-changing IP address? Yes! Get a DDNS!
You can set your router to use DDNS and update the IP addresses automatically when the ISP changes your IP address. You set it up, and you forget about any setting anymore!
How does Dynamic DNS work?
So imagine the following:
You have a home server with an internal IP address and an internal port for communication provided by the home router. The computer is connected to the internet to provide the service through it and gets an external IP address (IPex) and an external port (Portex). The router has NAT (network address translation) that links the internal and the external IP address and ports. The external IP address will, over time, change. This is where the DDNS comes in handy.
When you set up your home router with DDNS, by putting your account and password from a DDNS service, the DDNS will link a hostname with the IP address, and it will automatically update each time when the ISP changes the provided IP address.
When you want to connect to the home server, you won’t need the IP address but the hostname that you use with the DDNS service. You will request it and get the current IP address.
*To set up DDNS, you will need to get the DDNS service from one of the many available online providers.
If you are interested in the DNS, we recommend you take a look at this article about what Reverse DNS is.
Why should you use Dynamic DNS?
- It is practical! You can set it up once on your router and forget about it. It will take you just a few minutes because it is very straightforward to set it up.
- Economic! While you could probably get the same result with a static IP address, the static one will cost you a monthly subscription. The Dynamic DNS is often free, depending on the provider you decide.
When to use Dynamic DNS (DDNS)?
Whenever you want to have a server on a network with a public dynamic IP address, you will need to have DDNS to be sure you will connect without problems.
- Surveillance system. If you want to set up cameras, sensors, and other alarm elements and keep them working 24/7, Dynamic DNS can help you.
- Home or office server. Inside your home or at work, you could have Internet without a static IP address. If you want to host any server application like storage, web hosting, email server, or another, you will need this automatic IP address solution.