Knowledgebase: DDNS
DDNS Shell Script
Posted by Devon Roberts on 26 June 2012 02:23 PM

This is an example of a Dynamic DNS Shell Script for DDNS IP updates.


# This script updates Dynamic DNS records on DNE Made Easy's
# DNS servers. You must have wget installed for this to work.
# This script is released as public domain in hope that it will
# be useful to others using DNS Made Easy. It is provided
# as-is with no warranty implied. Sending passwords as a part
# of an HTTP request is inherently insecure. I take no responsibilty
# if your password is discovered by use of this script.

# This is the e-mail address that you use to login

# This is your password

# This is the unique number for the record that you are updating.
# This number can be obtained by clicking on the DDNS link for the
# record that you wish to update; the number for the record is listed
# on the next page.
DMEID=<record number>

# Obtain current ip address
IPADDR=`ifconfig eth0 | grep inet | awk '{print $2}' | awk -F : '{print $2}'`

if wget -q -O /proc/self/fd/1$DMEUSER\&password=$DMEPASS\&id=$DMEID\&ip=$IPADDR | grep success > /dev/null; then
logger -t DNS-Made-Easy -s "DNS Record Updated Successfully"
logger -t DNS-Made-Easy -s "Problem updating DNS record."

 dnsmadeeasy-update.tar.gz (1.07 KB)