Using Dynamic DNS server with HE.net

For those who have a second level domain and are using or would like to use the Dynamic DNS (refer to DDNS below) service, they should often find that the free DDNS service does not cover enough number of hostnames (A records). The only way out was to pay extra for additional hostnames or to build their own DNS servers to support DDNS services.

I am having the same problem today as well. I have more than 5 devices that needs to be able to remote access to when I m on the road, and the DDNS providers requires me to pay extra for additional supporting devices. In my low budget case, I have found an alternative way to solve this problem, which is to go for the free DNS service from Hurricane Electronic.

For those who have been working on the internet, the name of Hurricane Electronic (refer to HE below) should not be new to them. But for those who have never heard of this name, HE is a service provider providing transit service (internet), colocation services, hosting services, IPv4 to IPv6 tunneling service and etc.. He is currently offering a new free DNS service to public.

Readers might have a question of why choosing HE when there are many DNS service provided in the market, so what is so special about the free DNS service from HE? The beauty of HEs DNS service provides a DDNS service as well to allow unlimited records in the Zone file, which also means there could be up to unlimited of the hostnames (A records) for DDNS purpose. One of the best parts for this DDNS service in the security point of view, each DDNS records can be assigned with a unique password for IP address update. This could prevent a single password leak from a compromised DDNS device and causing a serial of DDNS devices to renew the same password when most of the DDNS services are using the registered account as the username and password.

The concept behind this low budget solution is listed in the graph below using my own domain name.

HE_DDNS_service

1. To create a 3rd level domain from my second level domain and bind this 3rd level domain to HE.net by assigning this domain name to the name server of HE.net. (This needs to be done at the name server of the second level domain)

1.1 For instance, I have created NS records for ddns.ajpcservices.com with the following at the second level domain zone file:

ddns.ajpcservices.com            NS   ns5.he.net
ddns.ajpcservices.com            NS   ns4.he.net
ddns.ajpcservices.com            NS   ns3.he.net
ddns.ajpcservices.com            NS   ns2.he.net
ddns.ajpcservices.com            NS   ns1.he.net

2. Create an account for the free DNS service from HE.

2.1 First go to https://dns.he.net/

2.2 New subscribers can register themselves an account by clicking the “Register!” button. Go through the registration process and HE.net will send an email for validation. Once the validation is completed, login to the account.

2.3 After login to the account, click to “Add a new domain” on the left hand side of the column. Type in the 3rd level domain, ddns.ajpcservice.com in my case, and click “Add Domain!” button.

01-add_domain

2.4 Under the Zone Management tab click on “Edit Zone” icon to edit the zone file of the 3rd level domain.

02-editzone

3. Add a new hostname by clicking the “New A” button.

3.1 Fill in the hostname and check “enable entry for dynamic dns”, and leave the TTL to 5 mins for record update. IP address will be filled in based on the IP address accessing to web page. Clicks submit after everything is filled. Without checking the “enable entry for dynamic dns” box will not be able to update the dynamic ip address via the DDNS clients (we will mention it later).

03-add_record

4. Submitting the record will create a new A record as shown below. Now, click on the icon that is circled in red to update the password for DDNS service. The password will be used to update the DDNS record.

04-set_password

04-set_password-02

5. We could verify the 4th level domain record by typing “ping user01.ddns.ajpcservices.com” and it should show 1.1.1.1 in my case. It should have different IP address shown when pinging your new 4th level domain.

05-verify

6. If the 4th domain name can be resolved, then we will move to updating the DDNS function.

6.1 In my case, i will be using Linux and curl to demo the update in this example, this is the same concept of using other DDNS clients, such as ddclient, as long as the correct information are filled. Although this sample is using http for update, the best practice would be using https for security reason.

curl “http://dyn.dns.he.net/nic/update?hostname=user01.ddns.ajpcservices.com&password=haha12345&myip=192.168.0.1”

The hostname is the 4th level domain name, in my case, it will be user01.ddns.ajpcservices.com.
The password is the info filled in step 4, which is “haha12345” in my case (without the bracket).
06-ddns-verify-02-http

The command has come up with the “good 192.168.0.1” at the last line, and this is the response from the HE.net server update the IP address of the A record successfully.

Once the record is updated via the DDNS client, the IP address of the 4th level domain at HE.net will be updated as well as shown below.

06-ddns-verify


Since this post is based on my setup and structure, some changes might needa applied to suit differen environments. If there are any questions or problems regarding to this post, please kindly let me know and I will fix it asap.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s