Linux and Unix DNS Configuration

Revision as of 21:12, 9 October 2016 by Mmuehlfeld (talk | contribs) (Added tags + a information about NetworkManager)


Introduction

The following describes how to manually configure Linux clients to use DNS servers.

If you are running a DHCP server providing DNS settings to your client computers, configure your DHCP server to send the IP addresses of your DNS servers.



Configuring the /etc/resolv.conf

Edit your /etc/resolv.conf, add a nameserver entry for each DNS server and your search domain:

nameserver 192.168.1.1
nameserver 192.168.1.2
search samdom.example.com

Some utilities, such as NetworkManager can overwrite manual changes in that file. Consult your distribution's documentation for information about how to configure name resolution permanently.



Testing DNS resolution

See Testing_the_DNS_Name_Resolution.