DDNS Shell Script

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.

 

#!/bin/sh
#
# dnsmadeeasy-update.sh
#
# 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
DMEUSER=<username>

# This is your password
DMEPASS=<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 https://cp.dnsmadeeasy.com/servlet/updateip?username=$DMEUSER\&password=$DMEPASS\&id=$DMEID\&ip=$IPADDR | grep success > /dev/null; then
logger -t DNS-Made-Easy -s "DNS Record Updated Successfully"
else
logger -t DNS-Made-Easy -s "Problem updating DNS record."
fi



Attachments  
 
 dnsmadeeasy-update.tar.gz (1.07 KB)
  • dyn dns, dynamic dns, dnsmadeeasy
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

THE WEB IS 20YR OLD (2013)

The World Wide Web is 20 years old today By Sebastian Anthony on April 30, 2013 at...

Domain Registration V Hosting Comparison

A domain name refers to the name or identification label for your business on the internet. The...