0

I have a VPS on ubuntu. Also I configured DNS (ns1.example.com, ns2.example.com) and connected 2 test domains to those NS (I wrote those NS in record in domain registration site for 2 example domains). Now if i search these domains with nslookup - there is no records found. I want to create a record which will connect these domains with IPs of name servers. For firstexample.com it will be 31.172.74.55 (made up IP for ns1.example.com) and for secondexample.com it will be 79.132.156.160 (made up IP for ns2.example.com). How can I do this? I'm using bind, created DNS through vesta but I want to know how to create a record with terminal to write a script that will create it automatically for new domains to save time. I wrote this command nslookup csgo.sbs. Result was connection timed out; no servers could be reached. dig has same reply

4
  • @Tilman thank you for reply. I mean that I write those NS in record in domain registration site for 2 example domains. I don't know if I'm allowed to post real domains but if you want to check - I wrote this command nslookup csgo.sbs. Result was connection timed out; no servers could be reached. dig has same reply Sep 19, 2022 at 11:51
  • @Tilman machine is Ubuntu 18.04.6 LTS Sep 19, 2022 at 12:02
  • Please edit your question to add the information in your first comment so I can write an answer to it. There's no rule on Stack Exchange against posting real domains and I encourage you to do so except if your business forbids it. It would be best to post the name of the domain registration site and the exact entries you made there. Regarding your second comment, I wasn't asking about the OS but from which actual machine you did the nslookup test: one of the name servers or some other machine, and if the latter, situated where network wise.
    – Tilman
    Sep 19, 2022 at 14:08
  • @Tilman I edited my question. I did nslookup on machine that hosts DNS Sep 19, 2022 at 14:18

1 Answer 1

0

In order to diagnose the correct registration and good working order of nameservers for a domain, retrace the recursive lookup manually starting at the root nameservers until you reach the target domain or encounter an error. In your case, this yields:

~$ dig +noall +authority +answer ns sbs.
sbs.                    170959  IN      NS      d.nic.sbs.
sbs.                    170959  IN      NS      c.nic.sbs.
sbs.                    170959  IN      NS      a.nic.sbs.
sbs.                    170959  IN      NS      b.nic.sbs.
~$ dig +noall +authority +answer ns sbs. @g.root-servers.net.
sbs.                    172800  IN      NS      a.nic.sbs.
sbs.                    172800  IN      NS      b.nic.sbs.
sbs.                    172800  IN      NS      c.nic.sbs.
sbs.                    172800  IN      NS      d.nic.sbs.
~$ dig +noall +authority +answer ns csgo.sbs. @a.nic.sbs.
csgo.sbs.               3600    IN      NS      ns1.makeuppro.shop.
csgo.sbs.               3600    IN      NS      ns2.makeuppro.shop.
~$ dig +noall +authority +answer ns csgo.sbs. @ns1.makeuppro.shop.
;; connection timed out; no servers could be reached

~$ dig +noall +authority +answer ns csgo.sbs. @ns2.makeuppro.shop.
;; connection timed out; no servers could be reached

This shows that the servers ns1.makeuppro.shop and ns1.makeuppro.shop are correctly registered as nameservers for the domain csgo.sbs but do not answer DNS queries from the Internet.

~$ dig +noall +authority +answer a ns2.makeuppro.shop.
ns2.makeuppro.shop.     1740    IN      A       79.132.138.120
~$ dig +noall +authority +answer a ns1.makeuppro.shop.
ns1.makeuppro.shop.     1799    IN      A       79.132.138.120

tell us that both those server names refer to the the same IPv4 address, 79.132.138.120, so they are actually one and the same server.

The next step would be to check whether that address is correct, whether UDP packets to port 53 at this address are reaching that server (instead of being, for example, blocked by a firewall), whether BIND (or another DNS service) is running on that server and listening on port 53, whether it is receiving and responding to those packets, and whether the responses are reaching the open Internet (instead of again, for example, being blocked by a firewall).

Once you've pinpointed the problem in that way, you can take appropriate measures to resolve it, like fixing a startup problem in your BIND configuration or entering into negotiations with your VPS provider to open port 53 in their firewall.

2
  • Thank you for reply. Adress is correct, I disabled firewall so port 53 is not an issue. The problem is that nslookup csgo.sbs is not responding with IP of NS Sep 20, 2022 at 10:08
  • According to the research I did for you the problem is that the nameserver at 79.132.138.120 is not responding at all. Once you've solved that problem you can address any further problem that might remain.
    – Tilman
    Sep 20, 2022 at 22:03

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .