Difference between revisions of "Linux and Unix DNS Configuration"

m (Fix link)
m (Added tags + a information about NetworkManager)
Line 5: Line 5:
 
= Introduction =
 
= Introduction =
  
The following describes how to configure Linux clients to use DNS servers. If you provide DNS server addresses via DHCP to your clients, configure your DHCP server to ship the address/es of your DNS server/s instead. For static configuration, continue reading.
+
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.
  
  
  
  
= General configuration (/etc/resolv.conf) =
 
  
Edit your /etc/resolv.conf and add a „nameserver“ entry for each DNS server and your search domain:
+
= Configuring the /etc/resolv.conf =
 +
 
 +
Edit your <code>/etc/resolv.conf</code>, add a <code>nameserver</code> entry for each DNS server and your <code>search</code> domain:
  
 
  nameserver 192.168.1.1
 
  nameserver 192.168.1.1
 
  nameserver 192.168.1.2
 
  nameserver 192.168.1.2
 
  search samdom.example.com
 
  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.
  
  

Revision as of 21:12, 9 October 2016


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.