How do I find the authoritative name-server for a domain name?

前端 未结 12 1969
你的背包
你的背包 2021-01-29 17:17

How can I find the origins of conflicting DNS records?

12条回答
  •  醉话见心
    2021-01-29 17:30

    I have found that for some domains, the above answers do not work. The quickest way I have found is to first check for an NS record. If that doesn't exist, check for an SOA record. If that doesn't exist, recursively resolve the name using dig and take the last NS record returned. An example that fits this is analyticsdcs.ccs.mcafee.com.

    1. Check for an NS record

    host -t NS analyticsdcs.ccs.mcafee.com.

    1. If no NS found, check for an SOA record

    host -t SOA analyticsdcs.ccs.mcafee.com.

    1. If neither NS or SOA, do full recursive and take the last NS returned

    dig +trace analyticsdcs.ccs.mcafee.com. | grep -w 'IN[[:space:]]*NS' | tail -1

    1. Test that the name server returned works

    host analyticsdcs.ccs.mcafee.com. gtm2.mcafee.com.

提交回复
热议问题