Page Nav

HIDE

Grid

GRID_STYLE

How To Get a Static Domain Name in Linux with Free DNS

Introduction If you're making a server, chances are you want your PC to be publicly reachable. The easiest way to do this is u...

Image result for static dns server in ubuntu

Introduction


If you're making a server, chances are you want your PC to be publicly reachable. The easiest way to do this is use a Dynamic DNS service like Free DNS to automatically update DNS records and provide a FQDN.
This example will use an update client called Inadyn, which is available on Linux, but the Free DNS site afraid.org provides examples of update clients for Windows and routers as well.

Steps (6 total)

1
FreeDNS account

Go to the site Afraid.org register for a free account (it's completely free at the time of this How-To). There are many domains and even sub-domains to chose from.
2

Installing the Inadyn client

Open Ctrl+Alt+T to open a terminal window, then at a terminal window type:
On Ubuntu:
sudo apt-get install inadyn
On Fedora:
sudo yum install inadyn
3

Get a direct URL

At the afraid.org website, log into your account, then select DIRECT URL next to your domain name, and in the address bar copy everything to the right of the '?'. Everything you copy is the alphanumeric string you will use in step 4.
4

Edit the Inadyn configuration file

At the command line type:
sudo gedit /etc/inadyn.conf
Then add the following details to the file:
--username <your_username>
--password <your_password>
--update_period 60000
--forced_update_period 320000
--alias <your_host>.ignorelist.com,alphanumeric string
--background
--dyndns_system default@freedns.afraid.org
--syslog
Use your username and password for freedns, and alphanumeric string is the information you copied in step 3.
5

Edit the crontab file to run inadyn

Edit the crontab file in nano (the nano editor is the easiest editor for the beginner):
export EDITOR=nano && sudo crontab -e
Add these lines to the file to run inadyn at reboot and every 5 mins:
@reboot /usr/sbin/inadyn
*/5 * * * * /usr/sbin/inadyn
6

Verify the DNS record is updated

At the command line:
ping -c 3 <your fully qualified domain name>
If you get a response and an ip address, cheer.

No comments