ubuntuusers.de

DNS / DHCP

Status: Gelöst | Ubuntu-Version: Server 11.10 (Oneiric Ocelot)
Antworten |

stoffl-6781

Avatar von stoffl-6781

Anmeldungsdatum:
12. September 2010

Beiträge: 58

Wohnort: Bartholomäberg

Hallo Leute!!!

Ich benötige fachmänische Hilfe.

Habe lt. Wiki einen DNS Server eingerichtet.

wenn ich

dig @127.0.0.1 ddwrt.buenta.local 

eingebe kommt folgendes:

stoffl@buenta-srv:/etc/dhcp3$ dig @127.0.0.1 ddwrt.buenta.local

; <<>> DiG 9.7.3 <<>> @127.0.0.1 ddwrt.buenta.local
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 25187
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 1

;; QUESTION SECTION:
;ddwrt.buenta.local.		IN	A

;; ANSWER SECTION:
ddwrt.buenta.local.	172800	IN	A	192.168.11.1

;; AUTHORITY SECTION:
buenta.local.		172800	IN	NS	srv1.buenta.local.

;; ADDITIONAL SECTION:
srv1.buenta.local.	172800	IN	A	192.168.11.2

;; Query time: 0 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Thu Jan 12 22:09:19 2012
;; MSG SIZE  rcvd: 87

das bedeutet die DNS läuft oderß

Weiters DHCP Server:

ich hätte gerne auf eth0 eine Fixe IP Adresse von wo das Internet kommt Auf eth1 den DHCP Server.

Mit dem komm ich nicht klar. Meine Aktuelle dhcp.conf

authoritative;

subnet 192.168.11.0 netmask 255.255.255.0 {
        range 192.168.11.10 192.168.11.80;
        default-lease-time 600;
        max-lease-time 7200;
        option domain-name "buenta.local"
        option domain-name-servers 192.168.11.2;
        option broadcast-address 192.168.11.254;
        option subnet-mask 255.255.255.0;
        option routers 192.168.11.2;
}
subnet 10.0.0.0 netmask 255.255.255.0 {
        option subnet-mask 255.255.255.0;
        options routers 10.0.0.138;
        range 10.0.0.1 10.0.0.5;
}

wenn ich nun den Dienst

sudo service isc-dhcp-server start

starte kommt Folgende Fehlermeldung im Syslog:

Jan 12 22:02:22 buenta-srv dhcpd: Internet Systems Consortium DHCP Server 4.1.1-P1
Jan 12 22:02:22 buenta-srv dhcpd: Copyright 2004-2010 Internet Systems Consortium.
Jan 12 22:02:22 buenta-srv dhcpd: All rights reserved.
Jan 12 22:02:22 buenta-srv dhcpd: For info, please visit https://www.isc.org/software/dhcp/
Jan 12 22:02:22 buenta-srv dhcpd: Internet Systems Consortium DHCP Server 4.1.1-P1
Jan 12 22:02:22 buenta-srv dhcpd: Copyright 2004-2010 Internet Systems Consortium.
Jan 12 22:02:22 buenta-srv dhcpd: All rights reserved.
Jan 12 22:02:22 buenta-srv dhcpd: For info, please visit https://www.isc.org/software/dhcp/
Jan 12 22:02:22 buenta-srv dhcpd: Wrote 0 leases to leases file.
Jan 12 22:02:22 buenta-srv dhcpd:
Jan 12 22:02:22 buenta-srv dhcpd: No subnet declaration for virbr0 (192.168.122.1).
Jan 12 22:02:22 buenta-srv dhcpd: ** Ignoring requests on virbr0.  If this is not what
Jan 12 22:02:22 buenta-srv dhcpd:    you want, please write a subnet declaration
Jan 12 22:02:22 buenta-srv dhcpd:    in your dhcpd.conf file for the network segment
Jan 12 22:02:22 buenta-srv dhcpd:    to which interface virbr0 is attached. **
Jan 12 22:02:22 buenta-srv dhcpd:
Jan 12 22:02:22 buenta-srv dhcpd:
Jan 12 22:02:22 buenta-srv dhcpd: No subnet declaration for eth1 (192.168.11.2).
Jan 12 22:02:22 buenta-srv dhcpd: ** Ignoring requests on eth1.  If this is not what
Jan 12 22:02:22 buenta-srv dhcpd:    you want, please write a subnet declaration
Jan 12 22:02:22 buenta-srv dhcpd:    in your dhcpd.conf file for the network segment
Jan 12 22:02:22 buenta-srv dhcpd:    to which interface eth1 is attached. **
Jan 12 22:02:22 buenta-srv dhcpd:
Jan 12 22:02:22 buenta-srv dhcpd:
Jan 12 22:02:22 buenta-srv dhcpd: No subnet declaration for eth0 (10.0.0.1).
Jan 12 22:02:22 buenta-srv dhcpd: ** Ignoring requests on eth0.  If this is not what
Jan 12 22:02:22 buenta-srv dhcpd:    you want, please write a subnet declaration
Jan 12 22:02:22 buenta-srv dhcpd:    in your dhcpd.conf file for the network segment
Jan 12 22:02:22 buenta-srv dhcpd:    to which interface eth0 is attached. **
Jan 12 22:02:22 buenta-srv dhcpd:

