Install BIND2015/01/13 |
Configure DNS server which resolves domain name or IP address.
|
|
[1] | Install BIND. |
[root@dlp ~]# yum -y install bind caching-nameserver
|
[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. ) |
[root@dlp ~]#
vi /etc/named.conf # create new options { directory "/var/named"; allow-query { localhost; 10.0.0.0/24; }; allow-transfer { localhost; 10.0.0.0/24; }; recursion yes; }; controls { inet 127.0.0.1 allow { localhost; } keys { rndckey; }; }; view "internal" { match-clients { localhost; 10.0.0.0/24; }; zone "." IN { type hint; file "named.ca"; }; 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; }; }; zone "localdomain" IN { type master; file "localdomain.zone"; allow-update { none; }; }; zone "localhost" IN { type master; file "localhost.zone"; allow-update { none; }; }; zone "0.0.127.in-addr.arpa" IN { type master; file "named.local"; allow-update { none; }; }; zone "255.in-addr.arpa" IN { type master; file "named.broadcast"; allow-update { none; }; }; zone "0.in-addr.arpa" IN { type master; file "named.zero"; 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; }; }; }; include "/etc/rndc.key";
# allow-query
# For How to write for reverse resolving, Write network address reversely like below.⇒ query range you allow # allow-transfer ⇒ the range you allow to transfer zone info # recursion ⇒ allow or not to search recursively # view "internal" { ** }; ⇒ write for internal definition # view "external" { ** }; ⇒ write for external definition
# 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
# 172.16.0.80/29⇒ 0.0.10.in-addr.arpa # 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 |
|