Reference Manual

HOW TO use Dynamic DNS Services.

If you connect to the Internet via a service that gives your machine a variable IP address, then various dynamic DNS binding services can be used so that your machine remains reachable from the Internet via a given DNS name:

All dynamic DNS binding services have in common that your machine can be reached via a name on the domain of the dynamic DNS service provider, or via a name on some associated domain.

Whenever your IP address changes, the IP address associated with that name must be updated.

Some dynamic DNS service providers use the DDNS Version 3 protocol to update DNS Resource Records, others use an HTTP-based approach.

NAT32 supports a ddns3 command for the DDNS service that is documented here.

NAT32 also supports a url command that can be used to submit any desired URL to a Web Server.

Another way of solving the dynamic DNS binding problem without using a third-party service provider is described here.

Note that when a DUN connection is established, the file connect.txt is executed. When the connection is closed, the file disconnect.txt is executed. When a DHCP-configured interface changes its IP address, the file change.txt is executed. Those three files can be found in your NAT32 directory. They may be modified to suit the needs of the dynamic DNS provider.

Sample DynDns Script

The following TCL script (file ddns) can be executed by adding the command: ddns fqdn $3 to your connect.txt or change.txt script. Argument fqdn stands for the fully qualified domain name (e.g. xyz.dyndns.org) to be updated. Argument $3 indicates that the script is to use the 3rd variable from its caller. When NAT32 executes the connect.txt or change.txt script, that 3rd argument is the IP address of the new connection.

If your machine has more than one Internet connection, the following command can be added to the disconnect.txt script so that the name binding is invalidated when a dial-up connection terminates: if minifs ddns fqdn 127.0.0.1.

#!tcl

#
# Update a DYNDNS.ORG entry
#
# Usage: update fqdn ip
#
# Note: edit the usercode and password variables
#

# Check args

if {$argc != 2} {
    error "Usage: ddns fqdn ip"
}

# Get args

set fqdn     [lindex $argv 0]
set ip       [lindex $argv 1]

# Set the usercode and password here

set usercode "usercode"
set password "password"

# Send the needed GET request

set request "http://$usercode:$password@members.dyndns.org/nic/update?hostname=$fqdn&myip=$ip&wildcard=NOCHG&mx=NOCHG&backmx=NOCHG"

set response [exec "url \"$request\""]
echo "DynDNS: $response"

SEE ALSO

ftp, httpget, url
Edit this page