Saturday, 23 April 2016

How to use a specific DNS server for DNS lookup ?


By default, dig command uses the DNS servers defined in your /etc/resolv.conf file.
$ dig google.com


If you want to use a different DNS server to perform the query, use @dnsserver

Example
$ dig google.com @ns1.google.com

It will use ns1.google.com as the DNS server to get the answer instead of using the DNS servers from the /etc/resolv.conf file.

No comments:

Post a Comment

Note: only a member of this blog may post a comment.