Monday, January 25, 2021

How to get the Nameservers when a DNS query fails with "SERVFAIL" ?

So, I have deliberately setup a bad nameserver on my domain. The nameserver points to one of the AWS Route 53 nameservers. However I haven't actually configured anything in AWS. As expected I get a SERVFAIL response. But how do I actually check what the nameserver is ?

One way I can find out is by doing dig +trace which will show the configured NS at the bottom. But is there any other way to find out the NS ? Specifically I want to do this with python.



No comments:

Post a Comment