Hi all,
I got tired of updating hosts files and decided to set up dynamic DNS for hosts on my local LAN. The server is running FreeBSD 8.0-RELEASE-p2. Hosts are Windows and Linux. However things have not gone as smoothly as I hoped.
The messages in the logs look like this:
Code:
Feb 21 18:15:21 moose dhcpd: Unable to add forward map from dashaus-nas.dashaus to 192.168.1.10: timed out
Feb 21 18:18:05 moose dhcpd: unable to add reverse map from 12.1.168.192.in-addr-arpa to beast.dashaus: timed out
Feb 21 18:20:22 moose dhcpd: Unable to add forward map from dashaus-nas.dashaus to 192.168.1.10: timed out
Feb 21 18:23:06 moose dhcpd: unable to add reverse map from 12.1.168.192.in-addr-arpa to beast.dashaus: timed out
Feb 21 18:25:23 moose dhcpd: Unable to add forward map from dashaus-nas.dashaus to 192.168.1.10: timed out
named.conf file:
Code:
options {
// Relative to the chroot directory, if any
directory "/etc/namedb";
pid-file "/var/run/named/pid";
dump-file "/var/dump/named_dump.db";
statistics-file "/var/stats/named.stats";
// If you've got a DNS server around at your upstream provider, enter
// its IP address here, and enable the line below. This will make you
// benefit from its cache, thus reduce overall DNS traffic in the Internet.
forwarders {
62.101.93.101;
};
};
acl dashaus{
192.168.1.0/24;
127.0.0.1;
};
zone "." {
type slave;
file "slave/root.slave";
masters {
192.5.5.241; // F.ROOT-SERVERS.NET.
};
notify no;
};
zone "arpa" {
type slave;
file "slave/arpa.slave";
masters {
192.5.5.241; // F.ROOT-SERVERS.NET.
};
notify no;
};
zone "in-addr.arpa" {
type slave;
file "slave/in-addr.arpa.slave";
masters {
192.5.5.241; // F.ROOT-SERVERS.NET.
};
notify no;
};
// RFC 1912
zone "localhost" { type master; file "master/localhost-forward.db"; };
zone "127.in-addr.arpa" { type master; file "master/localhost-reverse.db"; };
zone "255.in-addr.arpa" { type master; file "master/empty.db"; };
zone "dashaus" {
type master;
file "dashaus";
allow-update {
dashaus;
};
};
zone "1.168.192.in-addr.arpa" {
type master;
file "dashaus.rev";
allow-update {
dashaus;
};
};
dhcpd.conf:
Code:
option domain-name "dashaus";
option domain-name-servers 192.169.1.1, 208.67.222.222, 208.67.220.220;
option subnet-mask 255.255.255.0;
default-lease-time 600;
max-lease-time 7200;
#authoritative;
ddns-update-style interim;
ddns-domainname "dashaus";
ddns-rev-domainname "in-addr-arpa";
log-facility local7;
update-static-leases on;
do-forward-updates true;
subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.10 192.168.1.30;
option routers 192.168.1.1;
option domain-name-servers 192.168.1.1;
}
subnet 192.168.3.0 netmask 255.255.255.0 {
range 192.168.3.10 192.168.3.20;
option routers 192.168.1.1;
option domain-name-servers 192.168.1.1;
}
And finally the zone files. Forward:
Code:
;BIND DUMP V8
$ORIGIN .
dashaus. 3600 IN NS moose.dashaus.
3600 IN SOA moose.dashaus. root.moose.dashaus. (
20011195 ; serial number
3600 ; refresh
900 ; retry
3600000 ; expiry
3600 ; minimum
)
$ORIGIN dashaus.
moose 3600 A 192.168.1.1
And reverse:
Code:
;BIND DUMP V8
$ORIGIN 1.168.192.in-addr.arpa.
@ 3600 IN NS moose.dashaus.
@ 3600 IN SOA moose.dashaus. root.moose.dashaus. (
20011195 ; serial number
3600 ; refresh
900 ; retry
3600000 ; expiry
3600 ; minimum
)
I have been reading manuals, cook-books and forum posts all over the place, and the one thing I can think of that could be significant is that the FreeBSD box is itself a DHCP client. It acts as the firewall and gateway, so it has one NIC which acts as a DHCP client to my ISP, and another NIC which is where the DHCP server runs.
The reason I wonder whether this might be significant is that the FreeBSD box itself reports itself as being in the ISP's domain. The resolv.conf file also gets rewritted by dhclient, so "nslookup <servername>" fails, though "nslookup <servername> <servername>" works.
Can anybody tell me what (obvious, foolish) mistake I have made above?