2

I am trying to make a DNS server with bind9 on ubuntu, but when I nslookup the ip I only get the NXDOMAIN status. Same thing happens with my domain www.peliluolaXXX.net.

How to solve this?

Here are my configs and files: Do I need to submit other files?

named.conf.local

zone "peliluolaXXX.net" {
    type master;
    file "/etc/bind/db.peliluola";
};

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

db.peliluola

;
; BIND data file for local loopback interface
;
$TTL 604800
@   IN  SOA peliluolaXXX.net. XXX.jao.fi. (
        1   ; Serial
        604800  ; Refresh
        86400   ; Retry
        2419200 ; Expire
        604800 )    ;Negative Cache TTL
;
@   IN  NS  peliluolaXXX.net.
@   IN  A   172.18.0.XXX
tite216 IN  A   172.18.0.XXX
www IN  CNAME   tite216.peliluolaXXX.net.

db.kaanteinen (reverse)

;
; BIND reverse data file for local loopback interface
;
$TTL    604800
@   IN  SOA peliluolaXXX.net. XXX.jao.fi. (
                  1     ; Serial
             604800     ; Refresh
              86400     ; Retry
            2419200     ; Expire
             604800 )   ; Negative Cache TTL
;
@   IN  NS  peliluolaXXX.net.
166 IN  PTR tite216.peliluolaXXX.net.
  • 1
    Have you restarted BIND after creating the files? Does the user named has rights to read them? Have you looked at the system logs after restarting it? Where are you trying the nslookup? You probably do not want a refresh value so high. – Rui F Ribeiro Jan 17 '18 at 16:04
  • your config is called "named.conf.local". How is this config getting included into the main config? – Patrick Jan 17 '18 at 17:24
  • @Patrick it's Ubuntu so it should get included from named.conf. – roaima Jan 17 '18 at 19:15
  • Please add the exact nslookup command you're using. If you don't specify a server please also include the contents of /etc/resolv.conf – roaima Jan 17 '18 at 19:17
  • Did you look at bind logs? Did you run named-checkzone on your zonefile? – Patrick Mevzek Jan 20 '18 at 0:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.