I have a domain like example.com which I have from google domains. I created 2 nameservers and called them dns1.example.com and dns2.example.com. i finished their configuration and opened port 53 on them (22 was already open). I then added them as glue records in google domain dns settings page. Now is there a way to test the glue records before switching the nameservers? What I tried is to ssh into the machine using the address dns1.example.com. but that does not work, it is not able to resolve the host. Ssh with IP address works. Why is the glue record not able to resolve the host?
I tested it with the command:
dig @dns1.example.com example.com
I get the error:
dig: couldn't get address for 'dns1.example.com': failure
If I do
dig +norec @h.gtld-servers.net. example.com NS
I do get the nameservers listed with the correct IP addresses in the ADDITIONAL SECTION.
Why is not able to get address for dns1.example.com?