PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : DNS funktioniert, Internet nur nach rcnamed start, aber löst nicht N. auf für Client



Mr.Nobody
11.10.03, 14:35
Hallo,

mein DNS auf hauptrechner funktioniert, denn mein Internet-Browser findet nur Internetseiten, wenn mein DNS-Server Bind9 mit rcnamed start auch gestartet ist.
Nach rcnamed stop findet er keine Seiten mehr, da ich in /etc/resolv.conf auch keine
nameserver eingetragen habe.

Mein Problem:
Die Namensauflösung funktioniert leider nur auf "hauptrechner" und nicht
auf dem client. (rechner2)


Auf "hauptrechner" (Rechner mit DNS) gibt ping rechner2 folgende Meldung:

hauptrechner:/etc # ping rechner2
PING rechner2.test (172.16.0.142) 56(84) bytes of data.
64 bytes from hauptrechner.test (172.16.0.142): icmp_seq=1 ttl=128 time=0.203 ms
64 bytes from hauptrechner.test (172.16.0.142): icmp_seq=2 ttl=128 time=0.165 ms
64 bytes from hauptrechner.test (172.16.0.142): icmp_seq=3 ttl=128 time=0.190 ms
64 bytes from hauptrechner.test (172.16.0.142): icmp_seq=4 ttl=128 time=0.162 ms

in der /etc/hosts von hauptrechner habe ich keinen Eintrag von rechner2.
Also funktioniert die Namensauflösung auf diesem Rechner.

ping hauptrechner auf rechner2 bringt gar keine Meldung, nur ping IP bringt eine
Meldung.

Oct 11 13:53:30 hauptrechner named[4731]: starting BIND 9.2.2 -t /var/lib/named -u named
Oct 11 13:53:30 hauptrechner named[4731]: using 1 CPU
Oct 11 13:53:30 hauptrechner named[4733]: loading configuration from '/etc/named.conf'
Oct 11 13:53:30 hauptrechner named[4733]: listening on IPv6 interfaces, port 53
Oct 11 13:53:30 hauptrechner named[4733]: listening on IPv4 interface lo, 127.0.0.1#53
Oct 11 13:53:30 hauptrechner named[4733]: binding TCP socket: address in use
Oct 11 13:53:30 hauptrechner named[4733]: command channel listening on 127.0.0.1#953
Oct 11 13:53:30 hauptrechner named[4733]: command channel listening on ::1#953
Oct 11 13:53:30 hauptrechner named[4733]: zone 0.0.127.in-addr.arpa/IN: loaded serial 42
Oct 11 13:53:30 hauptrechner named[4733]: zone 0.16.172.in-addr.arpa/IN: loaded serial 2003100810
Oct 11 13:53:30 hauptrechner named[4733]: zone localhost/IN: loaded serial 42
Oct 11 13:53:30 hauptrechner named[4733]: zone test/IN: loaded serial 2003100810
Oct 11 13:53:30 hauptrechner named[4733]: running
Oct 11 13:59:00 hauptrechner /USR/SBIN/CRON[4739]: (root) CMD ( rm -f /var/spool/cron/lastrun/cron.hourly)

Eine Fehlermeldung fällt mir nicht auf.

meine zone-files

hauptrechner:/var/lib/named # cat test.zone
; Zonefile (Forward Mapping) für heim.netz. (eine Kommentarzeile)
$TTL 3h
test. IN SOA hauptrechner.test. root.hauptrechner.test. (
2003100810 ; Seriennummer
10800 ; Refresh Zeit
3600 ; Retry Zeit
604800 ; Expire
38400 ) ; negative Caching TTL
;
; Nameserver
;
test. IN NS hauptrechner.test.
;
; Hosts (kanonisch)
;
localhost IN A 127.0.0.1
hauptrechner.test. IN A 172.16.0.141
rechner2.test. IN A 172.16.0.142
;
; Aliase
;
www.test. IN CNAME hauptrechner.test
irc.test. IN CNAME hauptrechner.test

hauptrechner:/var/lib/named # cat 172.16.0.zone
; Zonefile für local. (Reverse Mapping)
;
$TTL 3h
0.16.172.in-addr.arpa. IN SOA hauptrechner.test. root.hauptrechner.test. (
2003100810 ; Seriennummer
10800 ; Refresh Zeit
3600 ; Retry Zeit
604800 ; Expire
38400 ) ; negative Caching TTL
;
; Nameserver
;

0.16.172.in-addr.arpa. IN NS hauptrechner.test.
;
; Hosts Adressen zeigen auf kanonische Namen
;
141.0.16.172.in-addr.arpa. IN PTR rechner2.test.
142.0.16.172.in-addr.arpa. IN PTR hauptrechner.test.

Momentan muß ich aufgeben, ich finde den Fehler einfach nicht.

Vielleicht liegts ja am Client, habe mich aber genau an eine Anleitung gehalten,
und habe in Win98 unter TCP/IP Eigenschaften DNS-Konfiguration
Host:rechner2 Domäne:test
Suchreihenfolge für DNS Server
172.16.0.141
194.25.2.129

mfG
N.

Doh!
11.10.03, 15:24
Poste doch mal noch die /etc/named.conf von Deinem Hauptrechner

Mr.Nobody
11.10.03, 18:09
Hallo Doh!

