Fattur
By:
Fattur

I Created DNS But it's local only and cannot ping it

July 14, 2015 2.1k views
DNS CentOS

Hi, on centos 7 i installed bind and I Created DNS But it's local only and cannot ping it. Or access it. And on my domain panel I set the name servers as ns1.fatihinnotdefteri.com
ns2.fatihinnotdefteri.com

Forward records are:

$TTL 86400 
@ IN SOA fatihinnotdefteri.com. root.fatihinnotdefteri.com. ( 
             2011071001 ;Serial 
             3600 ;Refresh 
             1800 ;Retry 
             604800 ;Expire 
             86400 ;Minimum TTL  
       ) 
@    IN     NS     ns1.fatihinnotdefteri.com. 
@    IN     NS     ns2.fatihinnotdefteri.com. 
@    IN     A      46.101.247.88
@    IN     MX  10 mail.fatihinnotdefteri.com.
mail IN     A      46.101.247.88
ns1  IN     A      46.101.247.88
ns2  IN     A      46.101.247.88
www         IN   CNAME  fatihinnotdefteri.com.
ftp         IN   CNAME  fatihinnotdefteri.com.

and reverse records are

$TTL 86400 
@ IN SOA fatihinnotdefteri.com. root.fatihinnotdefteri.com. ( 
             2011071001 ;Serial 
             3600 ;Refresh 
             1800 ;Retry 
             604800 ;Expire 
             86400 ;Minimum TTL  
       ) 
@          IN    NS       ns1.fatihinnotdefteri.com. 
@          IN    NS       ns2.fatihinnotdefteri.com. 
@          IN    PTR      fatihinnotdefteri.com
ns1        IN    A        46.101.247.88
ns2        IN    A        46.101.247.88

and these are the parts of my named.conf

options {
    listen-on port 53 { 127.0.0.1;46.101.247.88; };
    listen-on-v6 port 53 { ::1; };
    directory   "/var/named";
    dump-file   "/var/named/data/cache_dump.db";
    statistics-file "/var/named/data/named_stats.txt";
    memstatistics-file "/var/named/data/named_mem_stats.txt";
    allow-query     { localhost;46.101.192.1/18; };



zone "fatihinnotdefteri.com" IN { 
type master; 
file "forward.notdefteri"; 
allow-update { none; }; 
}; 

zone "247.101.46.in-addr.arpa" IN { 
type master; 
file "reverse.notdefteri"; 
allow-update { none; }; 
};

4 Answers

Did you create a glue record at your DNS registrar? The dns nameservers cannot be resolved so looks like it isn't created.

If you want to host your own nameservers on your own droplet you need to have a glue record setup at your DNS registrar. With this the www gets a resolve of your dns registrar of the namserver ips.

  • @          IN    NS       ns1.fatihinnotdefteri.com. 
    ns1  IN     A      46.101.247.88
    

    isn't this makes a glue record?

Thats in your own bind server, but you need to have a glue record at your registrar to get it working.

  • There is something called "define/create name server" but i already defined it and it doesn't works.
    http://i.imgur.com/LRVr8vZ.png

    This is not setting the name server. It's called something else. I am not sure what to do now.

That shown in the picture should work and create a glue record. When did you create this? Could be that you need to wait dor a global dns update and your ISP dns update.

Have you also got the ports forwarded for DNS when using a firewall? And Bind is running on it etc?

  • firewall is currently not working so i didn't forwarded any ports but that should be ok. named service is running. Let's wait for a day or two too then. But what if it doesn't works?

Usually it takes around 24hrs. If it doesnt work we need to find out why not ;) What output do you get locally with

