Named
From Attie's Wiki
(Difference between revisions)
m |
|||
Line 1: | Line 1: | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
Below is Attie's DNS configuration: | Below is Attie's DNS configuration: | ||
− | I left | + | I left <code>/etc/named.conf</code> unchanged |
− | You want to make sure that your DNS server chroots into | + | You want to make sure that your DNS server chroots into <code>/var/named/chroot</code> |
− | + | <code>/var/named/chroot/etc/named.conf</code>: | |
− | + | <pre> | |
options { | options { | ||
forwarders { 192.168.0.253; }; | forwarders { 192.168.0.253; }; | ||
Line 21: | Line 14: | ||
// prime the server with knowledge of the root servers | // prime the server with knowledge of the root servers | ||
− | zone | + | zone "." { |
type hint; | type hint; | ||
− | file | + | file "/etc/named/db.root"; |
}; | }; | ||
Line 29: | Line 22: | ||
// broadcast zones as per RFC 1912 | // broadcast zones as per RFC 1912 | ||
− | zone | + | zone "localhost" in { type master; file "/etc/named/db.localhost"; }; |
− | zone | + | zone "127.in-addr.arpa" in { type master; file "/etc/named/db.127"; }; |
− | zone | + | zone "0.in-addr.arpa" in { type master; file "/etc/named/db.0"; }; |
− | zone | + | zone "255.in-addr.arpa" in { type master; file "/etc/named/db.255"; }; |
// local network | // local network | ||
− | zone | + | zone "local" in { type master; file "/etc/named/db.local"; notify yes; }; |
− | zone | + | zone "0.168.192.in-addr.arpa" in { type master; file "/etc/named/db.192.168.0"; notify yes; }; |
// attie.co.uk - this is an internal version of the domain | // attie.co.uk - this is an internal version of the domain | ||
− | zone | + | zone "attie.co.uk" in { type master; file "/etc/named/db.attie.co.uk"; notify yes; }; |
− | + | </pre> | |
− | + | <code>/var/named/chroot/etc/named/db.192.168.0</code>: | |
− | + | <pre> | |
$TTL 86400 | $TTL 86400 | ||
@ SOA akela.local. root.local. ( 94 10800 3600 604800 600 ) | @ SOA akela.local. root.local. ( 94 10800 3600 604800 600 ) | ||
Line 50: | Line 43: | ||
1 PTR lan.baloo.local. | 1 PTR lan.baloo.local. | ||
..... | ..... | ||
− | + | </pre> | |
− | + | <code>/var/named/chroot/etc/named/db.local</code>: | |
− | + | <pre> | |
$TTL 86400 | $TTL 86400 | ||
@ SOA akela akela.local ( 94 10800 3600 604800 600 ) | @ SOA akela akela.local ( 94 10800 3600 604800 600 ) | ||
Line 63: | Line 56: | ||
lan.baloo CNAME baloo.local. | lan.baloo CNAME baloo.local. | ||
..... | ..... | ||
− | + | </pre> |
Revision as of 20:23, 20 December 2010
Below is Attie's DNS configuration:
I left /etc/named.conf
unchanged
You want to make sure that your DNS server chroots into /var/named/chroot
/var/named/chroot/etc/named.conf
:
options { forwarders { 192.168.0.253; }; forward only; }; // prime the server with knowledge of the root servers zone "." { type hint; file "/etc/named/db.root"; }; // be authoritative for the localhost forward and reverse zones, and for // broadcast zones as per RFC 1912 zone "localhost" in { type master; file "/etc/named/db.localhost"; }; zone "127.in-addr.arpa" in { type master; file "/etc/named/db.127"; }; zone "0.in-addr.arpa" in { type master; file "/etc/named/db.0"; }; zone "255.in-addr.arpa" in { type master; file "/etc/named/db.255"; }; // local network zone "local" in { type master; file "/etc/named/db.local"; notify yes; }; zone "0.168.192.in-addr.arpa" in { type master; file "/etc/named/db.192.168.0"; notify yes; }; // attie.co.uk - this is an internal version of the domain zone "attie.co.uk" in { type master; file "/etc/named/db.attie.co.uk"; notify yes; };
/var/named/chroot/etc/named/db.192.168.0
:
$TTL 86400 @ SOA akela.local. root.local. ( 94 10800 3600 604800 600 ) NS akela.local. 1 PTR lan.baloo.local. .....
/var/named/chroot/etc/named/db.local
:
$TTL 86400 @ SOA akela akela.local ( 94 10800 3600 604800 600 ) NS akela localhost A 127.0.0.1 baloo A 192.168.0.1 lan.baloo CNAME baloo.local. .....