In order to save resources, internet providers usually use dynamic IP addresses to allocate to individuals, which change over time.
Because an Internet provider has a limited number of public IP addresses, and to get as much out of these public addresses, it uses an address reallocation scheme that takes the IP from idle clients do not use at any given time, to other clients who want to sign in at that time.
This means that if your Internet subscription is based on a dynamic IP, then when you do not use the internet for a while or when the Internet router’s power is lost, your IP address is reallocated to another customer.
In this equation, the elegant solution comes in the form of a small artifact called: DDNS or DynDNS or Dynamic DNS.
DDNS is an online service offered by various sites, an ingenious mechanism that helps you resolve issues caused by changing IP addresses.
A DDNS account will let you create your own domain as a kind of flagpole, a domain that you use in your phone or computer instead of your public IP address.
Every time the IP address changes, the DDNS account takes care to replace the old IP address with the new IP address behind the screen, and you will not even know that the IP address has changed.
By creating a DDNS account on one of the sites offering DDNS services, you will get from the DDNS service provider:
1. a domain name
2. a user which we can choose.
3. a password which, of course, we will choose.
With this information we will go to our router menu at the DDNS section. From that point on, the router will constantly monitor if the IP address changes, and when it changes, the DDNS account will assign the new IP address assigned to our domain.
You must keep in mind that when the DHCP server changes the IP address, it will take some time for the web server to detect it, notify the DDNS server and it will update your database. In other words, your web server will be periodically unavailable for several minutes each time the IP address is changed.
For example, we will configure a router running the DD-WRT mini firmware. Go to the Setup – DDNS menu, select DDNS Service: No-IP.com and fill in the fields.