The DNS system is one of the most important parts of the internet infrastructure. It converts easy-to-remember domain names, into IP (and IPv6) addresses, which are not end user-friendly.
Regardless of the Linux operating system you are using (like Ubuntu, CentOS, Debian, Arch, Redhat, etc.), the process of determining which DNS server is currently being used to resolve the domain is the same.
To determine which DNS server is being used, you just need to look at the contents of the /etc/resolv.conf file. This can be done via an editing tool, displaying files such as vi, nano, cat, tail ...
Show active DNS servers on your VPS:
$ cat /etc/resolv.conf
Result :
nameserver 8.8.8.8
nameserver 8.8.4.4
You can get at least one or more DNS servers. In this example, 8.8.8.8 and 8.8.4.4.
Note that this must be an IP address and not a domain name.
Normally, by default the provider will use their namesever for resolution, you can change this default namesever to google namesever by deleting the old namesever and adding the following 2 lines to the file. /etc/resolv.conf:
nameserver 8.8.8.8
nameserver 8.8.4.4
Good luck.
0 Comments