The Linksys WRT54GL doesn’t support statically assigned DHCP out of the box (you could ofcourse use openwrt) so I wrote this small script that updates my nameserver (bind9) with the names present in the dhcp table on my router. You can run this dhcpdns.py in for example cron, or you could run it through dhcppoll.sh below as root. Make sure the machine running it has the command nsupdate and your zones (reverse and regular) has allow-update rights.
Example of bind configuration:
zone "0.168.192.in-addr.arpa" {
allow-update {
127.0.0.1;
192.168.0.1/24;
};
forwarders {};
type master;
file "/etc/bind/db.0.168.192";
}
Don’t forget the forwarders if you use reverse dns, if you don’t you might want to comment out that section in the script.
Filed under [/] | permanent link
