Вы находитесь на странице: 1из 3

options {

directory "/var/named";
allow-query { 192.168.135.0/24; 192.168.136.0/24; };
};

acl "secureserver"{
{ 127.0.0.1; 192.168.135.2; };
};

********************************************************************
Configure as Root Hint - named.root
********************************************************************
Command to get this file right from redhat
# wget --user=ftp --password=ftp
ftp://ftp.rs.internic.net/domain/db.cache -O /var/named/named.root

The Code ...


# vi /etc/named.conf
zone "." in {
type hint;
file "named.root";
};

zone "suned.sun.com" in {
type master;
file "suned.sun.com.dns";
allow-transfer {"secureserver";};
allow-update {"secureserver"};
allow-query { 127.0.0.1; 192.168.135.0/24; };
};

zone "gv.com.my" in {
type slave;
file "gv.com.my.dns"';
masters
{
192.168.135.2; # <- slave server
};
};

zone "100.128.in-addr.arpa" in {
type master;
file "suned.sun.com.dns.rev";
};

zone "0.0.127.in-addr.arpa" in {
type master;
file "localhost.rev";
};

/* Notes
/* allow-updates allow DHCP server to autamatically update the DNS
server with host information
/* allow-transfer limit to which slave server will be able to receive
dns database transfer from the master server
/* allow-query permits onli certain network/clients to dns query the
server

/* NAMED.conf consistency check


named-checkconf and named-checkzone cmd to check the integrity of the
named.conf file
example
# named-checkconf
# named-checkzone suned.sun.com suned.sun.com.dns.rev
*/

/* DNS Logging - named.conf(4)

logging {
channel logfile {
file "/var/named/bind-log";
print-time yes;
severity debug 9;
print-category yes;
print-severity yes;
};
category default { default_syslog; logfile; };
category queries { logfile; };
};

********************************************************************
Zone File keywords
********************************************************************
is a text file contains information that defines mappings between
domain names and IP address and other resources, organized in form of
resource records (RR).

$ORIGIN example.com. ; designates the start of this zone file in the


name space
$TTL 86400 ; The default expiration time of a resource record in
seconds. Is 24hrs * 60 * 60 = 86400 sec
1001; serial number of this zone file
28800; slave refresh time (8hrs)
7200 ; slave retry time in case of a problem (2hrs)
3600000 ; slave expiration time (6 weeks)
86400; minimum caching time in case of failed lookups (24hrs)

Though the timing can also be specified in h,d,w

RR resource records like


· SOA record Start of Authoritative (Primary Master Server)
· NS record - Name Server records (pointing to Master and Slave server)
· A record
· AAAA record - quad record for ipv6 system
· CNAME record - caonical / alias name
· MX record - Mail Exchange for Mail Server
· PTR record - store in reverse lookup file

Вам также может понравиться