Why we need this? Well you don’t really need this if you are using static IP.
But if you have dynamic IP, you must keep your IP updated with the domain you choose in DynDNS.com or no-ip.com every time you restart the router. Otherwise, the visitors can’t reach to your server.
apt-get update && apt-get install inadyn
or you can download inadyn:
cp inadyn/bin/linux/inadyn /usr/bin/inadyn
Change the file permission:
chmod 755 /usr/bin/inadyn
Configuration file for inadyn:
In the inadyn.conf file must look something like as shown below:
## inadyn configuration file
# Check for a new IP every 600 seconds
# How often the IP should be updated even if it is not changed
#forced_update_period 600 (not recomended to be used)
# DynDNS username and password here
#An optional DNS service. For http://www.dyndns.org the acceptable services are one of email@example.com, firstname.lastname@example.org.
## Dynamic DNS hosts
#A host name alias.
alias your-choice.dyndns.info …etc
#run in background
#The name, including the full path, of a log file.
Now set inadyn to start every time the system rebooted:
In the crontab, add this: