Servidor DNS problema con la resolución de nombres

3 envíos / 0 nuevos
Último envío
#1 Dom, 13/03/2022 - 14:17
@paco
Imagen de @paco
Desconectado/a
se unió: 05/03/17

Servidor DNS problema con la resolución de nombres

Estado: 
[SOLUCIONADO]

Hola.

Estoy montándome un servidor con Debian 11, y a la hora de configurar las DNS locales, me devuelve errores en la resolucion de nombres.

El nombre de mi dominio es miva.sytes.net y utilizo noip porque tengo IP dimanicas en casa.

 

/etc/bind/named.conf.local

//
// Do any local configuration here
//

zone "miva.sytes.net" {
    type master;
    file "/etc/bind/db.miva.sytes.net";
};

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


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

 

/etc/bind/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";
include "/etc/bind/named.conf.local";
include "/etc/bind/named.conf.default-zones";

 

/etc/bind/named.conf.options

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 {

                // Google Public DNS (IPv4)
                8.8.8.8;
                8.8.4.4;
                // Google Public DNS (IPv6)
                2001:4860:4860::8888;
                2001:4860:4860::8844;

                // www.noip.com servers
                158.247.7.200;

                // ADSL router
                192.168.1.1;
        };

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

        //========================================================================
        // If BIND logs error messages about the root key being expired,
        // you will need to update your keys.  See https://www.isc.org/bind-keys
        //========================================================================
        dnssec-validation auto;

        auth-nxdomain no;    # conform to RFC1035
        // listen-on-v6 { any; };
};

 

/etc/bind/db.miva.sytes.net

;
; BIND zone file for miva.sytes.net
;

$TTL    3D
@       IN      SOA     ns.miva.sytes.net.    root.miva.sytes.net. (
                        2017061201      ; serial
                        8H              ; refresh
                        2H              ; retry
                        4W              ; expire
                        1D )            ; minimum
;
                NS      ns              ; Inet address of name server
                MX      10 mail         ; Primary mail exchanger

ns              A       192.168.1.100
mail            A       192.168.1.100

miva.sytes.net. A       192.168.1.100
server          A       192.168.1.100

virtual         A       192.168.1.101

router          A       192.168.1.1     ; router ADSL
gateway         CNAME   router
gw              CNAME   router


proxy           CNAME   server
www             CNAME   server
ftp             CNAME   server


 

/etc/bind/db.1.168.192
 

;
; BIND zone file for 192.168.1.xxx
;

$TTL    3D
@       IN      SOA     ns.miva.sytes.net.    root.miva.sytes.net. (
                        2017061201      ; serial
                        8H              ; refresh
                        2H              ; retry
                        4W              ; expire
                        1D )            ; minimum
;
                NS      ns.miva.sytes.net.    ; Nameserver address

100             PTR     server.miva.sytes.net.
100             PTR     ns.miva.sytes.net.
100             PTR     mail.miva.sytes.net.
101             PTR     virtual.miva.sytes.net.
1               PTR     router.miva.sytes.net.

 

Los resultados de 

root@debian:~# sudo named-checkzone 1.168.192.in-addr.arpa /etc/bind/db.1.168.192
zone 1.168.192.in-addr.arpa/IN: loaded serial 2017061201
OK
root@debian:~# sudo named-checkzone miva.sytes.net /etc/bind/db.miva.sytes.net
zone miva.sytes.net/IN: loaded serial 2017061201
OK

 

Si hago nslookup a miva.sytes.net 

root@debian:~# nslookup miva.sytes.net
Server:         127.0.0.1
Address:        127.0.0.1#53

Non-authoritative answer:
Name:   miva.sytes.net
Address: 79.152.185.224

 

Pero si pido que resuelva server o gayeway no funciona

root@debian:~# nslookup server
Server:         127.0.0.1
Address:        127.0.0.1#53

** server can't find server: NXDOMAIN



root@debian:~# nslookup gateway
Server:         127.0.0.1
Address:        127.0.0.1#53

** server can't find gateway: NXDOMAIN

 

Aqui dejo tambien mi fichero /etc/resolv.conf

domain miva.sytes.net
search miva.sytes.net
nameserver 127.0.0.1
nameserver ::1

nameserver 192.168.1.10

 

Mié, 25/05/2022 - 12:01
p4md4
Imagen de p4md4
Desconectado/a
se unió: 17/10/16

¿ solucionaste ?

..:: Aprendizaje Empirico ::..

Mié, 25/05/2022 - 14:03
@paco
Imagen de @paco
Desconectado/a
se unió: 05/03/17

Hola.

Creo que si.

Te digo que lo creo porque no sé muy bien como hacer una comprobación, mas alla de revisar que resuelve las IP lo que le pido y las url

nslookup miva.sytes.net
Server:         192.168.1.100
Address:        192.168.1.100#53

Name:   miva.sytes.net
Address: 192.168.1.100


nslookup gateway
Server:         192.168.1.100
Address:        192.168.1.100#53

gateway.miva.sytes.net  canonical name = router.miva.sytes.net.
Name:   router.miva.sytes.net


nslookup google.es
Server:         192.168.1.100
Address:        192.168.1.100#53

Non-authoritative answer:
Name:   google.es
Address: 142.250.201.67
Name:   google.es
Address: 2a00:1450:4003:811::2003


nslookup google.com
Server:         192.168.1.100
Address:        192.168.1.100#53

Non-authoritative answer:
Name:   google.com
Address: 142.250.200.78
Name:   google.com
Address: 2a00:1450:4003:80d::200e



nslookup exdebian.org
Server:         192.168.1.100
Address:        192.168.1.100#53

Non-authoritative answer:
Name:   exdebian.org
Address: 199.180.134.205

Yo creo que funciona, y ademas llevo varios meses y funciona sin problemas, y accedo muy rapido a los sitios.

Eso sí. Repetí paso a paso el manual de la pagina de Debian -->  https://servidordebian.org/es/buster/intranet/start

De echo, consegui montarme un Nextclod privado en el server, donde comparto cosas con mismhijos y funciona muy bien, salvo un problemilla que me surge ahora y que he expuesto en otro hilo ->  https://exdebian.org/foro/migrar-de-php73-php74-en-nextcloud

Estoy súper contento de ir haciendo cosas con Debian, e ir aprendiendo.

Gracias