Dynamic DNS - Mapping Changing IP Address to Host Address
In my recent Blog posts, I have been discussing the possibility of hosting a personal or hobby web site on a computer on your home network using BT Broadband and how you will need to configure the BT Home Hub to enable this. In this post I cover the topic of DNS.
DNS is a system that is used to relate Internet available ip addresses to host names (or
Domain Names). All the computers on the Internet actually locate each other by an ip address, which is a series of four numbers separated by periods (dots/full stops). A typical ip address looks like this:
86.150.19.57
Each number between the dots can be a value between 0 and 255 (256 possibilities). The ip address is a unique number for each computer on the Internet and no two computers can have the same address at the same time.
The first issue you have when setting up a web site using your BT Broadband at home is that the ip address that your network has assigned to it can change. This means that you cannot directly use it to access your network (and the web server you have hosted on it) from the Internet consistently. Internet Service Providers (ISPs) used to offer home users what is known as a static or fixed ip address (one that never changes), but I don't believe this is an option any longer.
Out of interest, to see your current (outward facing) Internet ip address, you can use a look-up service on the web. I normally use something like
whatismyip.com or
www.whatsmyip.org to check mine. When you visit one of these web pages you will get feedback, along the lines of "
Your IP Address is 86.150.19.57" displayed in your web browser.
|
whatsmyip.org - Your IP Address Is |
A way of dealing with this problem (of changing ip addresses) is by using a Dynamic DNS service. I think of the DNS a little bit like a directory (of ip addresses, as opposed to telephone numbers) for computers on the Internet, and the look up to allow humans to find the right computer easily is by using a host name or Domain name. Even if the ip address you had on your network never changed, it still wouldn't be an easy thing to remember or give out to other people. Whereas a domain name, say something like
www.google.com is pretty easy to remember and pass on to other people.
For my hobby web site I use the domain name
www.waltonledale.co.uk, which I registered with a domain name company called
Easily.co.uk. It's not necessary to have your own domain name for your own web site, as the Dynamic DNS services will generally offer a free sub domain to use. However, if it's your own web site then for the relative inexpensive cost (normally around £10 to register a domain for 2 years) it's nice to have your own personal domain name. For more about
getting a Domain Name, please see me related Blog post:
Acquiring and configuring a Domain Name
I have always historically used a Dynamic DNS service called
freedns.afraid.org. This
FREE DNS Service allows you to map your domain name to the ip address that your network currently has on the Internet and more importantly has methods available to dynamically change the value when your ip address is changed by you ISP. This means that the link between your domain name and your periodically changing ipn address is never lost. The BT Home Hub, also have some inbuilt settings for controlling Dynamic DNS, but unfortunately the
freedns.afraid.org service that I use is not currently one of the supported ones.
To have a look at the available options on your BT Home Hub, you need to explore the "Advanced Settings" on your BT Home Hub Manager control panel. The option is a link at the right of the blue panel, under the main menu tabs.
|
BT Home Hub Manager - Advanced Settings |
The BT Home Hub Manager control panel will ask for confirmation that you are really intending to modify the Advanced Settings on a separate page. Here there is a button stating "Continue to Advanced Settings" that needs to be clicked to continue.
|
BT Home Hub Manager - Continue to Advanced Settings |
Once you have successfully entered into the Advanced Settings, you need to select the "Broadband" option. This will then give access to specific settings for your Dynamic DNS.
|
BT Home Hub Manager - Broadband Option in Advanced Settings |
Once you have located the appropriate page in the BT Home Hub Manager's Advanced Settings. There is an option to enable Dynamic DNS. I have not done this. As previously stated, I used a service that is not currently supported to I have to use a slightly different system to keep my domain name dynamically updated to the correct ip address.
|
BT Home Hub Manager - Advanced Settings > Dynamic DNS |
For more information about using the
Dynamic DNS options on your BT Home Hub, please see the following page. There is a section on the page entitled "How to: Get a fixed IP address for your Home Hub", which gives a bit more information, but unfortunately not in any great detail:
http://www.filesaveas.com/bthomehub_howto.html
My understanding is that the following free Dynamic DNS services are currently supported by the BT Home Hub:
However, you may find this to be different when you investigate on your own Home Hub. There are still several versions of the BT Home Hub being used by BT customers. I have currently got the 3.0 version, but I believe that there may also be v1.0, v1.5 and v2.0 being used by some people. I previously had the version 1.0 device and using the method described below was able to successfully configure Dynamic DNS.
To use a Free Dynamic DNS updating service that is not supported by your BT Home Hub, such as
freedns.afraid.org, you need to configure the settings directly on their web site and then ensure (if you are using your own Domain Name) that you have updated the DNS settings for the domain record accordingly. More about the domain configuration can be see in my Blog post
Acquiring and configuring a Domain Name.
If you visit the web pages of the Free Dynamic DNS updating service, such as
freedns.afraid.org, you will be able to add your own domain to the list of ones you control on you own account after creating a free account. You will be able to add more domain names in the future if you require them, and you will also be able to create more web site addresses from your domain using something called "
Sub Domains".
I currently have a number of sub domains configured on the FREE DNS service, that I use for other web sites related to my main one without necessarily having to got out and purchase more domain names. A sub domain is anything before the personal domain name you have purchased within the given top level domain.
e.g. My domain is waltonledale (for my hobby site) within the .co.uk top level domain. I have used the naturally assumed sub domain "
www" for my main web site, but I have configured other ones, such as
capitolcentre,
cycling,
foodanddrink,
new and
old etc. for use on other web sites.
Within the domain name system it is important that you use something known as the 'A' record to give instructions about the ip address where your web site will be hosted. This will change from the initial setting, but that is something that will be controlled by another process after you initial set up. The type 'A' domain record is used to point a Sub Domain (
subdomain.domain.com) to a hard coded IP Address. This is the most direct and straight forward option, also it is important to note that any change you make in the FreeDNS program is reflected on the Internet and made live immediately. The only way you will not see immediate results is if you have cached a query on your computer by looking it up PRIOR to configuring it in the FreeDNS program.
The initial set up of the 'A' record will set something called the "Destination" ip address and whilst it will not always be the same in the future. The FREE DNS web site can be used to display and update the current settings.
Once everything is configured correctly with the Dynamic DNS service, unless it is one that is currently directly supported by the BT Home Hub, you'll need to consider how to inform (using software - although can be done manually) the DNS servers each time your ip address changes.
I have been using an application, which runs as a service on my web server, to up
freedns whenever the ip address is changed. It was fairly straightforward to install and configure. This software was also free and is called
Afraid Updater Service 4.
Afraid Updater Service 4
Afraid Updater Service is a free client software develop for the free DynamicDNS service offered by Afraid.org and runs on Windows (XP/2003/VISTA/2008/7). It is created using the Microsoft .NET Framework 4 technology. This means to use it, you will need to ensure that you have the
.Net Framework version 4 installed on your server. Afraid Updater Service 4 has the following features:
- Will work on Windows XP, Windows 2003, Windows Vista, Windows 7 and Windows 2008.
- Sends Email Alerts via SMTP for critical events
- Has Advanced Event Logs
- Configurable Task Delay and Application priority
- Easy XML Configuration
- Really small application and uses very little no memory
- Works in Service Mode
- ...and last, but not least, it is free!
When installed you will have access to a configuration control panel application and the, as stated before, the updater will then actually run as a
Windows Service in the background. It's important that the service restarts when the computer (your web server) is rebooted. The software can also be configured to send you and email (even to web mail accounts, such as gmail or hotmail etc.) when the ip address has been updated, or there are any issues.
|
Afraid Updater Service 4 - Runs as a Windows Service |
Once the software is installed, you will need to log in to your FreeDNS account in the updater configuration program (a separate thing to the service) using your FreeDNS log-on credentials and configure at least one of your sub domains. There is a feature to link all sub domains to be updated together, so you don't have to worry about setting it up more than once as each time the ip address is updated for one of your sub domains all the sub domains originally on the same ip address will be changed at the same time. There is a useful video about how to configure the application.
It's important that the set up of your Free DNS account is working properly first (on the freeDNS web site -
freedns.afraid.org) before you try and configure this updater software. Reading the Blog post about
getting a Domain Name first will be useful (even if you are not using your own domain name), as it explains about how to make sure that the DNS Name Servers are set up correctly. They will vary dependant on which Dynamic DNS Service you use, but the ones for FreeDNS (
freedns.afraid.org) are as follows:
- Nameserver 1 - ns1.afraid.org
- Nameserver 2 - ns2.afraid.org
- Nameserver 3 - ns3.afraid.org
- Nameserver 4 - ns4.afraid.org
For more information about other aspects of setting up and hosting a web site at home on BT Broadband using the BT Home Hub, please see the following Blog posts: