Intranet - Installazione di DNS Intranet - Instalação do DNS Intranet - Installation du DNS Intranet - Installation du DNS Intranet - Instalación de un DNS

Packages needed for installation

A DNS (domain name server) is a server that links names to the IP addresses of computers on a network. In order to set up such a server, it is necessary to install bind and named. They can be downloaded as RPM files (for Mandrake they are bind-8.2.2P5-1mdk.i586.rpm and nameserver-6.0-3mdk.noarch.rpm; other distributions can be downloaded from freshmeat.net or rpmfind.net)

The server tuxserver (with the IP 192.168.1.1) is going to be configured as a domain name server, so as to allow clients (a Linux machine with the IP address 192.168.1.20 and a Windows machine with the IP address 192.168.1.30 - the subnet mask is 255.255.255.0) to access the services bearing the following names:

  • web server: www.tuxdomain
  • SMTP server: smtp.tuxdomain
  • POP server: pop.tuxdomain
  • News server: news.tuxdomain

Installing packages

Installating RPM packages is very simple. Just type the following commands:

rpm -ivh bind-8.2.2P5-1mdk.i586.rpm 
rpm -ivh caching-nameserver-6.0-3mdk.noarch.rpm

Before you start

Before you configure the name server, you have to edit the file /etc/resolv.conf so as to declare the domain name of your choice (here tuxdomain) and declare the local machine (with the local loop IP address - 127.0.0.1) as a name server.

So you have to make sure that the following lines are found in the file /etc/resolv.conf:

domain tuxdomain
nameserver 127.0.0.1

Adding the domain

After having installed bind and named, you can assign the domain name tuxdomain by editing the file /etc/named.conf:

options {
directory "/var/named";

};

//
// Declaring the reverse lookup zone
//
zone "0.0.127.in-addr.arpa" {
type master;

file "named.local";

};

zone "1.168.192.in-addr.arpa" {
notify no;

type master;

file "tuxdomain.rev
";

};

//
// Declaration for domain name resolution
//

zone "tuxdomain" {
notify no;

type master;

file "tuxdomain"
;

}

The first part serves as reverse lookup, meaning that it is used to find the name of a computer when given its IP address.

Creating zone files

Next, edit the file named.local found in the directory /var/named :

@	   IN	  SOA	 tuxserver.tuxdomain.
root.tuxserver.tuxdomain.


(
1997022700 ; Serial
28800 ; Refresh
14400 ; Retry
3600000 ; Expire
86400 ) ; Minimum
IN NS tuxserver.tuxdomain.
1 IN PTR localhost.

Finally, create a file called tuxdomain in the directory /var/named containing the following:

@	   IN	  SOA	 tuxserver.tuxdomain.
root.tuxserver.tuxdomain.


(
1997022700 ; Serial
28800 ; Refresh
14400 ; Retry
3600000 ; Expire
86400 ) ; Minimum

TXT "Primary DNS server"

NS tuxserver

NS tuxserver.tuxdomain.

MX 10 tuxserver

MX 20 tuxserver.tuxdomain.

localhost A 127.0.0.1

tuxserver A 192.168.1.1

www CNAME tuxserver

smtp CNAME tuxserver

pop CNAME tuxserver

news CNAME tuxserver

tux A 192.168.1.20

win A 192.168.1.30

...

MX is used to specify the name of the SMTP server Here, our server tuxserver hosts all of the services.

For reverse lookup, you need to create a file named tuxdomain.rev within /var/named containing the reverse lookup table:

@	   IN	  SOA	 tuxserver.tuxdomain.
root.tuxserver.tuxdomain.


(

1997022700 ; Serial
28800 ; Refresh
14400 ; Retry
3600000 ; Expire
86400 ) ; Minimum

IN NS tuxserver.tuxdomain.

1 IN PTR tuxserver.tuxdomain.

20 IN PTR tux.tuxdomain.

30 IN PTR win.tuxdomain.

...

Booting up the DNS

The daemon named (a daemon is an application which runs permanently in the background) may be loaded manually using the command:

/etc/rc.d/init.d/named start
In order to have the daemon named launch automatically when your computer starts, it is helpful to create links using the commands
chkconfig --level 345 named on
chkconfig --level 0126 named off

To test if it is working properly, it is recommended to "ping" the other machines on the network with the command:

ping tux

Michel Maudet

Last update on Thursday October 16, 2008 02:43:14 PM.This document entitled « Intranet - Installing a DNS » from Kioskea (en.kioskea.net) is made available under the Creative Commons license. You can copy, modify copies of this page, under the conditions stipulated by the licence, as this note appears clearly.

Best answers for « Intranet Installing a DNS » in :
Intranet - Installing a mail server Show Introduction to installation The most commonly used e-mail server in Linux is Sendmail; however, as it is very hard to configure, we will use Qmail, an alternative e-mail server, instead. Qmail is made up of a group of programs that work with...
Intranet - Installing the Linux distribution Mandrake Show Introduction to installation The server can work with any Linux distribution, but we have chosen to use the distribution Mandrake, which has the advantage of being simple to install, and includes a multitude of pre-installed applications. You can...
Installing a DynDns ShowInstalling a DynDns Configuration For DynDns.org For DNS-O-Matic (OpenDNS) Setting as default Other DynDns client under Linux Dyn Dns (Dynamic DNS ) service allows you to alias a dynamic IP address to a static hostname, allowing your...
How to install flash under firefox? ShowHow to install flash under firefox? Introduction Automatic installation Manual installation Introduction Flash is a software created in vector animation which allows image , vector graphic image, animation and videos on certain...
Why Windows is not detecting the 4 GB of RAM installed? ShowWhy Windows is not detecting the 4 GB of RAM installed? What can be done? Conclusion Windows XP or Vista 32-bit edition can not use 4 GB, there is nothing to do, it is a mathematical limit. 32-bit system can address: 2 to the...
Download Windows Installer ShowMicrosoft WindowsIinstaller is a service of installation and application configuration, allowing to manage the applications containing the MSI extension MSI. Windows Installer 3.1 is a secondary update of Windows Installer 3.0 published in...
Download Multi Install ShowBy creating a CD or CDRom, you would definitely like to add it a menu for its launching and a better browse. Muti Install is program moved forward for the creation of menu of kickoff for CD / DVD. He allows so to create numerous programs from the...
Installing a network adapter ShowPurpose The purpose of this article is to set up a network to enable data exchanges between computers, resource sharing and network games. Is it therefore necessary to install a network card in each computer that may be part of the local area...
DNS (Domain Name System) ShowWhat is DNS? Each computer directly connected to the Internet has at least one specific IP address. However, users do not want to work with numerical addresses such as 194.153.205.26 but with a domain name or more specifically addresses (called...
Operating Systems - Installing MS-DOS ShowInstalling MS-DOS When installing MS-DOS, make sure that in the BIOS the the boot disk is set to A: first, then the hard drive (boot sequence: A:, C:) Then insert disk 1 in the A: drive, power up the computer, then follow the on-screen...