↓ Skip to main content
  1. Posts/

Domains + DDNS 7 ways and update the old one

Rubén Infante Docio
Author
Rubén Infante Docio
Software engineer
Table of Contents

DNS logo on the
world ball

After the closure of the free accounts in DynDNS, we must look for another way to access a home server from the internet, since operators currently sell the fixed IP as a separate service (I still remember the static and free IP that telephone gave me in one of my first ADSL.

Luckily, there are dynamic DNS

Dynamic DNS (DDNS](http://en.wikipedia.org/wiki/Dynamic_DNS “Dynamic DNS”)[) is a service that allows the real-time updating of information about domain names located on a name server. The most common use of it is to allow the assignment of a domain name from Internet to a device with a variable (dynamic)](http://es.wikipedia.org/wiki/Direcci%C3%B3n_IP “Dirección IP”) IP [address. This allows you to connect to the machine in question without having to know which IP address it currently has.

Wikipedia

What should it have?
#

We need a solution that meets several characteristics:

  • Quick to implement (I’m lazy :D)
  • That it works properly
  • Make it free
  • To prevent a repeat of what happened with DynDNS

Solutions
#

1. Provided by the domain registrar (1st Level)
#

Some domain registrars offer these types of services for free when you buy one of them, or if you have a pre-existing one, search Google “Dynamic DNS + your domain registrar”.

Pros
#

  • Ease of use

Cons
#

  • This service can be converted to payment as DynDNS at any time
  • We are not entirely in control of our domain
  • A top-level domain is required

Links#

  • MrDomain offers DonDNS (beta)
  • Namecheap that offers this service as a simple free add-on, and with GNUDIP the most widespread DDNS server software, compatible with any router that supports DDNS.

2. 2nd Level Domain Registrar Ready for It
#

It is the solution that most of us have used so far: No-IP, DynDNS etc. However, it can happen that these services become paid, fall or go bankrupt.

Pros
#

  • Ease of use

Cons
#

  • We are not entirely in control of our domains
  • At any time it can become paid and we will lose our connectivity

Links#

  • Link to DNSOMATIC

Notes
#

I do not recommend this solution under any circumstances it is always better to use DNSOMATIC, even if it is with a single service, as explained below

Steps
#

  1. Create an account in the chosen service, I recommend these 3:

    1. No-IP: they have been offering a quality service for years, but I fear that they will soon become paid for because of their similarity to DynDNS
    2. OpenDNS: DNSOMATIC belongs to OpenDNS and they offer their own service, this company has always given me a lot of trust
    3. freedns.afraid.org : although it seems that their website was created in the 80’s I have heard nothing but good things about this service
  2. Configure your ddns client, in the web interface of your router or in the case of a ddclient linux server, I will not expand further on this aspect since there are thousands of tutorials on the internet. However, I will put a couple of commands to install and configure with GUI ddclient in Linux

    //Si no lo tienes instalado
    sudo apt-get install ddclient
    //Si ya lo tienes instalado
    sudo dpkg-reconfigure ddclient

3. DNSOMATIC, various domain registrars (2nd Level)
#

Until now the solution used to be to create an account with No-IP or DynDNS, however, thanks to DNSOMATIC we can register several accounts in multitude of services and update all of them with a single web request, it is also compatible with most DDNS clients included ddclient my favorite for Linux servers.

Pros
#

  • Ease of use
  • Maintained by OpenDNS, which gives me confidence

Cons
#

  • This service may become paid, but it does not look like it will happen
  • We are not entirely in control of our domains

Links#

  • Link to DNSOMATIC

Notes
#

This service is based more on quality than quantity, that is, we will have a large number of domains, so that if one becomes paid or falls, we can always use another one.

Steps
#

  1. Create a DNSOMATIC account
  2. Create accounts in the services you want, I recommend 3:
    1. No-IP: they have been offering a quality service for years, but I fear that they will soon become paid for because of their similarity to DynDNS
    2. OpenDNS: DNSOMATIC belongs to OpenDNS and they offer their own service, this company has always given me a lot of trust
    3. freedns.afraid.org : although it seems that their website was created in the 80’s I have heard nothing but good things about this service
  3. Add the data of the accounts created in these services to your DNSOMATIC dashboard

4. Convert 1st Level domain to a dynamic one even if our provider does not have support
#

I think there is not much explanation behind this title, but basically what we will do is use the DNS of a dynamic DNS provider as afraid.org on our main domain, and then through its API, update it ourselves through a Script

Pros
#

  • Quick to make
  • Customization Capability
  • We can use our non-dynamic domain as dynamic

Cons
#

  • Little control as we continue to rely on a single free DDNS provider

Links#

  • HERE You can see in Spanish how to do this with one of the largest registrars such as Godaddy

5. Build your own self-updating DDNS Server
#

The free project GnuDIP Dynamic DNS allows us to mount everything we need on our own machines and domains, which is an advantage for the privacy/security paranoid, but for the lazy…

Pros
#

  • Absolute control
  • Customization Capability

Cons
#

  • Installation difficulty
  • It forces us to always maintain a machine with a fixed IP, even if it is in the cloud and a domain.

Links#

6. Create your own DDNS client and server in a very artisanal way
#

Using a Dropbox account, cron on the machine, and domain redirection, you can quickly and easily set up everything you need to configure yourself with simple tools.

Pros
#

  • Absolute control
  • Customization Capability

Cons
#

  • Medium installation difficulty
  • It is not as proven a solution as the others and its update is based on time rather than change

Links#

7. Using CPANEL APIs to update DNS when they change
#

This is a very clever solution that we have thanks to Mitchel Haan, making use of the CPANEL API (the control panel of most hostings) to update the IP to which a domain is redirected.

  • It consists of:

    • A PHP script, one to recover the IP from home

    • Another PHP Script to perform the update in CPANEL

    • A shell script that checks if updating is needed and executes the action if necessary

Pros
#

  • Absolute control
  • Customization Capability

Cons
#

  • It is not as proven a solution as the others and its update is based on time rather than change

Links#

  • HERE You can see a post explaining everything you need to know and a GitHub with the updated code

My Selection
#

Applying the law of the “Golden Hammer”, that is, as Geeks we often look for the best solution whatever it is worth and whatever happens, and we go from one thing to another, on too many occasions and many times without taking into account time, so precious to me at least today.

That is why I recommend:

  • If you have a top-level domain or are buying one and need DDNS

    • Use Solution 1
  • I totally advise against betting everything on a card that you do not control

    • So don’t use solution 2!
  • If you don’t have a domain and can’t use Solution 1

    • Use Solution 3
  • If you have a domain and can’t use Solution 1

    • Solution 4
  • If you feel like geeking to the fullest and you have the necessary requirements

    • Solution 5
  • If you want to understand well how everything works inside and a complete DIY

    • Solution 6
  • If you have cheap hosting, it’s not a priority and you want to geek a bit

    • Solution 7

Replacing references from the old to the new domain
#

sudo grep -r -n --exclude-dir=dev --exclude-dir=sys --exclude-dir=proc "ruben0909.dyndns.org" /

Final Note
#

I would have paid for a DynDNS account at a reasonable price, but $25 per year seems excessive for something that other companies offer for free even with a top-level domain included in the price.

Related