Lxcite’s Planet

…the ultimate solution

Configure DNS Server

This tutorial shows a simple DNS configuration steps (for a single domain only).

Domain name: e-security.co.in

Ip address: 192.168.1.22

1.) vi /etc/named.conf

=> for fast shortcut–>

–> goto 37th line

–> type <esc>11yy

–> goto 47th line

–> press p

File Contents

zone “e-security.co.in” IN {

type master;

file “e-security.co.in.for”;

allow-update { none; };

};

zone “1.168.192.in-addr.arpa” IN {

type master;

file “e-security.co.in.rev”;

allow-update { none; };

};

2.) cd /var/named/chroot/var/named/

=>make duplicate of localhost.zone and rename it as “e-security.co.in.for”

=>make duplicate of named.local and rename it as “e-security.co.in.rev”

3.) vi e-security.co.in.for

@ IN SOA @ root.e-security.co.in. (

42 ; serial (d. adams)

3H ; refresh

15M ; retry

1W ; expiry

1D ) ; minimum

IN NS ns1.e-security.co.in.

IN A 192.168.1.22

ns1 IN A 192.168.1.22

www IN A 192.168.1.22

4.) vi e-security.co.in.rev

@ IN SOA e-security.co.in. root.e-security.co.in. (

1997022700 ; Serial

28800 ; Refresh

14400 ; Retry

3600000 ; Expire

86400 ) ; Minimum

IN NS e-security.co.in.

22 IN PTR e-security.co.in.

5.) vi /etc/resolv.conf

nameserver 192.168.1.22

search e-security.co.in

6.) vi /etc/hosts

127.0.0.1 localhost.localdomain localhost

192.168.1.22 e-security.co.in

7.) vi /etc/sysconfig/network

NETWORKING=yes

HOSTNAME=e-security.co.in

8.) service named restart

9.) service network restart

TEST YOUR DNS SERVER

10.) nslookup www.e-security.co.in

11.) dig www.e-security.co.in

June 27, 2008 Posted by lxcite | Configure DNS Server, Linux | | No Comments Yet