|
Configure linux dns server step by step guide example and implementation |
| Home | Peer to Peer | CompTIA N+ | CCNA | MCSE | MCITP | RHCE | Interview | Tips n Tricks |
How to configure linux dns server step by step guide Example and ImplementationA DNS server, or name server, is used to resolve an IP address to a hostname or vice versa.
The entire hostname with its domain such as server.example.com is called a fully qualified domain name (FQDN). The right-most part of the FQDN such as .com or .net is called the top level domain, with the remaining parts of the FQDN, which are separated by periods, being sub-domains. These sub-domains are used to divide FQDNs into zones, with the DNS information for each zone being maintained by at least one authoritative name server. The authoritative server that contains the master zone file, which can be modified to update DNS information about the zone, is called the primary master server, or just master server. The additional name servers for the zone are called secondary servers or slave servers. Secondary servers retrieve information about the zone through a zone transfer from the master server or from another secondary server. DNS information about a zone is never modified directly on the secondary server chroot featureschroot feature is run named as user named, and it also limit the files named can see. When installed, named is fooled into thinking that the directory /var/named/chroot is actually the root or / directory. Therefore, named files normally found in the /etc directory are found in /var/named/chroot/etc directory instead, and those you would expect to find in /var/named are actually located in /var/named/chroot/var/named. The advantage of the chroot feature is that if a hacker enters your system via a BIND exploit, the hacker's access to the rest of your system is isolated to the files under the chroot directory and nothing else. This type of security is also known as a chroot jail. Configure dns serverIn this example we will configure a dns server and will test from client side. For this example we are using three systems one linux server one linux clients and one window clients.
main configuration file for dns server is named.conf. By default this file is not created in /var/named/chroot/etc/ directory. Instead of named.conf a sample file /var/named/chroot/etc/named.caching-nameserver.conf is created. This file is use to make a caching only name server. You can also do editing in this file after changing its name to named.conf to configure master dns server or you can manually create a new named.conf file.
We are using bind's chroot features so all our necessary files will be located in chroot directory. Set directory location to /var/named. Further we will set the location of forward zone and reverse lookup zone files. If you cannot create this file manually then download this file and copy to /var/named/chroot/etc/ To download do right click here and choose save link As..
Configure zone fileWe have defined two zone files example.com.zone for forward zone and 0.168.192.in-addr.arpa for reverse zone. These files will be store in /var/named/chroot/var/named/ location. We will use two sample files for creating these files.
To download do right click here and choose save link As..
To download do right click here and choose save link As..
If service restart without any error means you have successfully configured master name server in our next article we will learn how to configure salve dns server and test it. |
|||||
|
|
|
|