≡ Menu

How to find out which DNS server I am using?

The question is – how to find out which DNS servers I am using on my Windows or Linux box?

DNS or domain name system is a way to convert domain names like google.com to IP addresses like 8.8.8.8. When you send a request for google.com on a web browser, the web browser asks the operating system for its IP address. The operating system then asks the DNS server for resolution of the domain name to its IP address. The recursive DNS server then asks the authoritative DNS servers of the domain name (e.g. ns1.google.com) for the IP address. The IP address returned by the authoritative name servers is then cached at the recursive DNS servers and returned to the browser. The browser then sends an HTTP request to the IP address and shows the page on the window.

How to find the DNS servers on a Linux/Unix based system?

A Linux system has a file called resolv.conf. This file contains the IP addresses of the name servers that provide DNS resolution. These IP addresses could be the servers provided by the internet service provider or by some other company like Google public DNS or OpenDNS.

To list the DNS servers in resolv.conf, type the following command on your Linux command prompt (SSH or local):

cat /etc/resolv.conf

This will output something like the following:

nameserver 209.50.225.11
nameserver 209.50.225.14

These are the name servers that your machine uses for DNS resolution. Note that these are IP addresses of the name servers and not the names. Note that the procedure is the same for any flavor of Linux be it an Apple OS, CentOS, Debian, Ubuntu or Fedora. I believe FreeBSD also uses resolv.conf as part of its DNS resolution infrastructure.

How to list the DNS servers on a Windows system?

On Windows (NT/XP/7/Vista/8/2000/2003), there is a command that you can use on the command prompt that will list the DNS servers. The command is called IP config:

ipconfig /all

This command will list the DNS servers for all of your network connections. It will also list other useful information about your machines network connections.

Find the lines that look like the following:

   DNS Servers . . . . . . . . . . . : 209.50.225.11
                                       209.50.225.14

These are your DNS servers used on your Windows system.

Incoming search terms:

  • DNS_PROBE_FINISHED_BAD_CONFIG (410)
  • what dns am i using (10)

{ 0 comments… add one }

Leave a Comment