Was mache ich bitte falsch?

OK irgend wie muss ich dem noch beibringen dass das Internet auf 10.0.0.1 ist und er es quasi verbinden muss.

Momentan läuft firestartet für die "Verknüpfung" von den beiden Netzwerk karten ...

danke im Voraus für die Hilfe!!

Gruß aus dem Verschneiten Montafon

Strakha

Avatar von Strakha

Anmeldungsdatum:
3. Januar 2012

Beiträge: 73

Hallo,

in der Fehlermeldung steht "please write a subnet declaration in your dhcpd.conf".

Du hast die dhcp.conf editiert, siehe:

Meine Aktuelle dhcp.conf

stoffl-6781

(Themenstarter)
Avatar von stoffl-6781

Anmeldungsdatum:
12. September 2010

Beiträge: 58

Wohnort: Bartholomäberg

oky dnake vorerst ...

Gruß Stoffl

stoffl-6781

(Themenstarter)
Avatar von stoffl-6781

Anmeldungsdatum:
12. September 2010

Beiträge: 58

Wohnort: Bartholomäberg

Oky soweit ok.

Nun funktioniert wenn ich auf dem Server ping ddwrt.buenta.local funktioniert es (192.168.11.1)

wenn ich allerdings von einem client PC aus ping auf ddwrt.buenta.local funktioniert gar nichts. die IP zu pingen funktioniert.

Der Client PC bekommt auch die DNS vom Server 192.168.11.2 und die 8.8.8.8.

Sollt ja eigenltich funktionieren? wenn ich die 8.8.8.8 lösche - bzw. manuel beim lient nur die 192.168.11.2 angebe komme ich nicht mehr ins internet sowie funktioniert das mit ddwrt.buenta.local auch nicht.

Wenn ich es am server mache überhaupt kein problem ..

hat jemand eine Idee wo ich auf fehlersuche gehen könnte. in der Syslog steht seitens bind9 nichts drinnen.

danke stoffl

mickydoutza

Avatar von mickydoutza

Anmeldungsdatum:
31. Dezember 2010

Beiträge: 2185

stoffl-6781 schrieb:

die IP zu pingen funktioniert.

Der Client PC bekommt auch die DNS vom Server 192.168.11.2 und die 8.8.8.8.

Poste mal vom Server die Ausgabe von:

sudo lsof -nPi | grep 53

und vom Client die Ausgabe von:

sudo nslookup heise.de 192.168.11.2

Wenn 192.168.11.2 die IP-Adresse deines Servers mit dem dns-Dienst ist.

Strakha

Avatar von Strakha

Anmeldungsdatum:
3. Januar 2012

Beiträge: 73

Hi,

bitte poste die Ausgabe von

cat /etc/nsswitch.conf | grep hosts

auf dem Client.

stoffl-6781

(Themenstarter)
Avatar von stoffl-6781

Anmeldungsdatum:
12. September 2010

Beiträge: 58

Wohnort: Bartholomäberg

mickydoutza schrieb:

stoffl-6781 schrieb:

die IP zu pingen funktioniert.

Der Client PC bekommt auch die DNS vom Server 192.168.11.2 und die 8.8.8.8.

Poste mal vom Server die Ausgabe von:

sudo lsof -nPi | grep 53


