Weblog entry #4 for JulienV
Hi,
I would like to try and setup my own DDNS system. There are several reasons, going from my wish to be independent from any provider, to the "technical challenge".
Here is the situation:
- a home network with a all-in-one server (web, ftp, svn, mail...), with an ADSL connection, which means a dynamic IP, changed each day,
- a virtual dedicated server (vds) with a confortable bandwith, on which I have root access
Currently, I use hn.org service, and everything is working well: on each IP change, ddclient updates the ip of mydomain.hn.org (and thus mydomain.com).
I have installed bind9 on my vds, and can update a fake zone test.com and can update it with nsupdate (I haven't tried from a remote host, but I guess it should work the same way).
Now, I wonder how I can update my IP from my home gateway: either I choose to use nsupdate through the Internet (with a key as the only security), or I develop a system to send my IP to my vds, which would run nsupdate locally (this involves development, which I'm not fond of).
Are there any other possibilities?
Which is the best solution?
Are there any opensource systems which I could use (I found nothing!!)
Cheers,
Julien
Comments on this Entry
[ Parent | Reply to this comment ]
Hi,
My aim is to not use this kind of prodivers: as stated, I have been using HammerNode for some time now.
I finally decided to use nsupdate and dnssec, which works great (at least for the moment). I configured my DNS server as usual, adding the key and allow-update sections (see http://www.oceanwave.com/technical-resources/unix-admin/nsupdate. html, and use the following script to update my IP:
#!/bin/bash
KEY="/root/Kmykey.+158+14480.private"
SERVER="80.247.xxx.xxx"
ZONE="mydomain.com"
LOGFILE="/var/log/syslog"
if ! $PPP_LOCAL; then
IPADDR="$PPP_LOCAL"
sleep 5
else
IPADDR=$(/sbin/ifconfig ppp0 | awk '/inet/ { print $2 } ' | sed -e s/adr://)
fi
(cat <<EOF | nsupdate -k "$KEY"
server $SERVER
zone $ZONE
update delete mydomain.com A
update add mydomain.com 60 A $IPADDR
send
EOF
RC=$?
if [ $RC != 0 ]; then
echo "$(LANG=C date +'%b %d %X') $(hostname) ddupdate: FAILURE: Updating dynamic IP $IPADDR on $SERVER failed (RC=$RC)"
else
echo "$(LANG=C date +'%b %d %X') $(hostname) ddupdate: SUCCESS: Updating dynamic IP $IPADDR on $SERVER succeeded"
fi
) >>$LOGFILE 2>&1
exit $RC
This script can be called manually or launched automatically through ppp ip-up.
I plan to write a small article about that..
Cheers,
Julien
[ Parent | Reply to this comment ]