If you are behind NAT, that means your WAN interface has PRIVATE IP address. That causes this complicate scripts to not work, because they depend on address, assigned directly to your port.
You need to update your dynamic hostname with your PUBLIC address.
According to DynDNS guide the syntax of the update "command" is as follows:
http://username:password@members.dyndns.org/nic/update?hostname=yourhostname&myip=ipaddress&wildcard=NOCHG&mx=NOCHG&backmx=NOCHG
"myip" is the parameter, which is responsible to provide actual address. The good part is, that if you skip it, the DynDNS server will guess the address, based on request source address. Thus it will assign your PUBLIC address to your host.
In short the request should be:
http://username:password@members.dyndns.org/nic/update?hostname=yourhostname&wildcard=NOCHG&mx=NOCHG&backmx=NOCHG
Here is a short script:
# Define User Variables
:global ddnsuser "DYNDNSUSER"
:global ddnspass "DYNDNSPASS"
:global ddnshost "DYNDNSHOST"
:log info "DynDNS: Sending UPDATE!"
:local str "/nic/update?hostname=$ddnshost&wildcard=NOCHG&mx=NOCHG&backmx=NOCHG"
/tool fetch address=members.dyndns.org src-path=$str mode=http user=$ddnsuser password=$ddnspass dst-path=("/DynDNS.".$ddnshost)