0

I have setup two VPS DNS Servers using Ubuntu 16.04.02 and PowerDNS with IP's

 DNS IP 1 169.239.180.241 [ns1.hostthrone.com Hostname]
 DNS IP 2 169.239.181.204 [ns2.hostthrone.com Hostname]

I Register new domain hostthrone.com using namecheap.com and point the name server to :

 169.239.180.241
 169.239.181.204

On First DNS Server I create Master Zone

 12 hostthrone.com  SOA n1.hostthrone.com hostthrone.com 2017073002 28800 7200 604800 86400     86400
 13  ns1.hostthrone.com  A  169.239.180.241
 14  ns2.hostthrone.com  A  169.239.181.204

on the second DNS Server i created a slave zone pointing to the master NS 169.239.180.241. I also created Reverse DNS on my VPS Provider site

522 169.239.180.241 241.180.239.169.in-addr.arpa    ns1.hostthrone.com
521 169.239.181.204 204.181.239.169.in-addr.arpa    ns2.hostthrone.com

and also Reverse DNS in powerdns control panel for each record.

The domain does not get pointed to DNS Servers or DNS is wrongly configured Any help ?

MadHatter
  • 78,442
  • 20
  • 178
  • 229
Donno
  • 31
  • 1
  • 6

2 Answers2

2

A lot of things are going wrong here. Firstly, your DNS servers don't seem to be set up right:

[me@risby ~]$ dig soa hostthrone.com @169.239.180.241
[...]
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1680
;; QUESTION SECTION:
;hostthrone.com.                        IN      SOA
[...]
[me@risby ~]$ dig soa hostthrone.com @169.239.181.204
[...]
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1680
;; QUESTION SECTION:
;hostthrone.com.                        IN      SOA

But your single biggest problem is that you haven't set the domain up with your registrar properly:

[me@risby ~]$ whois hostthrone.com
[Querying whois.verisign-grs.com]
[Redirected to whois.namecheap.com]
[Querying whois.namecheap.com]
[whois.namecheap.com]
Domain name: hostthrone.com
[...]
Name Server: dns1.registrar-servers.com
Name Server: dns2.registrar-servers.com

Whilst it is perfectly legitimate to have a domain use nameservers inside itself - that's what glue records were invented for - each registrar has a slightly different procedure for setting this up, and you have not done yours. That means your registrar is not telling the internet that your servers are authoritative for your domain, so even if they were working, the domain would not be served properly.

Thank you for not obscuring your domain name and IP addresses; that makes the question much easier to answer.

MadHatter
  • 78,442
  • 20
  • 178
  • 229
  • Surely the `;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: n` line from the first set of dig outputs should not have been removed? The status code appears to be the single most telling thing in what little is returned? – Håkan Lindqvist Jul 30 '17 at 09:32
  • @HåkanLindqvist I think everyone will have their own preferred set of diagnostic steps and things to look out for; the most significant element of the the response for me was `WARNING: recursion requested but not available`. However, to my mind, the single most important thing to show is not what I got but **what I typed**. With that, the OP can start to dig into this him/herself; can try a working lookup and see how the responses differ, and start to form his/her own hypotheses to test - and others who come later, with slightly different problems, can do likewise. – MadHatter Jul 30 '17 at 11:35
  • Fwiw, the `;; WARNING: recursion requested but not available` message is generated by `dig` when the message flags indicate that you asked for recursion (you can opt not to ask for recursion with `+norec` on the command line) but the server did not allow recursion. In the case here, with you querying an authoritative server, it's not a problem at all that it does not allow recursion, it's rather a good sign. – Håkan Lindqvist Jul 30 '17 at 11:57
  • As for *what I got* vs *what I typed*, I agree to a point. However, I think a very important aspect is *what to look for*. – Håkan Lindqvist Jul 30 '17 at 11:58
  • Any tutorial you can suggest to me please ? i added glue records to namecheap using this article https://www.namecheap.com/support/knowledgebase/article.aspx/292/10/how-can-i-update-my-personal-nameservers-ip-address but still shows whois hostthrone.com Name Server: DNS1.REGISTRAR-SERVERS.COM Name Server: DNS2.REGISTRAR-SERVERS.COM – Donno Jul 30 '17 at 17:57
  • @Donno I'm sorry, but you should direct questions about your registrar's processes in the first case to your registrar. – MadHatter Jul 31 '17 at 21:17
  • @HåkanLindqvist I was going to disagree, but on reflection I think you have a point. Feel free to edit my answer, if you think it could be improved, or try one of your own! – MadHatter Jul 31 '17 at 21:18
0

After following MadHatter answer I solved the whois hostthrone.com by using these namecheap settings :

enter image description here

My DNS server would only work for period of time after setting up hostthrone.com zone in PowerDNS

enter image description here

After a lot of googling the real problem was that that Ubuntu was installing an alpha version of PowerDNS

Here is the solution :

sudo nano /etc/apt/sources.list.d/pdns.list

deb [arch=amd64] http://repo.powerdns.com/ubuntu xenial-auth-40 main

sudo nano /etc/apt/preferences.d/pdns

Package: pdns-*
Pin: origin repo.powerdns.com
Pin-Priority: 600

curl https://repo.powerdns.com/FD380FBB-pub.asc | sudo apt-key add - && sudo apt-get update && sudo apt-get install pdns-server

If you have an error of this nature RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6 then edit /lib/systemd/system/pdns.service

#RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6

Install pdns-backend-mysql

sudo apt-get install pdns-backend-mysql
service pdns restart
netstat -tap | grep pdns

tcp        0      0 *:domain                *:*                     LISTEN                                                             1145/pdns_server-in
tcp6       0      0 [::]:domain             [::]:*                  LISTEN                                                             1145/pdns_server-in

dig hostthrone.com SOA @169.239.181.204 returns an answer still after a few days

Donno
  • 31
  • 1
  • 6