{"id":105,"date":"2018-11-27T23:20:03","date_gmt":"2018-11-27T22:20:03","guid":{"rendered":"https:\/\/leeryanrs.com\/?p=105"},"modified":"2018-11-27T23:20:03","modified_gmt":"2018-11-27T22:20:03","slug":"find-the-dns-being-used-on-linux","status":"publish","type":"post","link":"https:\/\/leeryanrs.com\/?p=105","title":{"rendered":"Find the DNS being used on linux"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">This is useful when troubleshooting some network related issues and you need to find which DNS servers are being used. Since resolv.conf is not really used much anymore, it&#8217;s most likely that your DNS settings are set in the NIC configuration file, which is located at \/etc\/network\/interfaces.\u00a0<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You can also print which DNS is being used on a per interface basis by doing the below &#8211;\u00a0<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Identify the NIC you want to use by using\u00a0<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">ifconfig<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Once the names of the NIC&#8217;s have been printed, find the one you want and issue this command\u00a0<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">nmcli device show &lt;INTERFACE NAME> | grep IP4.DNS<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Obviously replace the &#8220;&lt;INTERFACE NAME>&#8221; with you know what.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This is useful when troubleshooting some network related issues and you need to find which DNS servers are being used. Since resolv.conf is not really used much anymore, it&#8217;s most likely that your DNS settings are set in the NIC configuration file, which is located at \/etc\/network\/interfaces.\u00a0 You can also print which DNS is being [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9,15,17],"tags":[34,50],"class_list":["post-105","post","type-post","status-publish","format-standard","hentry","category-linux","category-server","category-ubuntu","tag-linux","tag-ubuntu"],"_links":{"self":[{"href":"https:\/\/leeryanrs.com\/index.php?rest_route=\/wp\/v2\/posts\/105","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/leeryanrs.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/leeryanrs.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/leeryanrs.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/leeryanrs.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=105"}],"version-history":[{"count":0,"href":"https:\/\/leeryanrs.com\/index.php?rest_route=\/wp\/v2\/posts\/105\/revisions"}],"wp:attachment":[{"href":"https:\/\/leeryanrs.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=105"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/leeryanrs.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=105"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/leeryanrs.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=105"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}