How to edit a server's resolver configuration from the command line Print

  • 0

Question

How do you edit the server's resolver configuration from the command line?

 

Answer

  1. Access the server's command line as the 'root' user via SSH or Terminal in WHM.
  2. Open the /etc/resolv.conf file in your preferred text editor.
  3. Comment out the nameserver entries you do not want by adding a # before the nameserver line.

    #nameserver 192.168.0.1

  4. Add the new nameserver entries.
  5. Save changes and exit the text editor.

Note: If you have already set up the resolver configuration via the menu in WHM, then any changes made to the /etc/resolv.conf file will be overwritten.
In addition, please note that using public DNS servers, such as Google's 8.8.8.8 and 8.8.4.4, may cause RBLs, such as Spamhaus, to not function correctly.

 

Additional Resources

How to edit your server's resolver configuration via WHM


Was this answer helpful?
Back

Send Message