-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathnamed.conf
71 lines (65 loc) · 2.05 KB
/
named.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
acl "dns_slaves" {
xxx.xxx.xxx.xxx; # IP address of the Slave DNS nameserver
xxx.xxx.xxx.xxx; # same as bove.
};
acl "lan_hosts" {
192.168.0.0/24; # Network address of local LAN
127.0.0.1; # allow loop back.
};
options { # This section sets the default options
directory "/etc/namedb"; # directory where the zone files will reside.
listen-on {
192.168.1.101; # IP address of the local interface to listen.
127.0.0.1;
};
auth-nxdomain no; # Conform to RFC1035
allow-query { any; }; # allow anyone to issue queries
recursion no; # disallow recursive queries unless
# overridden below.
};
key "rndc-key" {
algorithm hmac-md5;
secret "XXXXXXXXXXXXXXXXXXXXX";
};
controls {
inet 127.0.0.1 allow { localhost; }
keys { rndc-key; };
};
view "internal" {
match-clients { lan_hosts; }; # Match hosts in `acl "lan_hosts"` above
recursion yes; # allow recursive queries
notify no; # disable AA notifies.
// location of the zone file for DNS root servers
zone "." {
type hint;
file "zone.root";
};
// be AUTHORITATIVE for forward and reverse lookup inside LAN:
zone "localhost"{
type master;
file "example.local";
};
zone "0.0.0.127.in-addr.arpa" {
type master;
file "example.local.reverse";
};
zone "example.com" {
type master;
file "example.com.zone";
};
zone "0.1.168.192.in-addr.arpa" {
type master;
file "example.com.reverse";
};
};
view "external" {
// "!" means to negate
match-clients { !lan_hosts; };
recursion no; # Disallow recursive queries.
allow-transfer { dns_slaves; };
# Allow `hosts` in act `dns_slaves` to transfer zones.
zone "example.com" {
type master;
file "external_example.com.zone"
};
};