My named.conf:
include "/etc/rndc.key";
acl mynet {
10.125.1.0/24;
127.0.0.1;
};
options {
directory "/var/named";
forwarders {
8.8.8.8;
8.8.4.4;
};
allow-query { mynet; };
listen-on { 10.125.1.1; };
};
zone "." IN {
type hint;
file "caching-example/named.root";
};
zone "localhost" IN {
type master;
file "caching-example/localhost.zone";
allow-update { none; };
};
zone "0.0.127.in-addr.arpa" IN {
type master;
file "caching-example/named.local";
allow-update { none; };
};
zone "mobile.linux" IN {
type master;
file "mobile.linux.db";
allow-update { key rndc-key; };
allow-query { mynet; };
allow-transfer { mynet; };
};
zone "1.125.10.in-addr.arpa" IN {
type master;
file "mobile.linux.rev";
allow-update { key rndc-key; };
allow-query { mynet; };
allow-transfer { mynet; };
};
My mobile.linux.db:
$ORIGIN .
$TTL 86400 ; 1 day
mobile.linux IN SOA mobile.linux. root.mobile.linux. (
48 ; serial
10800 ; refresh (3 hours)
900 ; retry (15 minutes)
604800 ; expire (1 week)
86400 ; minimum (1 day)
)
NS mobile.linux.
A 10.125.1.1
My mobile.linux.rev:
$ORIGIN .
$TTL 86400 ; 1 day
1.125.10.in-addr.arpa IN SOA mobile.linux. root.mobile.linux. (
2011032506 ; serial
28800 ; refresh (8 hours)
14400 ; retry (4 hours)
3600000 ; expire (5 weeks 6 days 16 hours)
86400 ; minimum (1 day)
)
NS mobile.linux.
My dhcpd.conf:
include "/etc/rndc.key";
zone mobile.linux {
primary 10.125.1.1;
key rndc-key;
}
zone 1.125.10.in-addr.arpa. {
primary 10.125.1.1;
key rndc-key;
}
max-lease-time 86400;
default-lease-time 172800;
ddns-updates on;
ddns-update-style interim;
subnet 10.125.1.0 netmask 255.255.255.0 {
range 10.125.1.2 10.125.1.10;
option routers 10.125.1.1;
option domain-name-servers 10.125.1.1;
ddns-domainname = "mobile.linux";
}
Tested on Slackware