Difference between revisions of "Coral: dtdns detail"

From The Uniform Server Wiki
Jump to navigation Jump to search
(Created page with "<div id="top" style="margin:0;padding: 0px 0px 0px 5px; color: #000; background-color: #FFFFEB; border: 1px solid darkslateblue;"><span id="top" style="margin:0;padding: 0px;font...")
(No difference)

Latest revision as of 13:48, 12 November 2011

DtDNS - Detail

How to simulate static IP address for running a web server when your service provider allocates IP address dynamically.

UniServer 8-Coral
  Quick Start
  Db Backup
  Main Index


The majority of domestic Internet connections are via a dynamic IP address, one that can change every time you connect to the Internet. A web server requires a static IP address. A free dynamic DNS service such as DtDNS provides accounts and tracking software to automatically update your IP address when it changes, creating the effect of a static IP address. This is an alternative to purchasing a static IP address from your ISP (Internet service provider). Even with a static IP, you require an entry in a DNS server that converts your domain name into this IP address, allowing other users to access your server.

DtDNS provide accounts that allow you to obtain a domain name, and provide tracking software to automatically update your IP address when it changes. A big advantage of their free service is that they automatically enable wild cards by default. This means that names like <whatever>.fred.com will be mapped to your IP address.

The Uniform Server supports the DtDNS service by integrating a simple script to automatically update hostname IP address at DtDNS. The script is configurable, allowing you to update all five free hostnames. The script can optionally be run by Cron, making the whole task transparent.

Note: The script is portable, so putting the servers on a USB memory stick means you can have them on-line and accessible within ten minutes (the minimum DNS propagation time). Of course this assumes the PC host machine has been configured to allow Internet server traffic.


Edit DtDNS Accounts

Uniform Server DtDNS is configured via a configuration file dtdns.ini. This has been pre-configured with three accounts you can add as many accounts as you like, each must have a unique account name.

You can open this configuration file in one of two ways either using UniController or directely.

UniController: Open file as follows:

Server Configuration > DtDNS > Edit DtDNS Accounts

Directly: Open the following file in notepad or other suitable text editor: UniServer\uni_con\dtdns_updater\dtdns.ini


For each account you wish to update at DtDNS add a block with the following format:

[account_1] - A unique name enclosed in square brackets. Can be any name you wish do not include spaces.
hostname = - Full host name as configured at DtDNS
password = - Your DtDNS account password

An extract from the configuration file (dtdns.ini) is shown on the right.

  • Add as many blocks as required.
  • To use the examples uncomment (remove the ;) and substitute your data as appropriate.

;hostname = books.effers.com
;password = fred123

;hostname = books.effers.net
;password = fred123

;hostname = books.dtdns.net
;password = fred123

;=== END Config ==================



You can use either one of two methods to force a DtDNS update.

Method 1:

Easiest way to force a DtDNS update is to use UniController:

Server Configuration > DtDNS > Force DtDNS UpDATE


Method 2:

Alternately you can directely run the script using:


Either method runs the Uniform Server DtDNS update script. A conformation pop-up is produced "DtDNS was manually updated View log for details."


Enable Log

Logging is enabled by default you can turn logging off using this menu option. The DtDNS script is open in Notepad.

Server Configuration > DtDNS > Enable Log

To disable logging change the following line as shown:

  • logging = false

Extract from script (dtdns_updater.vbs) is shown on the right.

'*** User configuration *****************************************

 logging = true   'true  = Enable logging false = disable logging
 test    = false  'true  = display IP address and host names
                  'false = no display

'************************************** End User configuration ***

Note: Alternative is to directely edit the script UniServer\uni_con\dtdns_updater\dtdns_updater.vbs


View Log

Server Configuration > DtDNS > View Log

This menu option displays the DtDNS log file in Notepad. Each updater run produces an entry in the log file. An example of one run is shown on the right.

18/07/2011 22:42:18 ### Log Started =========================================
18/07/2011 22:42:25 Changed IP from: xx.x10.165.92 To xx.x10.160.158 books.dtdns.net
18/07/2011 22:42:31 Changed IP from: xx.x10.165.92 To xx.x10.160.158 books.effers.com
18/07/2011 22:42:36 Changed IP from: xx.x10.165.92 To xx.x10.160.158 fredxx.dtdns.net
18/07/2011 22:42:36 ### Log Ended ===========================================

Note: Log file location UniServer\uni_con\dtdns_updater\dtdns.log


Enable in CRON

Every time you start your PC and reconnect to the Internet (given a new IP address) you need to manually run the DtDNS updater.

Remembering to manually run scripts like DtDNS becomes a chore. Uniform Server centralises running this type of script using portable Cron. Cron is started either manually (portable) or run as a service. It periodically executes a list of scripts; the DtDNS script is included and requires enabling as follows:

You can open Cron configuration file in one of two ways either using UniController or directely.

UniController: Open file as follows:

Server Configuration > DtDNS > Enable in CRON

Directly: Open the following file in notepad or other suitable text editor: UniServer\uni_con\cron\cron.ini


  • Locate section shown on right
;start  = 2011-04-7 13:20:00  
;period = 600                 ; 10 Mins as required by DtDNS
;path   = C:\UniServer\uni_con\dtdns_updater\Run_dtdns_updater.bat
;ref    =
  • Un-comment four lines as shown on right.

Enables pre-configured DtDNS section.

start  = 2011-04-7 13:20:00  
period = 600                 ; 10 Mins as required by DtDNS
path   = C:\UniServer\uni_con\dtdns_updater\Run_dtdns_updater.bat
ref    =


Where to go next

DtDNS - Introduction
Create DtDNS Account
Run Cron as a program
Run Cron as a service