Koozali.org: home of the SME Server

Zonedit & Dynamic DNS

Andy Taylor

Zonedit & Dynamic DNS
« on: July 24, 2002, 02:33:45 PM »
Hi all,

I dont know about all of you but I like to use Dynamic DNS (Its very cool after all)
I have been using dyndns.org untill very recently, and this works very well, the built in client in e-smith does exactly what it should (with mior tweeking if your domain is not set to your DYNDNS details)

Incase any of you, or e-smith developers etc are interested I have written an update script for Zonedit's Dynamic DNS (they let you use real domains... NICE)

Thanks to word wrap etc.. I will not post it here.. but if anyone wants it.. reply and I can forward it on.

It is not yet fully tested but it should work..

Cheers..
Andy

Tim McCredie

Re: Zonedit & Dynamic DNS
« Reply #1 on: July 24, 2002, 06:07:04 PM »
i'm having some trouble with this right now so I'd appreciate it..

cheers

Tyrone C. Miles

Re: Zonedit & Dynamic DNS
« Reply #2 on: July 25, 2002, 12:50:27 AM »
Yes could you shoot me the script. You should put it up on the how to page so everyone can see it. But can you shoot me a copy at tmiles@teesco.com. Thanks!

Charlie Brady

Re: Zonedit & Dynamic DNS
« Reply #3 on: July 25, 2002, 01:45:52 AM »
Tyrone C. Miles wrote:

> Yes could you shoot me the script. You should put it up on
> the how to page so everyone can see it.

If you want everyone to see it, the place to send it is to us, so that we can put it in the contrib area at ftp.e-smith.org. Please send to contribs@e-smith.com.

Regards

Charlie

Andy Taylor

Re: Zonedit & Dynamic DNS
« Reply #4 on: July 25, 2002, 12:13:13 PM »
Charlie.

The only reason I have not done this yet.. is I need one or two people to try it out first to see if it works corectly and make sure there are no issues.

Later on today I will write a MINI-HOW-TO for updating zonedit.com and put it up on a site so that everone can find it and have a look.

The howto will include a copy of the script and everything that is required.

Tim McCredie

Re: Zonedit & Dynamic DNS
« Reply #5 on: July 25, 2002, 12:42:19 PM »
Andy sent his script to me and whilst it didn't work completely for me, when I used some of bits of his with another that was in an earlier post by Des Dougan I got a functioning result. This is what I did

replaced the custom script in /sbin/e-smith/dynamic-dns with the following using pico



#!/bin/sh

#------------------------------------------------------------
# ZoneEdit IP Update.
#------------------------------------------------------------

IPADDR=$1
USERID=your Zoneedit user id
PASSWD=your Zoneedit password
DOMAIN=yourdomain.com

#------------------------------------------------------------
# Your handler starts here.
#------------------------------------------------------------

wget -O - --http-user=$USERID --http-passwd=$PASSWD 'http://dynamic.zoneedit.com/auth/dynamic.html?host=yourdomain.com'
wget -O - --http-user=$USERID --http-passwd=$PASSWD 'http://dynamic.zoneedit.com/auth/dynamic.html?host=mail.yourdomain.com'

#------------------------------------------------------------
# Your handler ends here.
#------------------------------------------------------------

exit 0

then do

chown root.root custom
chmod 554 custom

make sure SME server is configured to use the Custom option for Dynamic DNS and should work a treat.

Just to point out I used the script from Des and then Andy's suggestions to insert the username, password and domain into the script and the permissions etc. So don't ask me why or how it works as I don't have a clue.  It just works

guck puppy

Zonedit Custom DynamicDNS (update)
« Reply #6 on: October 12, 2002, 02:09:59 PM »
So, here's mine... seems to work ok... (it updates) but as you can see it needs work getting all the Virtual Host information passed to it... I just can't figure how to make e-smith pass a comma sep. list of vhosts...

Also, since this is pretty much a total rip of the dyndns.org script, the results logging needs work - not sure how to parse for the result status as it comes in the form :



Anyone feeling helpful?

G
-----

#!/bin/sh
# Description: ZoneEdit IP Update

#------------------------------------------------------------
# Custom dynamic DNS update handler.
#------------------------------------------------------------

IPADDR=$1
USERID=$2
PASSWD=$3
### When we figure out how to get a comma seperated list of all
### the virtual hosts defined, we can make it into a CSV here
### DOMAIN=$4
DOMAIN=yourdomain1.com,yourdomain2.net,yourdomain3.org

#------------------------------------------------------------
# Your handler starts here.
#------------------------------------------------------------

# This request will set wildcards on, such that *.$DOMAIN will resolve to
# $DOMAIN.  Thus, if your domain is fred.zoneedit.org, www.fred.zoneedit.org
# will resolve as well.

wget -q -O /tmp/zoneedit.log \
http://"$USERID:$PASSWD"@dynamic.zoneedit.com/auth/dynamic.html?\
host="$DOMAIN"

RESULT=cat /tmp/zoneedit.log
case "$RESULT" in
        200*)
            logger -t zoneedit.org "Update at $IPADDR succeeded." ;;
        201*)
            logger -t zoneedit.org "IP Address $IPADDR no change needed." ;;
        703*)
            logger -t zoneedit.org \
                "one of either parameters 'zones' or 'host' are required." ;;
        707*)
            logger -t zoneedit.org "Duplicate updates for the same host/ip, adjust client settings." ;;
        704*)
            logger -t zoneedit.org "Zone must be a valid 'dotted' internet name." ;;
        701*)
            logger -t zoneedit.org "Zone is not set up in this account." ;;
        702*)
            logger -t zoneedit.org "Update failed." ;;
        705*)
            logger -t zoneedit.org "Zone cannot be empty." ;;
esac

#------------------------------------------------------------
# Your handler ends here.
#------------------------------------------------------------

exit 0

Des Dougan

Re: Zonedit Custom DynamicDNS (update)
« Reply #7 on: October 13, 2002, 06:03:43 AM »
My ZoneEdit custom setting looks like this:

#!/bin/sh
# Description: Put your description here

#------------------------------------------------------------
# Custom dynamic DNS update handler.
#------------------------------------------------------------

IPADDR=$1
USERID=$2
PASSWD=$3
DOMAIN=$4

#------------------------------------------------------------
# Your handler starts here.
#------------------------------------------------------------

wget -O - --http-user=$USERID --http-passwd=$PASSWD 'http://dynamic.zoneedit.com/auth/dynamic.html?host=ww2.douganconsulting
.com'
wget -O - --http-user=$USERID --http-passwd=$PASSWD 'http://dynamic.zoneedit.com/auth/dynamic.html?host=mail.douganconsultin
g.com'
wget -O - --http-user=$USERID --http-passwd=$PASSWD 'http://dynamic.zoneedit.com/auth/dynamic.html?host=ww2.douganfamily.org
'
wget -O - --http-user=$USERID --http-passwd=$PASSWD 'http://dynamic.zoneedit.com/auth/dynamic.html?host=mail.douganfamily.or
g'

#------------------------------------------------------------
# Your handler ends here.
#------------------------------------------------------------

exit 0

The "ww2" entries are because I have used ZoneEdit's web forwarding for my dynamic IP address.

The above seems to be working fine, FWIW.

Des Dougan

Micke G

Re: Zonedit & Dynamic DNS
« Reply #8 on: December 10, 2003, 02:19:39 PM »
Hi!

Can you help me with the dynamic update to zoneedit.com?

I need a script to check and update my dns on zoneedit.com every 10 minutes
because i have dynamic ip from my isp!