Question
How do you edit the server's resolver configuration from the command line?
Answer
- Access the server's command line as the 'root' user via SSH or Terminal in WHM.
- Open the
/etc/resolv.conffile in your preferred text editor. -
Comment out the
nameserverentries you do not want by adding a#before thenameserverline.#nameserver 192.168.0.1
- Add the new
nameserverentries. - 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.