tobi83
Goto Top

Debian DNS Problem

Hi Linuxer,

ich habe mir einen kleinen Linux Server aufgesetzt (Debian Lenny).

Momentan laüft auf diesem Server Samba,DCHP,DNS

Jetzt habe ich mit dem DNS ein kleines Problem (habe den DNS nach dieser Anleitung http://tuxclouds.org/index.php?option=com_content&task=view&id= ... eingerichtet. Der DNS startet ohne weitere Probleme.

Wenn ich aber jetzt z.B. einen Client namens "Simone" anpingen möchte bekomme ich die Meldung "unkown host"

Leider habe ich jetzt nicht wirklich eine Idee woran das liegen könnte.

Hoffe jemand von euch kann mir ein wenig weiter helfen.


P.S. der client bekommt eine IP.

Content-Key: 110039

Url: https://administrator.de/contentid/110039

Printed on: April 24, 2024 at 13:04 o'clock

Member: it-frosch
it-frosch Feb 26, 2009 at 09:40:09 (UTC)
Goto Top
prüfen doch mal mit nslookup ob DNS sauber läuft.

Bei der Eingabe von nslookup solltest du folgende Ausgabe bekommen:
Standardserver: dein DNS Server mit vollständigem Domänenname server1.meine-domain.de
Adresse: IP-Adresse deine DNS Servers

Wenn du nun simone mit vollständiger Domäne bzw. ohne Domäne eingibst bekommst du raus wo es klemmt.
Member: tobi83
tobi83 Feb 26, 2009 at 09:57:54 (UTC)
Goto Top
Hi,

leider erhalte keinerlei feedback auf nslookup der Courser springt in die nächste Zeile und das war es dann.

Wenn ich nslookup simone eingebe kommt dies heraus:

viona:~# nslookup simone
Server: 192.168.10.102
Address: 192.168.10.102#53

** server can't find simone: NXDOMAIN


Gruß
-tobi83
Member: jhinrichs
jhinrichs Feb 26, 2009 at 10:22:25 (UTC)
Goto Top
Poste doch einmal Deine named.conf, resolv.conf sowie die Zonendateien.
Member: tobi83
tobi83 Feb 26, 2009 at 10:36:13 (UTC)
Goto Top
gerne

Hier die named.conf


// This is the primary configuration file for the BIND DNS server named.
//
// Please read /usr/share/doc/bind9/README.Debian.gz for information on the
// structure of BIND configuration files in Debian, *BEFORE* you customize
// this configuration file.
//
// If you are just adding zones, please do that in /etc/bind/named.conf.local

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

// prime the server with knowledge of the root servers
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";  
};

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

controls {
inet 127.0.0.1 allow {localhost; } keys { "rndc-key"; };  
};

resolv.conf:
domain c4networx.ld
nameserver 192.168.10.102
search c4networx.ld

zonendatei db.c4networx
; BIND reverse data file for empty rfc1918 zone
;
; DO NOT EDIT THIS FILE - it is used for multiple zones.
; Instead, copy it, edit named.conf, and use that copy.
;
$TTL    86400
@       IN      SOA     c4networx.ld root.c4networx.ld. (
                              1         ; Serial
                         604800         ; Refresh
                          86400         ; Retry
                        2419200         ; Expire
                          86400 )       ; Negative Cache TTL
;
@       IN      NS      viona.c4networx.ld.
viona   IN      A       192.168.10.102

zonendatei db.192.168.10
; BIND reverse data file for empty rfc1918 zone
;
; DO NOT EDIT THIS FILE - it is used for multiple zones.
; Instead, copy it, edit named.conf, and use that copy.
;
$TTL    86400
@       IN      SOA     c4networx.ld. root.c4networx.ld. (
                              1         ; Serial
                         604800         ; Refresh
                          86400         ; Retry
                        2419200         ; Expire
                          86400 )       ; Negative Cache TTL
;
@       IN      NS      viona.c4networx.ld.
102     IN      PTR     viona.c4networx.ld

hoffe das hilft weiter

Gruß
-tobi83
Member: jhinrichs
jhinrichs Feb 26, 2009 at 16:03:44 (UTC)
Goto Top
Zwei Dinge fallen auf:
Die von Dir geposteten Zonendateien sind nicht in der named.conf aufgeführt. Damit sie der named findet, muss das aber sein. Ich vermute daher, dass sie in /etc/bind/named.conf.local stehen. Also poste bitte auch die.

Zum zweiten taucht der Rechner simone in den Zonendataien nicht auf, woher soll der named also wissen, dass es simone gibt und welche IP er hat?
Also Vorschlag: Kopiere die beiden Zonendateien, z.B.:

cp -p db.c4networx db.local
cp -p db.192.168.10 db.lacol

Füge in db.local folgende Zeile an
simone IN A 192.168.10.ipvonsimone

Füge in db.lacol folgende Zeile an

ipvonsimone IN PTR simone.c4networx.ld.

Beachte den abschließenden Punkt!!!

Dann füge die Zonendateien nach dem Muster (hoffentlich vorhanden) in /etc/bind/named.conf.local hinzu.

Dann /etc/init.d/named reload (kann sich je nach Distri unterscheiden, kenne Debian nicht genau)

Dann sollte es gehen.
Member: tobi83
tobi83 Feb 26, 2009 at 16:27:31 (UTC)
Goto Top
Stimt habe die zonen in der named.conf.local stehen hier ist sie:

// Do any local configuration here
//

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


zone "c4networx.ld" {  
type master;
notify no;
file "/etc/bind/db.c4networx";  
allow-update { key "rndc-key"; };  
};

zone "10.168.192.in-addr.arpa" {  
type master;
notify no;
file "/etc/bind/db.192.168.10";  
allow-update { key "rndc-key"; };  
};

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


Ich hatte eigentlcig das ganze so geplant das der DNS und der DHCP zusammenarbeiten. Also der DHCP vergibt eine IP und der DNS trägt das ganze dann automatisch ein.

Hoffe das das so auch möglich ist.
Member: jhinrichs
jhinrichs Feb 27, 2009 at 07:11:32 (UTC)
Goto Top
Zunächst würde ich einmal eine feste IP vergeben und die Einträge wie oben machen, um den DNS zu testen.
Das, was Du vorhast, ist möglich aber nicht ganz trivial.
Ein gute Anleitung ist zum Beispiel hier: http://www.linuxbu.ch/pdf6/kapitel13.pdf, allerdings auf SuSE-11.0-Basis, so dass einzelne Dateinamen und Pfade anzupassen sind.


Alternativ kannst Du für den Rechner simone durch dhcpd immer die gleiche IP vergeben lassen, und diese wie oben beschrieben fest im DNS registrieren. Dazu brauchst die MAC der Netzwerkkarte von simone, zu erhalten über

ifconfig

In die dhcpd.conf schreibst Du:

host simone {
hardware ethernet macvonsimone;
fixed-address ipvonsimone;
}

Dann /etc/init.d/dhcpd reload o.ä.