dig fatihinnotdefteri.com ANY
  • login as: root
    root@46.101.247.88's password:
    Last login: Tue Jul 14 19:33:05 2015 from 88.242.198.94.dynamic.ttnet.com.tr
    ABRT has detected 1 problem(s). For more info run: abrt-cli list --since 1436891585
    [root@notdeftericentos ~]# dig fatihinnotdefteri.com ANY
    
    ; <<>> DiG 9.9.4-RedHat-9.9.4-18.el7_1.1 <<>> fatihinnotdefteri.com ANY
    ;; global options: +cmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 47959
    ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 5, AUTHORITY: 0, ADDITIONAL: 4
    
    ;; OPT PSEUDOSECTION:
    ; EDNS: version: 0, flags:; udp: 4096
    ;; QUESTION SECTION:
    ;fatihinnotdefteri.com.         IN      ANY
    
    ;; ANSWER SECTION:
    fatihinnotdefteri.com.  86400   IN      SOA     fatihinnotdefteri.com. root.fatihinnotdefteri.com. 2011071001 3600 1800 604800 86400
    fatihinnotdefteri.com.  86400   IN      NS      ns2.fatihinnotdefteri.com.
    fatihinnotdefteri.com.  86400   IN      NS      ns1.fatihinnotdefteri.com.
    fatihinnotdefteri.com.  86400   IN      A       46.101.247.88
    fatihinnotdefteri.com.  86400   IN      MX      10 mail.fatihinnotdefteri.com.
    
    ;; ADDITIONAL SECTION:
    ns1.fatihinnotdefteri.com. 86400 IN     A       46.101.247.88
    ns2.fatihinnotdefteri.com. 86400 IN     A       46.101.247.88
    mail.fatihinnotdefteri.com. 86400 IN    A       46.101.247.88
    
    ;; Query time: 2 msec
    ;; SERVER: 46.101.247.88#53(46.101.247.88)
    ;; WHEN: Wed Jul 15 02:49:59 EEST 2015
    ;; MSG SIZE  rcvd: 212
    
    [root@notdeftericentos ~]# ^C
    [root@notdeftericentos ~]# ; <<>> DiG 9.9.4-RedHat-9.9.4-18.el7_1.1 <<>> fatihinnotdefteri.com ANY
    -bash: syntax error near unexpected token `;'
    [root@notdeftericentos ~]# ;; global options: +cmd
    -bash: syntax error near unexpected token `;;'
    [root@notdeftericentos ~]# ;; Got answer:
    -bash: syntax error near unexpected token `;;'
    [root@notdeftericentos ~]# ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 47959
    -bash: syntax error near unexpected token `;;'
    [root@notdeftericentos ~]# ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 5, AUTHORITY: 0, ADDITIONAL: 4
    -bash: syntax error near unexpected token `;;'
    [root@notdeftericentos ~]#
    [root@notdeftericentos ~]# ;; OPT PSEUDOSECTION:
    -bash: syntax error near unexpected token `;;'
    [root@notdeftericentos ~]# ; EDNS: version: 0, flags:; udp: 4096
    -bash: syntax error near unexpected token `;'
    [root@notdeftericentos ~]# ;; QUESTION SECTION:
    -bash: syntax error near unexpected token `;;'
    [root@notdeftericentos ~]# ;fatihinnotdefteri.com.         IN      ANY
    -bash: syntax error near unexpected token `;'
    [root@notdeftericentos ~]#
    [root@notdeftericentos ~]# ;; ANSWER SECTION:
    -bash: syntax error near unexpected token `;;'
    [root@notdeftericentos ~]# fatihinnotdefteri.com.  86400   IN      SOA     fatihinnotdefteri.com. root.fatihinnotdefteri.com. 2011071001 3600 1800 604800 86400
    fatihinnotdefteri.com.  86400   IN      NS      ns2.fatihinnotdefteri.com.
    fatihinnotdefteri.com.  86400   IN      NS      ns1.fatihinnotdefteri.com.
    fatihinnotdefteri.com.  86400   IN      A       46.101.247.88
    fatihinnotdefteri.com.  86400   IN      MX      10 mail.fatihinnotdefteri.com.
    
    ;; ADDITIONAL SECTION:
    ns1.fatihinnotdefteri.com. 86400 IN     A       46.101.247.88
    ns2.fatihinnotdefteri.com. 86400 IN     A       46.101.247.88
    mail.fatihinnotdefteri.com. 86400 IN    A       46.101.247.88
    
    ;; Query time: 2 msec
    ;; SERVER: 46.101.247.88#53(46.101.247.88)
    bash: fatihinnotdefteri.com.: command not found...
    ;; WHEN: Wed Jul 15 02:49:59 EEST 2015
    ;; MSG SIZE  rcvd: 212
    
    [root@notdeftericentos ~]# fatihinnotdefteri.com.  86400   IN      NS      ns2.fatihinnotdefteri.com.
    bash: fatihinnotdefteri.com.: command not found...
    [root@notdeftericentos ~]# fatihinnotdefteri.com.  86400   IN      NS      ns1.fatihinnotdefteri.com.
    bash: fatihinnotdefteri.com.: command not found...
    [root@notdeftericentos ~]# fatihinnotdefteri.com.  86400   IN      A       46.101.247.88
    bash: fatihinnotdefteri.com.: command not found...
    [root@notdeftericentos ~]# fatihinnotdefteri.com.  86400   IN      MX      10 mail.fatihinnotdefteri.com.
    bash: fatihinnotdefteri.com.: command not found...
    [root@notdeftericentos ~]#
    [root@notdeftericentos ~]# ;; ADDITIONAL SECTION:
    -bash: syntax error near unexpected token `;;'
    [root@notdeftericentos ~]# ns1.fatihinnotdefteri.com. 86400 IN     A       46.101.247.88
    bash: ns1.fatihinnotdefteri.com.: command not found...
    [root@notdeftericentos ~]# ns2.fatihinnotdefteri.com. 86400 IN     A       46.101.247.88
    bash: ns2.fatihinnotdefteri.com.: command not found...
    [root@notdeftericentos ~]# mail.fatihinnotdefteri.com. 86400 IN    A       46.101.247.88
    bash: mail.fatihinnotdefteri.com.: command not found...
    [root@notdeftericentos ~]#
    [root@notdeftericentos ~]# ;; Query time: 2 msec
    -bash: syntax error near unexpected token `;;'
    [root@notdeftericentos ~]# ;; SERVER: 46.101.247.88#53(46.101.247.88)
    -bash: syntax error near unexpected token `;;'
    [root@notdeftericentos ~]# ;; WHEN: Wed Jul 15 02:49:59 EEST 2015
    -bash: syntax error near unexpected token `;;'
    [root@notdeftericentos ~]# ;; MSG SIZE  rcvd: 212
    -bash: syntax error near unexpected token `;;'
    [root@notdeftericentos ~]#
    [root@notdeftericentos ~]#
    
    
  • Okey it's already past 24 hours and still nothing.

Have another answer? Share your knowledge.