DNS-Server für LAN [gelöst]

Marco

Well-Known Member
Hallo,

ich habe auf meinem "Home-Server" named als DNS-Forwarder konfiguriert. Heißt, DNS-Anfragen die zum Server kommen, werden an den DNS-Server meines Provider weitergereicht. Lokal auf dem Server funktioniert die Namensauflösung, jedoch nicht bei den Rechnern im Netzwerk (bei welchen ich natürlich die IP meines Servers als DNS angeben habe).

Zu meiner Konfiguration:
Code:
# /etc/namedb/make-localhost


/etc/namedb/named.conf:
Code:
forwarders {
                145.253.2.11;	// Ein gültiger DNS-Server von T-Online
        };

 query-source address * port 53;


/etc/rc.conf:
Code:
named_enable="YES"

Named startet und läuft:
Code:
Aug 16 11:25:16 FreeWilly named[303]: starting BIND 9.3.0 -u bind -t /var/named
Aug 16 11:25:16 FreeWilly named[303]: command channel listening on 127.0.0.1#953
Aug 16 11:25:16 FreeWilly named[303]: command channel listening on ::1#953
Code:
bind        303  0.0  0.8  5380 4292  ??  Ss   11:25AM   0:00.18 /usr/sbin/named -u bind -t /var/named


/etc/resolv.conf:
Code:
nameserver 127.0.0.1


In der /etc/ppp/ppp.conf habe ich 'enable dns' rausgenommen!


Genau die gleiche Konfiguration hatte ich vor längerer Zeit noch unter FBSD 4.10 laufen. Nun unter FBSD 5.3 scheint sich in der Beziehung vielleicht etwas geändert zu haben?! Was ich aber nicht glaube...

Wo kann ich nun noch nach Fehlerquellen suchen?


Gruß

Marco
 
Zuletzt bearbeitet:
hast du das hier mit drinne:
Code:
zone "deep.space" in {
        type master;
        file "master/db.deep.space";
};

zone "23.168.192.in-addr.arpa" in {
        file "master/db.192.168.23";
        type master;
};

zone "42.168.192.in-addr.arpa" in {
        file "master/db.192.168.42";
        type master;
};
was genau sagt dir ein nslookup?


meine komplette named.conf sieht so aus:
Code:
// $OpenBSD: named-simple.conf,v 1.6 2004/08/16 15:48:28 jakob Exp $
//
// Example file for a simple named configuration, processing both
// recursive and authoritative queries using one cache.


// Update this list to include only the networks for which you want
// to execute recursive queries. The default setting allows all hosts
// on any IPv4 networks for which the system has an interface, and
// the IPv6 localhost address.
//
acl clients {
//      localnets;
//      any;
        192.168.23.0/24;
        192.168.42.0/24;
        ::1;
};

options {
        version "";     // remove this to allow version queries

        listen-on    { any; };
        listen-on-v6 { any; };

        allow-recursion { clients; };
};

logging {
        category lame-servers { null; };
};

// Standard zones
//
zone "." {
        type hint;
        file "standard/root.hint";
};

zone "localhost" {
        type master;
        file "standard/localhost";
        allow-transfer { localhost; };
};

zone "127.in-addr.arpa" {
        type master;
        file "standard/loopback";
        allow-transfer { localhost; };
};

zone "0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa" {
        type master;
        file "standard/loopback6.arpa";
        allow-transfer { localhost; };
};

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

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


// Master zones
//
//zone "myzone.net" {
//      type master;
//      file "master/myzone.net";
//};

// Slave zones
//
//zone "otherzone.net" {
//      type slave;
//      file "slave/otherzone.net";
//      masters { 192.0.2.1; [...;] };
//};


zone "deep.space" in {
        type master;
        file "master/db.deep.space";
};

zone "23.168.192.in-addr.arpa" in {
        file "master/db.192.168.23";
        type master;
};

zone "42.168.192.in-addr.arpa" in {
        file "master/db.192.168.42";
        type master;
};

und die master/db.deep.space:
Code:
$TTL 86400
@ IN SOA holzbrettchen. deep.space. (
        1       ; Serial
        10800   ; Refresh after 3 hours
        3600    ; Retry after 1 hour
        604800  ; Expire after 1 week
        86400 )         ; Minimum TTL of 1 day
@ NS holzbrettchen.deep.space.

