//
// named.conf
//
// Provided by Red Hat bind 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.
//
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";
// allow-query { localhost; };
recursion yes;
dnssec-enable yes;
dnssec-validation yes;
dnssec-lookaside auto;
/* Path to ISC DLV key */
bindkeys-file "/etc/named.iscdlv.key";
managed-keys-directory "/var/named/dynamic";
};
logging {
channel default_debug {
file "data/named.run";
severity dynamic;
};
};
zone "." IN {
type hint;
file "named.ca";
};
include "/etc/named.rfc1912.zones";
include "/etc/named.root.key";
acl localdomain {
192.168.1.0/24;
127.0.0.1;
};
zone "example.localdomain" {
type master;
file "example.zone";
};
zone "11.168.192.in-addr.arpa" {
type master;
file "example.rev";
};
zone ファイルを置く
zone ファイルを置きます。
とりあえず、逆引き、正引き両方作っときます。
example.zone(正引き用)
$TTL 86400
@ IN SOA dns.example.localdomain. root.example.localdomain. (
2002122001 ; serial
3600 ; refresh 1hr
900 ; retry 15min
604800 ; expire 1w
86400 ; min 24hr
)
IN NS dns.example.localdomain.
@ IN A 192.168.11.100
@ IN MX 10 sendmail1
dns IN A 192.168.11.100
sendmail1 IN A 192.168.11.101
sendmail2 IN A 192.168.11.102
sendmail2 IN MX 10 sendmail2
sendmail-relay IN A 192.168.11.103
example.rev(逆引き用)
$TTL 86400
@ IN SOA dns.example.localdomain. root.example.localdomain. (
2002122001 ; Serial
3600 ; Refresh
900 ; Retry
604800 ; Expire
3600 ) ; Minimum
IN NS dns.example.localdomain.
100 IN PTR dns.example.localdomain.
101 IN PTR sendmail1.example.localdomain.
102 IN PTR sendamil2.example.localdomain.
103 IN PTR sendmail-relay.example.localdomain.