Nieuws:

Welkom, Gast. Alsjeblieft inloggen of registreren.
Heb je de activerings-mail niet ontvangen?

Auteur Topic: DDNS met BIND9 en ISC DHCP server  (gelezen 326 keer)

Offline aaaajeee

  • Lid
DDNS met BIND9 en ISC DHCP server
« Gepost op: 2015/05/05, 12:00:58 »
Ik heb Ubuntu 14.04 LTS geïnstalleerd op Odroid U2 SOC hardware. Deze server wil ik onder andere gaan gebruiken als lokale DNS en DHCP server. Hiervoor heb ik Bind9 en isc-dhcp-server geïnstalleerd. Beide server werken afzonderlijk van elkaar prima, dus resolven via de DNS server gaat prima en er worden netjes DHCP leases uitgedeeld.

Echter het bijwerken van DNS op basis van de uitgedeelde leases gaat niet OK. Zie een stukje logging:

May  5 09:39:01 odroid-server CRON[2076]: (root) CMD (  [ -x /usr/lib/php5/maxlifetime ] && [ -x /usr/lib/php5/sessionclean ] && [ -d /var/lib/php5 ] && /usr/lib/php5/sessionclean /var/lib/php5 $(/usr/lib/php5/maxlifetime))
May  5 09:45:03 odroid-server dhcpd: DHCPREQUEST for 192.168.3.209 from 98:03:d8:63:32:d4 (Regina-iPhone) via eth0
May  5 09:45:03 odroid-server dhcpd: DHCPACK on 192.168.3.209 to 98:03:d8:63:32:d4 (Regina-iPhone) via eth0
May  5 09:45:03 odroid-server dhcpd: Unable to add forward map from Regina-iPhone.schelhaas.local. to 192.168.3.209: REFUSED
May  5 09:54:59 odroid-server dhcpd: DHCPREQUEST for 192.168.3.206 from 78:31:c1:c4:3e:68 (MacBook-Pro) via eth0
May  5 09:54:59 odroid-server dhcpd: DHCPACK on 192.168.3.206 to 78:31:c1:c4:3e:68 (MacBook-Pro) via eth0
May  5 09:54:59 odroid-server dhcpd: Unable to add forward map from MacBook-Pro.schelhaas.local. to 192.168.3.206: REFUSED

Wie heeft hier ervaring mee en kan mij vertellen hoe dit op te lossen?

Albert Jan

dhcpd.conf
option domain-name "schelhaas.local";
option domain-name-servers 192.168.3.38;
option subnet-mask 255.255.255.0;

ddns-updates on; 
ddns-update-style interim; 
ddns-domainname "schelhaas.local";
ddns-rev-domainname "in-addr-arpa";
update-static-leases on; 
authoritative; 
key rndc-key { algorithm hmac-md5; secret rzRqyLiI2v+Fx6eItZ3cHg==;} 
allow unknown-clients; 
use-host-decl-names on; 
default-lease-time 1814400; #21 days 
max-lease-time 1814400; #21 days 
log-facility local7;
do-forward-updates true;

#schelhaas.local DNS zones
zone schelhaas.local. {
primary 127.0.0.1; #this is the primary DNS server for the zone
key rndc-key; #key used for dynamic updates
}

zone 3.168.192.in-addr.arpa. {
primary 127.0.0.1;
key rndc-key;
}

#schelhaas.local LAN scope
subnet 192.168.3.0 netmask 255.255.255.0 {
range 192.168.3.200 192.168.3.250;
option subnet-mask 255.255.255.0;
option routers 192.168.3.1;
option domain-name-servers 192.168.3.38;
option domain-name "schelhaas.local";
ddns-domainname "schelhaas.local.";
ddns-rev-domainname "in-addr.arpa.";
}

group {
host win2008.schelhaas.local {
hardware ethernet 00:1E:4F:E9:6F:3F;
fixed-address 192.168.3.80;
ddns-hostname "win2008";
}

host lj2100.schelhaas.local {
hardware ethernet 00:30:C1:8F:52:99;
fixed-address 192.168.3.45;
ddns-hostname "lj2100";
}

host lbp7200cdn.schelhaas.local {
hardware ethernet 00:00:85:FA:79:F7;
fixed-address 192.168.3.60;
ddns-hostname "lbp7200cdn";
}

host w2008.schelhaas.local {
hardware ethernet 00:26:B9:67:96:9D;
fixed-address 192.168.3.80;
ddns-hostname "w2008";
}

host Windows.schelhaas.local {
hardware ethernet 44:8A:5B:A3:41:FE;
fixed-address 192.168.3.110;
ddns-hostname "Windows";
}

host qnapajs.schelhaas.local {
hardware ethernet 00:08:9B:C4:EF:C0;
fixed-address 192.168.3.210;
ddns-hostname "qnapajs";
}
}


named.conf.local
//
// Do any local configuration here
//

include "/etc/bind/rndc.key";

controls {
        inet 127.0.0.1 port 953 allow { 192.168.3/24; 127.0.0.1; localhost; } keys { "rndc-key"; };
};

// Consider adding the 1918 zones here, if they are not used in your
// organization
//include "/etc/bind/zones.rfc1918";

zone "comfortuin.local" IN {
type forward;
forwarders { 192.168.5.50;  192.168.5.50; };
};

zone "dentaltuk.local" IN {
type forward;
forwarders { 192.168.0.40; 192.168.0.40; };
};

zone "schelhaas.local" {
type master;
file "/etc/bind/schelhaas.local";
};


named.conf.options
options {
directory "/var/cache/bind";

auth-nxdomain no; # conform to RFC1035

#Hide version string for security
version "not currently available";

listen-on {  127.0.0.1; 192.168.3.38; };

forwarders { 8.8.8.8; 8.8.4.4; };

allow-recursion { any; };

allow-query {
192.168.3/24;
127.0.0.1;
};

allow-transfer {
192.168.3/24;
127.0.0.1;
};
};