stoffl@buenta-srv:~$ sudo lsof -nPi | grep 53
[sudo] password for stoffl: 
avahi-dae 1550  avahi   13u  IPv4  10289      0t0  UDP *:5353 
avahi-dae 1550  avahi   14u  IPv6  10290      0t0  UDP *:5353 
dnsmasq   2549 nobody    6u  IPv4   9205      0t0  UDP 192.168.122.1:53 
dnsmasq   2549 nobody    7u  IPv4   9206      0t0  TCP 192.168.122.1:53 (LISTEN)
named     4084   bind   20u  IPv4  13520      0t0  TCP 127.0.0.1:53 (LISTEN)
named     4084   bind   21u  IPv4  13522      0t0  TCP 10.0.0.1:53 (LISTEN)
named     4084   bind   22u  IPv4  13524      0t0  TCP 192.168.11.2:53 (LISTEN)
named     4084   bind   23u  IPv4  13529      0t0  TCP 127.0.0.1:953 (LISTEN)
named     4084   bind  512u  IPv4  13519      0t0  UDP 127.0.0.1:53 
named     4084   bind  513u  IPv4  13521      0t0  UDP 10.0.0.1:53 
named     4084   bind  514u  IPv4  13523      0t0  UDP 192.168.11.2:53 
named     4084   bind  515u  IPv4  13525      0t0  UDP 192.168.122.1:53 

und vom Client die Ausgabe von:

sudo nslookup heise.de 192.168.11.2

stoffl:~ admin$ nslookup heise.de 192.168.11.2
;; connection timed out; no servers could be reached

stoffl:~ admin$ 

Wenn 192.168.11.2 die IP-Adresse deines Servers mit dem dns-Dienst ist.

stoffl-6781

(Themenstarter)
Avatar von stoffl-6781

Anmeldungsdatum:
12. September 2010

Beiträge: 58

Wohnort: Bartholomäberg

Strakha schrieb:

Hi,

bitte poste die Ausgabe von

cat /etc/nsswitch.conf | grep hosts
 Auf dem Server:
stoffl@buenta-srv:~$ cat /etc/nsswitch.conf | grep hosts
hosts:          files dns
stoffl@buenta-srv:~$ 

Auf dem Macbook
stoffl:~ admin$ stoffl@buenta-srv:~$ cat /etc/nsswitch.conf | grep hosts
-bash: stoffl@buenta-srv:~$: command not found
stoffl:~ admin$ hosts:          files dns
-bash: hosts:: command not found
stoffl:~ admin$ stoffl@buenta-srv:~$ 

auf dem Client.

mickydoutza

Avatar von mickydoutza

Anmeldungsdatum:
31. Dezember 2010

Beiträge: 2185

Was ist das hier? Warum brauchst Du dnsmasq und bind?

stoffl-6781 schrieb:

 
> dnsmasq   2549 nobody    6u  IPv4   9205      0t0  UDP 192.168.122.1:53  
> named     4084   bind  515u  IPv4  13525      0t0  UDP 192.168.122.1:53  

EDIT:

Mach vom Client mal auch ein:

sudo nmap -sU 192.168.11.2 -p53

und poste die Ausgabe.

stoffl-6781

(Themenstarter)
Avatar von stoffl-6781

Anmeldungsdatum:
12. September 2010

Beiträge: 58

Wohnort: Bartholomäberg

ok nmap geht beim mac nicht.

aber beim server ... werde es gleich bei einem client ubuntu versuchen muss den noch schnell starten.

beim Server kommt folgendes:

stoffl@buenta-srv:~$ sudo  nmap -sU 192.168.11.2 -p53

