Das ist ein einfach nutzbarer Dynamic DNS Server unterhalb der Zone dyn.shackspace.de.
Die Aktualisierung des Eintrags geschieht ganz einfach ueber den Aufruf der URL
http://shackspace.de/dyn?digest=md5sum(HOSTNAME:AUTH)
Es wird die absendende IP-Adresse eingetragen, das gilt gleichermassen fuer IPv6 & und IPv4.
Wenn man den Parameter &ip=xxxx angibt, wird diese Adresse eingetragen:
Zugangsdaten gibt's bei admin at, bitte Rechnernamen angeben, Auth-Code kommt zurueck.
Beispiele:
wget -O /dev/null http://shackspace.de/dyn?digest=$( echo -n HOSTNAME:AUTH | md5sum | awk '{print $1}' )
wget -O /dev/null http://shackspace.de/dyn?digest=$( echo -n HOSTNAME:AUTH | md5sum | awk '{print $1}' )?ip=127.0.0.1
wget -O /dev/null http://shackspace.de/dyn?digest=$( echo -n HOSTNAME:AUTH | md5sum | awk '{print $1}' )?ip=offline
Der Dienst ist nicht besonders gesichert, er kann mit SSL verwendet werden werden:
Beispiele:
wget -O /dev/null --no-check-certificate https://shackspace.de/dyn?digest=$( echo -n HOSTNAME:AUTH | md5sum | awk '{print $1}' )
wget -O /dev/null --no-check-certificate https://shackspace.de/dyn?digest=$( echo -n HOSTNAME:AUTH | md5sum | awk '{print $1}' )?ip=127.0.0.1
wget -O /dev/null --no-check-certificate https://shackspace.de/dyn?digest=$( echo -n HOSTNAME:AUTH | md5sum | awk '{print $1}' )?ip=offline
angelegt:
// dynamic zone "dyn.shackspace.de" w/ nsupdate & dyn
include "/etc/bind/dyn-key.key";
acl "update-dyn" {
key dyn-key;
};
zone "dyn.shackspace.de" {
type master;
file "/etc/bind/dyn.shackspace.de.";
allow-update { update-dyn; };
allow-transfer { xfer-allowed; };
};
// "dyn.shackspace.de" END
rndc reconfig
rndc reload
HOST=dyn
KEYNAME=$HOST-key
dnssec-keygen -a hmac-md5 -b 256 -n host $HOST
awk '/^Key: / { k = $2; exit }
END {
print "key \"'"$KEYNAME"'\" {";
print "\talgorithm hmac-md5;";
print "\tsecret \"" k "\";";
print "};";
}' K$HOST.+*+*.private > $KEYNAME.key
rm K$HOST.+*+*.{key,private}
chmod g+w /etc/bind
/etc/bind/shackspace.de.
dyn IN A 141.31.176.214 dyn IN AAAA 2001:7c0:e701:800::214 dyn IN NS ns.shackspace.de. dyn IN NS perl.opsec.eu.
rndc reload shackspace.de wget http://www.fischglas.de/software/dyn/dyn -O /var/www/shackspace.de/htdocs/dyn chmod 755 /var/www/shackspace.de/htdocs/dyn DOMAIN=shackspace.de mkdir /etc/dyn cat > /etc/dyn/dyn.cfg << EOF DNS.Host: 127.0.0.1 DNS.Key: (secret aus /etc/bind/dyn-key.key ) DNS.Key.Name: dyn-key Authfile: /etc/dyn/dyn.$DOMAIN.auth NSUpdate: /usr/bin/nsupdate Debug: 0 EOF cat >> /etc/dyn/dyn.$DOMAIN.auth << EOF test.dyn.$DOMAIN:$(apg -n 1) EOF # fuer nsupdate: aptitude install dnsutils
/etc/apache2/sites-available/20-shackspace.de.conf
ScriptAlias /dyn /var/www/shackspace.de/htdocs/dyn
/etc/apache2/sites-available/px4.shackspace.de
RewriteCond %{HTTP_HOST} '^shackspace.de'
RewriteCond %{QUERY_STRING} ^digest=[0-9a-f]{32}$
RewriteRule ^/dyn$ http://web01.v6.shackspace.de/dyn?%{QUERY_STRING}&ip=%{REMOTE_ADDR} [P,L]
/etc/lighttpd/20-shackspace.de.conf
cgi.assign = ( "/sopen" => "",
...
"/dyn" => "",
...
/etc/init.d/lighttpd reload