BIND : Install / Configure2019/01/17 |
Install BIND to configure DNS server which resolves domain name or IP address.
|
|
[1] | Install BIND. |
dlp:~ # zypper -n install bind bind-utils
|
[2] | Configure BIND. This example is done with grobal IP address [172.16.0.80/29], Private IP address [10.0.0.0/24], Domain name [srv.world]. However, Please use your own IPs and domain name when you set config on your server. ( Actually, [172.16.0.80/29] is for private IP address, though. ) |
dlp:~ # mv /etc/named.conf /etc/named.conf.org
dlp:~ #
vi /etc/named.conf # create new
options { directory "/var/lib/named"; managed-keys-directory "/var/lib/named/dyn/"; dump-file "/var/log/named_dump.db"; statistics-file "/var/log/named.stats"; # if listen on IPv4 port listen-on port 53 { any; }; # if listen on IPv6 port listen-on-v6 { any; }; # allow query range ( set internal server and so on ) allow-query { 127.0.0.1; 10.0.0.0/24; }; # allow transfer range ( set it if you have secondary DNS ) allow-transfer { 127.0.0.1; 10.0.0.0/24; }; recursion yes; }; view "internal" { match-clients { localhost; 10.0.0.0/24; }; zone "." in { type hint; file "root.hint"; }; zone "localhost" in { type master; file "localhost.zone"; }; zone "0.0.127.in-addr.arpa" in { type master; file "127.0.0.zone"; }; 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 "127.0.0.zone"; }; zone "srv.world" in { type master; file "srv.world.lan"; allow-update { none; }; }; zone "0.0.10.in-addr.arpa" in { type master; file "0.0.10.db"; allow-update { none; }; }; }; view "external" { match-clients { any; }; allow-query { any; }; recursion no; zone "srv.world" in { type master; file "srv.world.wan"; allow-update { none; }; }; zone "80.0.16.172.in-addr.arpa" in { type master; file "80.0.16.172.db"; allow-update { none; }; }; }; # allow-query ⇒ query range you allow # allow-transfer ⇒ the range you permit to transfer zone info # recursion ⇒ allow or not to search recursively # view "internal" { ** }; ⇒ write for internal definition # view "external" { ** }; ⇒ write for external definition # For How to write for reverse resolving, Write network address reversely like below # Case of 10.0.0.0/24 # network address ⇒ 10.0.0.0 # range of network ⇒ 10.0.0.0 - 10.0.0.255 # how to write ⇒ 0.0.10.in-addr.arpa # Case of 172.16.0.80/29 # network address ⇒ 172.16.0.80 # range of network ⇒ 172.16.0.80 - 172.16.0.87 # how to write ⇒ 80.0.16.172.in-addr.arpa |
Sponsored Link |