Dynamic DNS (DDNS)? -How it Works and Why Use It?

dynamic-dnsDynamic DNS keeps DNS records automatically up to date when an IP address changes.

Dynamic DNS is used in large networks that host internal services, and use their own internal DNS and DHCP servers.

However small companies, and home networks don’t normally have their own DNS server so why would they need Dynamic DNS ?



In this tutorial we look at how dynamic DNS works and how to set it up on a home router.

How Dynamic DNS Services Work and Why Use it?

Dynamic DNS Services are used by small companies and individuals when they want to publish a service on the Internet, and that service is hosted within an internal or home network.

Home networks typically uses a NAT router to connect to the internet which means that devices located on the internal network aren’t accessible from the Internet.

In the following discussion we are going to assume that we want to make a web server located on an internal server available on the internet.

The network diagram below shows the configuration

The Internal IP address is assigned to the internal server by the NAT router via DHCP, but usually in these circumstances we will give it a static internal IP address.

To make the web service available on the internet we use a technique called port forwarding ( see the  port forwarding  and Internal vs external IP address tutorials for more details).

Now our web server appears to our external client to be located at IPex and on port Portex.

If we put some typical numbers into this we will see our web server at

Ip Address= 81.157.34.43 and on Port 80

All we need now do is to tell our external client to use these values.

However the external IP address IPex (81.157.34.43) may also be dynamically assigned by the ISP, and we cannot make it static unless we pay for a static address.

In addition, the external client has to remember the IP address.

Dynamic DNS Services

If we now introduce a Dynamic DNS service into the picture.

With Dynamic DNS  we assign the web server a name which we can then give to external clients. –This name is fixed.

We then assign the external IP address to the name.

Now because this external IP address will change periodically we will need to update the DNS record periodically.

We could of course do this manually, but that would be very unreliable.

Instead the ability to automatically update the DNS server records is built into most NAT routers.

Here is a screen shot of the Dynamic DNS configuration page of my NAT router (BT Home Hub).

ddns-router-config

The configuration involves entering the name of your DDNS provider and your login details.

When you apply it you should get a connected confirmation.

ddns-connected-confirmation

If you get username/password incorrect check you login details and retry.

Registering with a DDNS Service Provider

Before you can enable Dynamic DNS you will need an account from a DDNS provider.

There are several providers available. Most provide a free service with a premium upgrade.

Here is a  1and 1 review of DDNS providers.

The main providers all work in a similar way and the registration process is simple.This article uses NO-IP.

You will need to create a host name for the IP address and select from one of the available domain names provided by the provider and enter a hostname.

Below is the name form for No-IP

no-ip-hostname

 

Dynamic DNS (DDNS) Not Supported!

If your router doesn’t support DDNS updates you can get a DDNS client that you install on a machine that does the same job.

The only problem with this approach is that the machine needs to be constantly running.

Testing Your configuration

Go to the ping command and test that you can access the IP address by pinging the domain name which consists of the hostname +domain name.

test-ddns

Dynamic DNS (DDNS) Video

Here is a video that covers the above:

Common Uses

Although it is used by gamers and tech Geeks it is probably going to see more widespread adoption in remote security/surveillance and control areas.

Common Questions and Answers

Q-What is the difference between dynamic DNS and DNS?

A- Dynamic DNS is a feature of DNS. Early DNS systems were static and the IP addresses and name mapping were entered manually. Dynamic DNS updates the Name- IP mappings automatically when it changes.

Q- How do I find my external IP address?

A- Go to Google an type what’s my IP address.

whatismyipaddress-google

Q- Do I need DDNS?

A- Normally no. You only need it when providing services to Internet based clients

Summary

Dynamic DNS (DDNS) is very useful if you need to access internal network services from across the Internet.

It isn’t designed for hosting a business website, for that you will need standard web hosting.

Related Articles and Resources:

Save

Please Let me Know if you found it Useful
[Total: 29 Average: 4.6]

17 comments

  1. How do you stop a ddns from being created basically stop someone from hacking onto my security cameras and deleting incriminating video.

    1. On a home network you don’t normally have DDNS but mDNS. However neither would stop hacking you need to improve the security on your cameras.
      I don’t use security cameras and am not s security expert so I can’t advise you on that.
      Rgds
      Steve

  2. Is their such thing as : ‘ISP Is blocking ports or inbound connections’. I tried using this trick 10 to 15 days back and no matter what whether I am changing my IP address or my port address (on Local machine); when I am trying to access my website then the changes can be seen in the ip address and the port number online, but even then I am unable to access my website as it says something like : ‘Connection timed out’.

    Because of this I gave up and purchased hosting on namecheap.

    1. Sorry for the late reply but I was not notified of the comment.
      They could block it but it is doubtful. However you are better having hosting on the Internet.

  3. I just registered DynDNS pro as trial.
    I have multiple devices under one router. How do I configure router or the DynDNS so can access all the devices? I have assigned different ports for each device. When I try to access, every time, it goes to only one same device. Is there are way to access all devices under one router with dynamic IP?

    1. Each device needs a unique name
      so
      device1.ddns.net –> device1
      device2.ddns.net –> device2
      Rgds
      Steve

  4. I got a low-end external VPS, for webpage, how can I use it to

    1) set up UDP hole punching on my home network, so I don’t need to open a port in my router,

    2) have my own version of noip for home network, I don’t like using noip, because I constantly need to log into their site, and extend it every few weeks.

    1. Hi
      Never tried hole punching but you would need server software to do it.
      As for noip DNS then this is not possible as you need to be part of the global dns network which is restricted.
      Sorry can’t be more helpful
      Rgds
      Steve

  5. why do we need an account somewhere to get this done? why isn’t there an app that can update dns records without having to use an external service?

  6. I would like to know do I need to add new hostnames to my router for each new html host? I’m presuming the router is not narrow and allocates many IP numbers to its clients, and if it was only one client my PC then is a dynamic IP name needed?

    1. For one host then manual assignment is ok.however using the router to do it is more flexible as I’m sure you have other devices like phones.
      Regarding several other questions I think you are a bit confused with hoes names and IP addresses . Suggest you start here
      http://www.steves-internet-guide.com/hosts-file/
      and
      here
      https://stevessmarthomeguide.com/name-resolution-and-dns-on-home-networks/

      Apache as far as I am aware cannot assign host names.
      The router will support as many html hosts as you put on the server. The server will probably be the problem not the router.All that needs to be done on the router is to configure port forwarding.

  7. If I tapered my router to assign my PC the IP number and use Apache to assign a host name and run a virtual host and add it into my router do you recommend a dynamic name being added to the router, does it affect devices connecting to my PC ?

  8. I second IROA, this is a great article!

    Correct me if I am wrong, but do not most home automation devices create a “hidden” DDNS server during their installation?

    Is there someway I can find all of these on my home LAN?

    1. No they don’t as far as I know. They may support MDNS (multicast DNS) so that they can locate devices on the local network.
      Rgds
      Steve

  9. This is the best article about DNS and DDNS Ive ever seen over the internet. ISP changed my static ip onto dynamic. You are a legend, this is amazing!!!

Leave a Reply

Your email address will not be published. Required fields are marked *