Set DNS through SSH

Add name servers to the configuration file
On Linux, the DNS servers that the system uses for name resolution are defined in the /etc/resolv.conf file. That file should contain at least one nameserver line. Each nameserver line defines a DNS server.
The name servers are prioritized in the order the system finds them in the file. Use the IP addresses of the name servers when entering them, because the system won’t know what to do with domain names
until after it knows how to get to the DNS servers.

Open the resolv.conf file with an editor, such as nano, to make the necessary changes (if it doesn’t exist already, this command creates the file).

#sudo nano /etc/resolv.conf

Modify or enter nameserver as follows:
nameserver IP-ADDRESS
nameserver IP-ADDRESS

Save and close the file. To test DNS configuration type any one of the following command:
$host google.com

If you see valid output such as actual IP address or able to ping to remote server via hostname, it means that the dns is working for you
  • 0 A felhasználók hasznosnak találták ezt
Hasznosnak találta ezt a választ?

Kapcsolódó cikkek

Increase PHP file Upload size in windows server 2008

The php.ini file is the default configuration file for running applications that require PHP. It...

Setup Basic POP3/IMAP Mail Server in Centos/RHEL

Setup Basic POP3/IMAP Mail Server in Centos/RHELSetting up a mail server can be quite...

How Do I access RDP

Remote Desktop Protocol (RDP) is a proprietary protocol developed by Microsoft, which provides a...

Update Time-Zone on OpenVZ VPS

OpenVZ will reflect the host server’s time by default, You can configure your VPS with custom...

Enable TUN/TAP in Solus VM

 TAP (as in network tap) simulates a link layer device and it operates with layer 2 packets such...