Local-only Dynamic DNS [beta]

ambo

Expert Member
Joined
Jun 9, 2005
Messages
2,685
Reaction score
19
Location
JHB
The dynami dynamic DNS service is actually still only in BETA but it seems that it has been quite heavily used during the WebAfrica local-only trial ;)

It is a dynamic DNS update server working on the same protocol as DynDNS. This means that most DynDNS clients should work with the service. It is however running on a local South African server so your updates will still work with local-only ADSL accounts.

I'm interested in feedback:
So far the service has been tested with the ddclient app under Ubuntu and the ez-ipupdate daemon that is included in openWRT.

Below is a script for doing updates from a Mikrotik Routerboard.
Code:
# Enter your account details below
##################################################

:global dynamiUser "username"
:global dynamiPass "password"
:global dynamiHost "full.host.name"
:global dynamiInterface "interface_name"

##################################################
:global dynamiLastIP
:if ([ :typeof $dynamiLastIP ] = nil ) do={ :global dynamiLastIP "0" }
:local dynamiSystem ("mt-" . [/system package get system version] )
:local dynamiIP;
:set dynamiIP [/ip address get [/ip address find interface=$dynamiInterface] address]; 
:for Countr from=( [:len $dynamiIP] - 1) to=0 do={:if ( [:pick $dynamiIP $Countr] = "/") do={:set dynamiIP [:pick $dynamiIP 0 $Countr] }}; 
:if ([ :typeof $dynamiIP ] = nil ) do={
   :log info ("DynamiDNS: No ip address present on " . $dynamiInterface . ", please check.")
} else={
  :if ($dynamiIP != $dynamiLastIP) do={
    :log info "DynamiDNS: Sending UPDATE!"
    :local str "nic/update?hostname=$dynamiHost&myip=$dynamiIP&wildcard=NOCHG&mx=NOCHG&backmx=NOCHG"
    /tool fetch host=update.dynami.co.za address=update.dynami.co.za src-path=$str mode=http user=$dynamiUser password=$dynamiPass dst-path=("/Dynami.".$dynamiHost)
    :delay 1
    :local str [/file find name="Dynami.$dynamiHost"];
    /file remove $str
    :global dynamiLastIP $dynamiIP
  }
}
 
Last edited:
The dynami dynamic DNS service is actually still only in BETA but it seems that it has been quite heavily used during the WebAfrica local-only trial ;)

I'm also working on a script for doing updates from a Mikrotik Routerboard.

My script 'seems' to work, there are no errors on the Mikrotik side but the IP is not updated.

What next?
 
My script 'seems' to work, there are no errors on the Mikrotik side but the IP is not updated.

What next?
Would you like to post your script for us to have a look at?
Also remember that it takes up to 10 minutes from your update to reach all DNS servers. (or longer if you ISP is mangling their DNS :sick:)
 
Code:
:global lddnsuser "myusername"
:global lddnspass "myuserpassword"
:global lddnshost "myddns.dd.dynami.co.za"
:global lddnsip
:global lddnslastip [:tostr [:resolve $lddnshost] ]
:if ([ :typeof $lddnslastip ] = nil ) do={ :global lddnslastip "0" }
:global lddnsinterface "adsl_loc"
:global lddnssystem ("mt-" . [/system package get system version] )

:local int

:local lddnsipfn [ /ip address get [/ip address find interface=$lddnsinterface ] address ]
:global lddnsip [:pick $lddnsipfn 0 [:find $lddnsipfn "/"]]

:if ([ :typeof $lddnsip ] = nil ) do={
:log info ("DDNS: No ip address present on " . $lddnsinterface . ", please check.")
} else={

:if ($lddnsip != $lddnslastip) do={

:log info "DDNS: Sending ADSL Local UPDATE!"
:log info [ :put [/tool dns-update name=$lddnshost address=$lddnsip key-name=$lddnsuser key=$lddnspass ] ]
:global lddnslastip $lddnsip

} else={
:log info "DDNS: No ADSL Local update required."
}

}

