PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : Problem mit DHCP3-Server und Bind9



locutus06
15.03.07, 18:55
Hallo zusammen,
hab folgendes Tutorial http://www.schoki.org/ddns/ddns.html durchgearbeitet und hab das Problem. Das es einfach immernoch ned wirklich will. Das geht sogar soweit das mein Samba Server nur noch über die IP zu erreichen ist.
Ich benutze Debian 3.1 Sarge auf einem i386. Aber erstmal zum wesentlichen:

dhcpd.conf


server-identifier server.home.lan;
authoritative;
ddns-update-style interim;

key mykey {
algorithm hmac-md5;
secret "l3E2izdIokMxrjiLHJqPJA==";
};

zone home.lan. {
primary 192.168.2.1;
key mykey;
}

zone 2.168.192.in-addr.arpa. {
primary 192.168.2.1;
key mykey;
}

subnet 192.168.2.0 netmask 255.255.255.0 {
option routers 192.168.2.1;
option subnet-mask 255.255.255.0;
range 192.168.2.100 192.168.2.200;
option broadcast-address 192.168.2.255;
option domain-name "home.lan";
one-lease-per-client on;
default-lease-time 14400;
max-lease-time 14401;
option ip-forwarding off;
option time-offset -18000;
option domain-name-servers 192.168.2.1;
}


named.conf


key mykey {
algorithm hmac-md5;
secret "l3E2izdIokMxrjiLHJqPJA==";
};

zone "." {
type hint;
file "/etc/bind/db.root";
};

// be authoritative for the localhost forward and reverse zones, and for
// broadcast zones as per RFC 1912

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

zone "127.in-addr.arpa" {
type master;
file "/etc/bind/db.127";
};

zone "0.in-addr.arpa" {
type master;
file "/etc/bind/db.0";
};

zone "255.in-addr.arpa" {
type master;
file "/etc/bind/db.255";
};

zone "home.lan" {
type master;
file "/var/cache/bind/namedb/home.lan";
allow-update { key mykey; };
};

zone "2.168.192.in-addr.arpa" {
type master;
file "/var/cache/bind/namedb/home.lan.rev";
allow-update { key mykey; };
};

// zone "com" { type delegation-only; };
// zone "net" { type delegation-only; };

// From the release notes:
// Because many of our users are uncomfortable receiving undelegated answers
// from root or top level domains, other than a few for whom that behaviour
// has been trusted and expected for quite some length of time, we have now
// introduced the "root-delegations-only" feature which applies delegation-only
// logic to all top level domains, and to the root domain. An exception list
// should be specified, including "MUSEUM" and "DE", and any other top level
// domains from whom undelegated responses are expected and trusted.
// root-delegation-only exclude { "DE"; "MUSEUM"; };

include "/etc/bind/named.conf.local";


named.conf.options


acl "lan" {192.168.2.0/24; 127.0.0.1;};

controls {
inet 127.0.0.1 port 953 allow { 127.0.0.1; 192.168.2.1; } keys { "mykey";};
};

options {
directory "/var/cache/bind";

// If there is a firewall between you and nameservers you want
// to talk to, you might need to uncomment the query-source
// directive below. Previous versions of BIND always asked
// questions using port 53, but BIND 8.1 and later use an unprivileged
// port by default.

// query-source address * port 53;

// If your ISP provided one or more IP addresses for stable
// nameservers, you probably want to use them as forwarders.
// Uncomment the following block, and insert the addresses replacing
// the all-0's placeholder.

// forwarders {
// 0.0.0.0;
// };

allow-query { "lan"; };

auth-nxdomain no; # conform to RFC1035

};


namedb/home.lan


$ORIGIN .
$TTL 3600000 ; 5 weeks 6 days 16 hours
home.lan IN SOA localhost. root.localhost. (
497 ; serial
28800 ; refresh (8 hours)
14400 ; retry (4 hours)
3600000 ; expire (5 weeks 6 days 16 hours)
86400 ; minimum (1 day)
)
NS server.home.lan.
$ORIGIN home.lan.
server A 192.168.2.2
ftp CNAME server
ns NS 192.168.2.2
www CNAME server


namedb/home.lan.rev