vielen Dank, ist glaube ich gar nicht mehr nötig, mir hat schon jemand aus einer Liste gezeigt, was in meiner named.conf nicht richtig war. Ich hätte nicht an diese Möglichkeit gedacht.

listen-on port 53 { 127.0.0.1; 172.16.0.141; };

bei mir war nur listen-on port 53 { 127.0.0.1; } eingetragen. Damit
hört der Server gar nicht nach aussen.

Es muß auch noch die IP des Rechners eingetragen werden, auf dem der DNS
läuft, damit er auch auf der Netzwerkkarte hört.
Und ich habe immer auf acl internal { 127.0.0.1; 172.16.0.142/24; }; geschaut,
und da meine IP Nummern eingetragen.

Jetzt kann ich endlich im Browser des Clients
http://hauptrechner/homepage/index.html aufrufen ohne die IP-Nr. des
hauptrechners zu verwenden.

Auch ping hauptrechner auf dem client rechner2 funktioniert jetzt.

Nur was ich noch nicht verstehe, wenn ich auf dem Hauptrechner auf dem DNS
läuft ping hauptrechner eingebe erhalte ich diese Meldung:

hauptrechner:/etc # ping hauptrechner
PING hauptrechner.test (172.16.0.141) 56(84) bytes of data.
64 bytes from rechner2.test (172.16.0.141): icmp_seq=1 ttl=64 time=0.031 ms
64 bytes from rechner2.test (172.16.0.141): icmp_seq=2 ttl=64 time=0.037 ms

--- hauptrechner.test ping statistics ---
6 packets transmitted, 6 received, 0% packet loss, time 4995ms
rtt min/avg/max/mdev = 0.031/0.036/0.038/0.006 ms

Dann erhalte ich Packete von rechner2.test, obwohl ich ihn gar nicht mit ping addressiert habe und er auch eigentlich auch ausgeschaltet ist. Diese Packete
können eigentlich nur vom DNS selber kommen.

acl internal { 127.0.0.1; 172.16.0.142/24; };
options {

# The directory statement defines the name server's
# working directory

directory "/var/lib/named";

# The forwarders record contains a list of servers to
# which queries should be forwarded. Enable this line and
# modify the IP-address to your provider's name server.
# Up to three servers may be listed.

#forwarders { 10.11.12.13; 10.11.12.14; };
forwarders { 194.25.2.129; 194.25.2.130; 62.27.53.66; };
# Enable the next entry to prefer usage of the name
# server declared in the forwarders section.

forward first;

# The listen-on record contains a list of local network
# interfaces to listen on. Optionally the port can be
# specified. Default is to listen on all interfaces found
# on your system. The default port is 53.

listen-on port 53 { 127.0.0.1; 172.16.0.142; 172.16.0.141; };

# The listen-on-v6 record enables or disables listening
# on IPV6 interfaces. Allowed values are 'any' and 'none'
# or a list of addresses. IPv6 can only be used with
# kernel 2.4 in this release.

listen-on-v6 { any; };

# The next three statements may be needed if a firewall
# stands between the local server and the internet.

query-source address * port 53;
transfer-source * port 53;
notify-source * port 53;
#Diese 3 Zeilen habe ich am 11.10.03 auskommentiert

# The allow-query record contains a list of networks or
# IP-addresses to accept and deny queries from. The
# default is to allow queries from all hosts.

allow-query { 127.0.0.1; 172.16.0.142; };
# allow-query { internal; };
# If notify is set to yes (default), notify messages are
# sent to other name servers when the the zone data is
# changed. Instead of setting a global 'notify' statement
# in the 'options' section, a separate 'notify' can be
# added to each zone definition.
cleaning-interval 120;
#statistics-interval 0;
notify no;
};

# Remove the leading '#' characters if you want a log of the queries send to
# your name server. The log file size is limited to 100 MB.
#logging {
# channel query_logging {
# file "/var/log/named_querylog"
# versions 3 size 100M;
# print-time yes; // timestamp log entries
# };
# category queries {
# query_logging;
# };
# category lame-servers { null; };
#};

# The following zone definitions don't need any modification.
# The first one is the definition of the root name servers.
# The second one defines localhost while the third defines the reverse lookup
# for localhost.

zone "." in {
type hint;
file "root.hint";
};

zone "localhost" in {
type master;
file "localhost.zone";
};

zone "0.0.127.in-addr.arpa" in {
type master;
file "127.0.0.zone";
};

# You can insert further zone records for your own domains below.
zone "test" in {
type master;
file "test.zone";
};

zone "0.16.172.in-addr.arpa" in {
type master;
file "172.16.0.zone";

mfG
N.

Thomas Mitzkat
11.10.03, 18:25
am besten konfigurierst dir am anfang den bind mal mit webmin, das ist einfacher und wir müssen uns nicht durch abertausende fehlermedlungen quäjen


www.webmin.com

Doh!
12.10.03, 04:26
Original geschrieben von Thomas Mitzkat
am besten konfigurierst dir am anfang den bind mal mit webmin, das ist einfacher und wir müssen uns nicht durch abertausende fehlermedlungen quäjen


www.webmin.com

Jaja, der Webmin-Thomas, will uns hier die Neuen gleich mit so Konfigurations-Teufelszeug verderben... :D