NB. the 'l' in lddns* stands for local so I can differentiate various global variables.

So in another script, I use iddns* for my iburst connection.

This is a modified script from changip.com though so I may have incorrect statements.
 
This is a modified script from changip.com though so I may have incorrect statements.
ChangeIP.com uses a different protocol and unfortunately that script won't work with DynamiDNS. I've finished testing my script and added to my first post. Please test and give feedback.
 
I've finished testing my script and added to my first post. Please test and give feedback.

Works like a charm!

Well done and thanks.

The update was almost instant.
 
Works like a charm!
Glad to hear it :D

Been doing some testing with pfSense. Unfortunately this requires a one line hack of the source code - but it works like a bomb when its done.

I don't have a working IPcop at the moment - anyone want to give it a bash? I'm also interested in hearing which other platforms you guys would like supported.
 
any windows applications yet that can update my IP?
ddclient apparently works under windows - you just need to install perl first. I'm not sure which other windows clients people commonly use - let me know and i'll try to test them.
 
Willing to try this out on Smoothwall.

One question - the updated DNS will allow for overseas access if the adsl account in use can browse international?
 
Do you have an example config for ddclient?
Dynamic DNS Update Client
The recommended method for updating the dynamic IP of your host is through a Dynamic Update client. Any DynDNS client that supports custom server names can be used. The following server must be used for Dynami updates:
Code:
update.dynami.co.za

The ddclient tool is recommended for dynamic updates. The following config should be used:
Code:
login=your-login # your dynami.co.za username
password=your-password # your dynami.co.za password

## This section requires no changes unless you need to set a default proxy server
## or you need to bypass your proxy server (because it interferes with the updates)

protocol=dyndns2 # default protocol
server=update.dynami.co.za # default server

## Dynamic DNS hosts go here
#your-dynamic-host.dd.dynami.co.za
 
One question - the updated DNS will allow for overseas access if the adsl account in use can browse international?
Yes - the DNS servers are globally visible. The update server is also actually globally visible but I would prefer if it was only used by South Africans since it costs a lot to host :)
 
Dynamic DNS Update Client
The recommended method for updating the dynamic IP of your host is through a Dynamic Update client. Any DynDNS client that supports custom server names can be used. The following server must be used for Dynami updates:
Code:
update.dynami.co.za

The ddclient tool is recommended for dynamic updates. The following config should be used:
Code:
login=your-login # your dynami.co.za username
password=your-password # your dynami.co.za password

## This section requires no changes unless you need to set a default proxy server
## or you need to bypass your proxy server (because it interferes with the updates)

protocol=dyndns2 # default protocol
server=update.dynami.co.za # default server

## Dynamic DNS hosts go here
#your-dynamic-host.dd.dynami.co.za

Thanks, that's all fine except it says UNABLE TO OBTAIN IP ADDRESS - it needs a web url to get its ip address from, do you have one on dynami.co.za? I cant use the regular international dyndns one because it will get my international IP not my local only one.
 
Thanks, that's all fine except it says UNABLE TO OBTAIN IP ADDRESS - it needs a web url to get its ip address from, do you have one on dynami.co.za?
Are you running ddclient on the same machine that is dialing your connection or on one of the machines behind a router?

The best would be to have ddclient obtain the IP address directly from the PPPoE connection rather than trying to learn it from the web lookup server which can be inaccurate. The 'use=' config option allows you to query a local interface for its address or even interrogate a number of common routers - http://sourceforge.net/apps/trac/ddclient/wiki/Routers
 
hi

im on windows... cant seem to find a dyndns client dyndns has in inhouse 1... doesnt support custom servers.. any suggestions?

http://www.dynami.co.za/update.php?key=<key>d&host=all doesnt work... says 404 on update.php

am i doing something wrong?
 
Top
Sign up to the MyBroadband newsletter
X