Configuration of my newly bought domain name, with dynamic DNS
Par Yves le vendredi 31 janvier 2014, 17:59 - Lien permanent
In an older post, I inquired about the management of a domain name, in the context of a dynamic IP address. I concluded that such a configuration could be handled, notwithstanding the impossibility of a suitable handling of the DNS “
Now that I do have a domain name, let me use it…
I will keep the same examples I have used before. Thus I will call “
new.example” the new domain name, and “
old.dyn.example” the former dynamic domain name. More over, I will consider my current IP address to be
When I look at the web control panel provided to me by my registrar Gandi for “
new.example”, as expected, I see nothing of interest in relation to the management of a dynamic IP address. Thus, as expected, I manage this domain name elsewhere; I chose Hurricane Electric Internet Services (HEIS) as a DNS hosting service: it allows the usage of dynamic IP addresses, and it is free.
Before I can manage my DNS entries, I have to tell my registrar, Gandi, that the DNS servers that will know about my domain will be HEIS’ instead of theirs. To this end, in the administration panel, I choose “Change the DNS servers” and I enter the addresses for HEIS’ servers:
That is all as far as Gandi is concerned. What follows happens in HEIS’ administration interface, where I have to create the
Name : new.example
IPv4 address : 203.0.113.90
TTL : 300
[✓] Enable entry for dynamic DNS
Which gives, when written as a standard DNS line:
new.example. 300 IN A 203.0.113.90
The TTL is short (300 seconds, that is 5 minutes) because this DNS record should not be cached too long by the routers, in case my IP address changes. Propagation of DNS changes is instantaneous; freshening of buffer memory is not… With the above settings, I accept that my server will be unavailable for up to 5 minutes after each DNS change due to a change in my IP address. Do not use a too low value for the TTL, as that would impend routing performance (routers would need to permanently update their data).
Now I have to make sure that HEIS gets notified whenever my IP address changes. This is taken care of on my own server. I happen to already have configuration files, based on Inadyn, for much the same task, but for
/usr/sbin/inadyn --input_file /etc/inadyn_old.conf
- and a “
Handling the new domain name is just a matter of adding:
- a new
/usr/sbin/inadyn --input_file /etc/inadyn_new.conf
- a new
/etc/inadyn_new.confconfiguration file, adapted to HEIS:
--ip_server_name checkip.dns.he.net /
- and a new “
The “DDNS KEY” above is defined through HEIS’ web interface, on the line of the Dynamic
A DNS record (🔃 icon). This key does not need to be remembered, so it is perfectly sensible to have it randomly generated.
Note that the above 1800-second period instructs the server to check for the IP address every 30 minutes. Wherefore, in case of a change of IP address (due to my ISP), up to 35 minutes can pass until my server is reachable again.
There ends the basic DNS configuration. My server is now reachable through its new domain name. Other DNS settings are more dictated by software needs.
As a side-note, it is also a good idea to add the new domain name to the
/etc/hosts file on the server.