Sunday, October 25, 2015

Run your own DynDNS server on Debian Linux

This outline assumes you own your own domain and manage the DNS servers running Debian Wheezy or Jessie with:

  • bind9 for DNS
  • lighttp for webserver
  • php5
apt-get install bind9
 - configure your zone.

apt-get install lighttp php5-cgi

Configure SSL:
 lighty-enable-mod ssl
 openssl ...


Configure authentication:
 lighty-enable-mod auth
 echo username:realm:`md5sum password | cut -b -32` >> /etc/lighttpd/.htpasswd/htdigest.user
Enable PHP:
 lighty-enable-mod fastcgi
 lighty-enable-mod fastcgi-php

Configure Virtual Hosting:
 lighty-enable-mod simple-vhost
 mkdir -p /srv/yourdomain.com/htdocs/update

Copy nsupdate.php from:
 https://github.com/chip-rosenthal/web-nsupdate

Modify the nsupdate.php:
 nsupdate -l

Allow www-data to read the session key to perform updates:
 chgrp www-data /var/run/named/session.key
 chmod g+r /var/run/named/session.key


No comments:

Post a Comment