Monday, May 16, 2011

Dns Configuration

1.Required Packages

*bind
*bind-utils
*bind-devel
*caching-nameserver

bind - Berkeley Internet Name Domain

2. Port Number

*DNS - 53
*RDNS - 993

3.Protocols Required

*UDP - User Datagram Protocol
*TCP - Transmission Control Protocol

4.Services

/etc/init.d/named restart/stop/start/reload/configtest

5.Configuration Files

* /etc/named.caching-nameserver.conf
* /etc/named.rfc1912.zones
* /etc/named

6.Daemon

/usr/sbin/named


[root@192.168.5.50:/var/named/chroot/var/named ]# cat /var/named/chroot/etc/named.caching-nameserver.conf
//
// named.caching-nameserver.conf
//
// Provided by Red Hat caching-nameserver package to configure the
// ISC BIND named(8) DNS server as a caching only nameserver
// (as a localhost DNS resolver only).
//
// See /usr/share/doc/bind*/sample/ for example named configuration files.
//
// DO NOT EDIT THIS FILE - use system-config-bind or an editor
// to create named.conf - edits to this file will be lost on
// caching-nameserver package upgrade.
//
options {
# listen-on port 53 { 127.0.0.1; };
# listen-on-v6 port 53 { ::1; };
directory "/var/named";
dump-file "/var/named/data/cache_dump.db";
statistics-file "/var/named/data/named_stats.txt";
memstatistics-file "/var/named/data/named_mem_stats.txt";
# query-source port 53;
# query-source-v6 port 53;
# allow-query { localhost; };
};
logging {
channel default_debug {
file "data/named.run";
severity dynamic;
};
};
view localhost_resolver {
# match-clients { localhost; };
match-destinations { localhost; };
recursion yes;
include "/etc/named.rfc1912.zones";
};

[root@192.168.5.50:/var/named/chroot/var/named ]# cat /var/named/chroot/etc/named.rfc1912.zones
// named.rfc1912.zones:
//
// Provided by Red Hat caching-nameserver package
//
// ISC BIND named zone configuration for zones recommended by
// RFC 1912 section 4.1 : localhost TLDs and address zones
//
// See /usr/share/doc/bind*/sample/ for example named configuration files.
//
zone "." IN {
type hint;
file "named.ca";
};

zone "localdomain" IN {
type master;
file "localdomain.zone";
allow-update { none; };
};

zone "localhost" IN {
type master;
file "localhost.zone";
allow-update { none; };
};

zone "net50-mail.com" IN {
type master;
file "net50.for";
allow-update { none; };
};

zone "0.0.127.in-addr.arpa" IN {
type master;
file "named.local";
allow-update { none; };
};

zone "5.168.192.in-addr.arpa" IN {
type master;
file "net50.rev";
allow-update { none; };
};

zone "0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa" IN {
type master;
file "named.ip6.local";
allow-update { none; };
};

zone "255.in-addr.arpa" IN {
type master;
file "named.broadcast";
allow-update { none; };
};

zone "0.in-addr.arpa" IN {
type master;
file "named.zero";
allow-update { none; };
};

[root@192.168.5.50:/var/named/chroot/var/named ]# cat net50.for
$TTL 86400
@ IN SOA net50-mail.com. root.net50-mail.com. (
1997022700 ; Serial
28800 ; Refresh
14400 ; Retry
3600000 ; Expire
86400 ) ; Minimum
IN NS 192.168.5.50
net50-mail.com. IN A 192.168.5.50
server.net50-mail.com. IN A 192.168.5.50
www CNAME server.net50-mail.com.

$TTL 86400
@ IN SOA net50-mail.com. root.net50-mail.com. (
1997022700 ; Serial
28800 ; Refresh
14400 ; Retry
3600000 ; Expire
86400 ) ; Minimum
IN NS 192.168.5.50
50 IN PTR net50-mail.com.

1 comment: