DHCP/DNS Auto Update Problem (Bind9 & isc-dhcp-server)

dimanche 16 avril 2017

Hallo Zusammen,

Ich habe ein Problem bei bind9

Code:

Apr 16 22:14:00 ns1 systemd[1]: Starting LSB: DHCP server...
Apr 16 22:14:00 ns1 dhcpd[3065]: Wrote 2 leases to leases file.
Apr 16 22:14:00 ns1 dhcpd[3066]: Server starting service.
Apr 16 22:14:01 ns1 dhcpd[3066]: DHCPDISCOVER from 7c:f9:0e:b5:81:39 via eth0
Apr 16 22:14:02 ns1 dhcpd[3066]: DHCPOFFER on 192.168.1.94 to 7c:f9:0e:b5:81:39 (android-63fcf51869b96fda) via eth0
Apr 16 22:14:02 ns1 dhcpd[3066]: DHCPREQUEST for 192.168.1.94 (192.168.1.96) from 7c:f9:0e:b5:81:39 (android-63fcf51869b96fda) via eth0
Apr 16 22:14:02 ns1 dhcpd[3066]: DHCPACK on 192.168.1.94 to 7c:f9:0e:b5:81:39 (android-63fcf51869b96fda) via eth0
Apr 16 22:14:02 ns1 dhcpd[3066]: Unable to add forward map from android-63fcf51869b96fda.local.lan to 192.168.1.94: SERVFAIL

Meine Config

Code:

/etc/bind/named.conf.local
key DHCP_UPDATER {
    algorithm HMAC-MD5.SIG-ALG.REG.INT;

    # Important: Replace this key with your generated key.
    # Also note that the key should be surrounded by quotes.
    secret "+kRMC9+igRaxo/MMyUcZ6w==";
};
zone "local.lan" {
    type master;
    file "/etc/bind/zones/db.local.lan"; # zone file path
    allow-transfer { 192.168.1.97; };        # ns2 private IP address - secondary
    allow-update { key DHCP_UPDATER;};
};
zone "168.192.1.in-addr.arpa" {
    type master;
    file "/etc/bind/zones/db.192.168";  # 10.128.0.0/16 subnet
    allow-transfer { 192.168.1.97; };  # ns2 private IP address - secondary
    allow-update { key DHCP_UPDATER;};
};

Code:

/etc/bind/zones/db.local.lan
;
; BIND data file for local loopback interface
;
$TTL    604800
@      IN      SOA    ns1.local.lan. admin.local.lan.(
                              3        ; Serial
                        604800        ; Refresh
                          86400        ; Retry
                        2419200        ; Expire
                        604800 )      ; Negative Cache TTL

;

; name servers - NS records
    IN      NS      ns1.local.lan.
    IN      NS      ns2.local.lan.


; name servers - A records
ns1.local.lan.          IN      A      192.168.1.96
ns2.local.lan.          IN      A      192.168.1.97


; 192.168.1.0/24 - A records
fritzbox.local.lan.    IN      A      192.168.1.1
test-pc.local.lan. IN      A      192.168.1.20
icinga.local.lan.      IN      A      192.168.1.92

Code:

/etc/bind/named.conf.options
acl "trusted" {
        192.168.1.96;    # ns1 - can be set to localhost
        192.168.1.97;    # ns2
        192.168.1.1;    # Fritz.Box
        192.168.1.20;
        192.168.1.0/24;  #Netz
};
options {
        directory "/var/cache/bind";

        recursion yes;                # enables resursive queries
        allow-recursion { trusted; };  # allows recursive queries from "trusted" clients
        listen-on { 192.168.1.96; };  # ns1 private IP address - listen on private network only
        allow-transfer { none; };      # disable zone transfers by default

        forwarders {
                8.8.8.8;
                8.8.4.4;
        };


        dnssec-validation auto;

        auth-nxdomain no;    # conform to RFC1035
        listen-on-v6 { any; };
};

Code:

/etc/bind/zones/db.192.168
;
; BIND reverse data file for local loopback interface
;
$TTL    604800
@      IN      SOA    ns1.local.lan. admin.local.lan. (
                              3        ; Serial
                        604800        ; Refresh
                          86400        ; Retry
                        2419200        ; Expire
                        604800 )      ; Negative Cache TTL
;

; name servers - NS records
      IN      NS      ns1.local.lan.
      IN      NS      ns2.local.lan.

; PTR Records
96  IN      PTR    ns1.local.lan.    ; 192.168.1.96
97  IN      PTR    ns2.local.lan.    ; 192.168.1.97
1    IN      PTR    fritzbox.local.lan.  ; 192.168.1.1
92  IN      PTR    icinga.local.lan.  ;192.168.1.92
20  IN      PTR    test-pc.local.lan. ;192.168.1.20

Code:

/etc/dhcp/dhcpd.conf
option domain-name "local.lan";
option domain-name-servers 192.168.1.96;

default-lease-time 600;
max-lease-time 7200;

subnet 192.168.1.0 netmask 255.255.255.0 {
  range 192.168.1.20 192.168.1.100;
  option routers 192.168.1.1;
}

key DHCP_UPDATER {
        algorithm hmac-md5;
        secret "+kRMC9+igRaxo/MMyUcZ6w==";
}

zone local.lan. {
        primary 192.168.1.96; # ip des nameservers
        key DHCP_UPDATER;
}

zone 168.192.in-addr.arpa. {
        primary 192.168.1.96;
        key DHCP_UPDATER;
}

ddns-update-style interim;
ddns-domainname "local.lan";
ddns-updates on;
do-forward-updates on;



0 commentaires:

Enregistrer un commentaire

 

Lorem

Ipsum

Dolor