Starting Nmap 5.21 ( http://nmap.org ) at 2012-01-13 19:59 CET
Nmap scan report for srv1.buenta.local (192.168.11.2)
Host is up (0.00029s latency).
PORT   STATE SERVICE
53/udp open  domain

Nmap done: 1 IP address (1 host up) scanned in 0.22 seconds

stoffl-6781

(Themenstarter)
Avatar von stoffl-6781

Anmeldungsdatum:
12. September 2010

Beiträge: 58

Wohnort: Bartholomäberg

So dass kommt bei einem anderen ubuntu client:

stoffl@stoffl-N150-N210-N220:~$ sudo nmap -sU 192.168.11.2 -p53

Starting Nmap 5.21 ( http://nmap.org ) at 2012-01-13 20:02 CET
Nmap scan report for 192.168.11.2
Host is up (0.0016s latency).
PORT   STATE  SERVICE
53/udp closed domain
MAC Address: 00:0E:0C:3D:CD:D1 (Intel)

Nmap done: 1 IP address (1 host up) scanned in 6.77 seconds

mickydoutza

Avatar von mickydoutza

Anmeldungsdatum:
31. Dezember 2010

Beiträge: 2185

stoffl-6781 schrieb:

So dass kommt bei einem anderen ubuntu client:

stoffl@stoffl-N150-N210-N220:~$ sudo nmap -sU 192.168.11.2 -p53

Starting Nmap 5.21 ( http://nmap.org ) at 2012-01-13 20:02 CET
Nmap scan report for 192.168.11.2
Host is up (0.0016s latency).
PORT   STATE  SERVICE
53/udp closed domain
MAC Address: 00:0E:0C:3D:CD:D1 (Intel)

Nmap done: 1 IP address (1 host up) scanned in 6.77 seconds

Versuch jetzt mal mit einem einzigen DNS-Dienst auf deinem Server, ob dann vom Client, der UDP-Port 53 des Servers, erreicht werden kann.

Strakha

Avatar von Strakha

Anmeldungsdatum:
3. Januar 2012

Beiträge: 73

Hallo stoffl-6781,

schau bitte mal auf dem DNS Server nach, ob das Client Netz berechtigt ist, den DNS abzufragen. So in etwa müsste das aussehen:

stoffl-N150-N210-N220:~# cat /etc/bind/named.conf.options 
options {
	directory "/var/cache/bind";
	allow-query     { 127.0.0.1; 192.168.11.0/24;};	
	auth-nxdomain no;    # conform to RFC1035
	listen-on-v6 { any; };
};

Wenn Dein Netz 192.168.11.0/24 nicht eingetragen ist, ergänze es bitte, dann starte den DNS deamon neu:

stoffl-N150-N210-N220:~# service bind9 restart
Stopping domain name service...: bind9 waiting for pid 16808 to die.
Starting domain name service...: bind9.

stoffl-6781

(Themenstarter)
Avatar von stoffl-6781

Anmeldungsdatum:
12. September 2010

Beiträge: 58

Wohnort: Bartholomäberg

Strakha schrieb:

Hallo stoffl-6781,

schau bitte mal auf dem DNS Server nach, ob das Client Netz berechtigt ist, den DNS abzufragen. So in etwa müsste das aussehen:

stoffl-N150-N210-N220:~# cat /etc/bind/named.conf.options 
options {
	directory "/var/cache/bind";
	allow-query     { 127.0.0.1; 192.168.11.0/24;};	
	auth-nxdomain no;    # conform to RFC1035
	listen-on-v6 { any; };
};

Wenn Dein Netz 192.168.11.0/24 nicht eingetragen ist, ergänze es bitte, dann starte den DNS deamon neu:

stoffl-N150-N210-N220:~# service bind9 restart
Stopping domain name service...: bind9 waiting for pid 16808 to die.
Starting domain name service...: bind9.

Die Sieht so aus:

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

        // If there is a firewall between you and nameservers you want
        // to talk to, you may need to fix the firewall to allow multiple
        // ports to talk.  See http://www.kb.cert.org/vuls/id/800113

        // 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     { 127.0.0.1; 192.168.11.0/24;};
        auth-nxdomain no;    # conform to RFC1035
        listen-on-v6 { any; };
};

in dem Ordner /etc/bind/ hab ich folgende Dateien angepasst: db.11.168.192 db.buenta.local named.conf.options

die db.11.168.192:

;; db.11.168.192
;; Reverselookupzone für buenta.local
;;
$TTL 2D
@       IN      SOA     srv1.buenta.local. mail.buenta.local. (
                                2006032201      ; Serial
                                        8H      ; Refresh
                                        2H      ; Retry
                                        4W      ; Expire
                                        2D )    ; TTL Negative Cache

@       IN      NS      srv1.buenta.local.

2       IN      PTR     srv1.buenta.local.
1       IN      PTR     ddwrt.buenta.local.
9       IN      PTR     rechner2.buenta.local.

Die Datei db.buenta.local

;; db.buenta.local
;; Forwardlookupzone für buenta.local
;;
$TTL 2D
@       IN      SOA     srv1.buenta.local. mail.buenta.local. (
                        2006032201      ; Serial
                                8H      ; Refresh
                                2H      ; Retry
                                4W      ; Expire
                                3H )    ; NX (TTL Negativ Cache)

@                               IN      NS      srv1.buenta.local.
                                IN      MX      10 mailserver.buenta.local.
                                IN      A       192.168.11.2

srv1                            IN      A       192.168.11.2
localhost                       IN      A       127.0.0.1
ddwrt                           IN      A       192.168.11.1
mailserver                      IN      A       192.168.11.9
rechner2                        IN      CNAME   mailserver

Habe auch die named.conf.local bearbeit:

//
// 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 "buenta.local" {
type master;
file "/etc/bind/db.buenta.local";
};

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

Was ich allerdings nicht brauche ist der Mailserver und "rechner2" ... Hab dort keinen Server am laufen .. ist noch vom WIKI so übernommen und auf meine IP adresse angepasst.

Danke für deine Hilfe soweit =)

Gruß Stoffl

Antworten |