$ORIGIN .
$TTL 86400 ; 1 day
2.168.192.in-addr.arpa IN SOA localhost. root.localhost. (
346 ; serial
28800 ; refresh (8 hours)
14400 ; retry (4 hours)
2600000 ; expire (4 weeks 2 days 2 hours 13 minutes 20 seconds)
86400 ; minimum (1 day)
)
NS localhost.
$ORIGIN 2.168.192.in-addr.arpa.
1 PTR server.home.lan.


So das waren die Konfigurationsdateien jetzt nur noch einen kleinen Ausschnitt aus der syslog:


Mar 15 17:18:54 server dhcpd: DHCPDISCOVER from 00:12:f0:2e:89:c7 via eth0
Mar 15 17:18:55 server dhcpd: DHCPOFFER on 192.168.2.191 to 00:12:f0:2e:89:c7 via eth0
Mar 15 17:18:55 server dhcpd: Wrote 10 leases to leases file.
Mar 15 17:18:55 server dhcpd: DHCPREQUEST for 192.168.2.191 (192.168.2.2) from 00:12:f0:2e:89:c7 via eth0
Mar 15 17:18:55 server dhcpd: DHCPACK on 192.168.2.191 to 00:12:f0:2e:89:c7 via eth0
Mar 15 17:49:12 server dhcpd: DHCPDISCOVER from 00:09:5b:04:9f:e2 via eth0
Mar 15 17:49:13 server dhcpd: DHCPOFFER on 192.168.2.199 to 00:09:5b:04:9f:e2 (rechner2) via eth0
Mar 15 17:49:14 server dhcpd: Unable to add forward map from rechner2.home.lan to 192.168.2.199: timed out
Mar 15 17:49:14 server dhcpd: DHCPREQUEST for 192.168.2.199 (192.168.2.2) from 00:09:5b:04:9f:e2 (rechner2) via eth0
Mar 15 17:49:14 server dhcpd: DHCPACK on 192.168.2.199 to 00:09:5b:04:9f:e2 (rechner2) via eth0
Mar 15 17:49:52 server dhcpd: DHCPINFORM from 192.168.2.199 via eth0
Mar 15 17:49:52 server dhcpd: DHCPACK to 192.168.2.199
Mar 15 17:49:55 server dhcpd: DHCPINFORM from 192.168.2.199 via eth0
Mar 15 17:49:55 server dhcpd: DHCPACK to 192.168.2.199
Mar 15 18:35:47 server dhcpd: Wrote 9 leases to leases file.
.
.
.
Mar 14 21:10:12 server named[13884]: starting BIND 9.2.4 -c /etc/bind/named.conf
Mar 14 21:10:12 server named[13884]: using 1 CPU
Mar 14 21:10:13 server named[13884]: loading configuration from '/etc/bind/named.conf'
Mar 14 21:10:13 server named[13884]: listening on IPv4 interface lo, 127.0.0.1#53
Mar 14 21:10:13 server named[13884]: listening on IPv4 interface eth0, 192.168.2.2#53
Mar 14 21:10:13 server named[13884]: none:0: open: /etc/bind/rndc.key: permission denied
Mar 14 21:10:13 server named[13884]: couldn't add command channel 127.0.0.1#953: permission denied
Mar 14 21:10:13 server named[13884]: none:0: open: /etc/bind/rndc.key: permission denied
Mar 14 21:10:13 server named[13884]: couldn't add command channel ::1#953: permission denied
Mar 14 21:10:13 server named[13884]: zone 127.IN-ADDR.ARPA/IN: loading master file 127: file not found
Mar 14 21:10:13 server named[13884]: dns_master_load: /etc/bind/namedb/home.lan.rev:3: 0.168.192.in-addr.arpa: not at top of zone
Mar 14 21:10:13 server named[13884]: zone 2.168.192.in-addr.arpa/IN: loading master file /etc/bind/namedb/home.lan.rev: not at top of zone
Mar 14 21:10:13 server named[13884]: dns_master_load: /etc/bind/namedb/home.lan:10: unknown RR type 'server.home.lan.'
Mar 14 21:10:13 server named[13884]: zone home.lan/IN: loading master file /etc/bind/namedb/home.lan: unknown class/type
Mar 14 21:10:13 server named[13884]: zone localhost/IN: loading master file localhost: file not found
Mar 14 21:10:13 server named[13884]: running


Ich versuche schon seid nen paar Tagen den Fehler zu finden ich hab keine Ahnung was das ist. Vieleicht hab ich auch einfach nur etwas ganz Dummes übersehen. Wenn mir jemand helfen könnte wäre echt nett :)