mixxer.deep.space.                      A               192.168.23.1
backofen.deep.space.                    A               192.168.23.2
obstschale.deep.space.                  A               192.168.23.3
untertasse.deep.space.                  A               192.168.23.4
holzbrettchen.deep.space.               A               192.168.23.5
giesskanne.deep.space.                  A               192.168.23.6
pfeffermuehle.deep.space.               A               192.168.23.7
kuehlschrank.deep.space.                A               192.168.23.8
herdplatte.deep.space.                  A               192.168.23.10
kaesereibe.deep.space.                  A               192.168.23.11
schuhkarton.deep.space.                 A               192.168.23.17
holzbrettchen2.deep.space.              A               192.168.42.1
obstschale2.deep.space.                 A               192.168.42.2
pfeffermuehle2.deep.space.              A               192.168.42.3
holzbrettchen3.deep.space.              A               172.16.1.1
obstschale3.deep.space.                 A               172.16.1.2
pfeffermuehle3.deep.space.              A               172.16.1.3
access.deep.space.                      A               172.16.1.100

master/db.192.168.23
Code:
; $OpenBSD: db.loopback,v 1.2 2005/02/07 06:08:10 david Exp $

$ORIGIN 23.168.192.in-addr.arpa.
$TTL 6h

@       IN      SOA     holzbrettchen. deep.space. (
                        1       ; serial
                        1h      ; refresh
                        30m     ; retry
                        7d      ; expiration
                        1h )    ; minimum

                NS      localhost.
1               PTR     mixxer.deep.space.
2               PTR     backofen.deep.space.
3               PTR     obstschale.deep.space.
4               PTR     untertasse.deep.space.
5               PTR     holzbrettchen.deep.space.
6               PTR     giesskanne.deep.space.
7               PTR     pfeffermuehle.deep.space.
8               PTR     kuehlschrank.deep.space.
10              PTR     herdplatte.deep.space.
11              PTR     kaesereibe.deep.space.
17              PTR     schuhkarton.deep.space.

master/db.192.168.42
Code:
; $OpenBSD: db.loopback,v 1.2 2005/02/07 06:08:10 david Exp $

$ORIGIN 42.168.192.in-addr.arpa.
$TTL 6h

@       IN      SOA     holzbrettchen2. deep.space. (
                        1       ; serial
                        1h      ; refresh
                        30m     ; retry
                        7d      ; expiration
                        1h )    ; minimum

                NS      localhost.
1               PTR     holzbrettchen2.deep.space.
2               PTR     obstschale2.deep.space.
3               PTR     pfeffermuehle2.deep.space.
und zu guter letzt:
Code:
# named -v
BIND 9.3.0
# nslookup
> backofen
Server:         192.168.23.5
Address:        192.168.23.5#53

Name:   backofen.deep.space
Address: 192.168.23.2
>
vielleicht hilfts dir ja...
 
Schau mal nach, ob der nur auf 127.0.0.1 lauscht, oder auch auf der IP des Servers.

CU

Martin
 
Dazu müsste ich erstmal wissen, wie man mit nslookup umgeht. Wenn ich im interaktiven Modus eine Domain eingebe, dann spuckt er mir folgendes aus:
Code:
Server:         127.0.0.1
Address:        127.0.0.1#53
Nur hatte ich eigentlich noch nie mit Zonen gearbeitet (bzw. etwas an den Grundeinstellungen geändert) und es funktionierte so wie es sollte. Vielleicht war das nur Zufall?!
 
Oh...

Das nächste mal sollte ich mir die Kommentare besser durchlesen!

// If named is being used only as a local resolver, this is a safe default.
// For named to be accessible to the network, comment this option, specify
// the proper IP address, or delete this option.
listen-on { 127.0.0.1; };


Hab's auskommentiert. Funktioniert!!
Da hätte ich wirklich eher drauf kommen können :ugly:


Trotzdem danke!!!!!
 
Jetzt dürfte er aber an allen Interfaces lauschen, was unter Umständen nicht gerate ratsam ist, wenn das Teil auf einem Router mit einem Interface läuft, welches mit der bösen weiten Welt verbunden ist...

Bei mir lauscht er z.B. nur auf dem loopback- sowie dem internen Interface.

listen-on {
127.0.0.1;
192.168.1.1;
};
 
Stimmt schon! Normal würde ich das auch nicht machen, aber in meinem Fall (leider im Moment nur Modem-Connection und auch nur wenige Min am Tag), lass ich das mal durchgehen. Könnte natürlich trotzdem die einzelnen IPs eintragen... Ist schon richtig so :)
 
Zurück
Oben