mfg Oliver

locutus06
16.03.07, 14:47
Hat keiner ne Idee?!...

mfg Oliver

minni
16.03.07, 15:07
Wie sind denn die Zugriffsrechte auf /etc/bind/rndc.key etc.?

locutus06
16.03.07, 16:28
Hab die Verzeichnisse und Datein in /etc/bind alle mal auf 777 gestellt. Trotzdem bekomme ich folgende Meldung wenn ich den server neustarte:


server:/etc/bind# service bind9 restart
Stopping domain name service: namedrndc: connect failed: connection refused
.
Starting domain name service: named.
server:/etc/bind#


Der Server meckert nicht beim Starten sondern erst wenn er den Dienst beenden soll.
Das verzeichnis sieht nun so aus:



server:/etc/bind# ls -l
insgesamt 44
-rwxrwxrwx 1 root bind 237 2007-01-26 21:28 db.0
-rwxrwxrwx 1 root bind 271 2007-01-26 21:28 db.127
-rwxrwxrwx 1 root bind 237 2007-01-26 21:28 db.255
-rwxrwxrwx 1 root bind 353 2007-01-26 21:28 db.empty
-rwxrwxrwx 1 root bind 256 2007-01-26 21:28 db.local
-rwxrwxrwx 1 root bind 1507 2007-01-26 21:28 db.root
drwxrwxrwx 2 root bind 104 2007-03-09 08:18 namedb
-rwxrwxrwx 1 root bind 1455 2007-03-16 16:07 named.conf
-rwxrwxrwx 1 root bind 165 2007-01-26 21:28 named.conf.local
-rwxrwxrwx 1 root bind 831 2007-03-15 20:27 named.conf.options
-rwxrwxrwx 1 bind bind 77 2007-03-05 21:47 rndc.key
-rwxrwxrwx 1 root bind 1317 2007-01-26 21:28 zones.rfc1918

mfg Oliver

bla!zilla
18.03.07, 08:12
Also die Rechte auf 777 zu stellen macht keinen Sinn, die Datei muss nicht ausführbar sein. Zudem sind deine Zonefiles teilweise falsch, die Pfade dazu stimmen nicht usw. Bevor ich mich an dynamic DNS wage, würde ich den BIND und den DHCPd erstmal so zum Laufen bewegen. Bitte fixe die Fehler die dir der BIND in den Logs nennt.




Mar 14 21:10:12 server named[13884]: starting BIND 9.2.4 -c /etc/bind/named.conf
Mar 14 21:10:12 server named[13884]: using 1 CPU
Mar 14 21:10:13 server named[13884]: loading configuration from '/etc/bind/named.conf'
Mar 14 21:10:13 server named[13884]: listening on IPv4 interface lo, 127.0.0.1#53
Mar 14 21:10:13 server named[13884]: listening on IPv4 interface eth0, 192.168.2.2#53
Mar 14 21:10:13 server named[13884]: none:0: open: /etc/bind/rndc.key: permission denied
Mar 14 21:10:13 server named[13884]: couldn't add command channel 127.0.0.1#953: permission denied
Mar 14 21:10:13 server named[13884]: none:0: open: /etc/bind/rndc.key: permission denied
Mar 14 21:10:13 server named[13884]: couldn't add command channel ::1#953: permission denied
Mar 14 21:10:13 server named[13884]: zone 127.IN-ADDR.ARPA/IN: loading master file 127: file not found
Mar 14 21:10:13 server named[13884]: dns_master_load: /etc/bind/namedb/home.lan.rev:3: 0.168.192.in-addr.arpa: not at top of zone
Mar 14 21:10:13 server named[13884]: zone 2.168.192.in-addr.arpa/IN: loading master file /etc/bind/namedb/home.lan.rev: not at top of zone
Mar 14 21:10:13 server named[13884]: dns_master_load: /etc/bind/namedb/home.lan:10: unknown RR type 'server.home.lan.'
Mar 14 21:10:13 server named[13884]: zone home.lan/IN: loading master file /etc/bind/namedb/home.lan: unknown class/type
Mar 14 21:10:13 server named[13884]: zone localhost/IN: loading master file localhost: file not found
Mar 14 21:10:13 server named[13884]: running


Deine Zonefiles passen vorne und hinten nicht.