BIND : Configure for Internal Network2023/04/24 |
Install BIND to Configure DNS (Domain Name System) Server to provide Name or Address Resolution service for Clients.
|
|
[1] | Install BIND. |
root@dlp:~# apt -y install bind9 bind9utils
|
[2] | On this example, Configure BIND for Internal Network. The example follows is for the case that Local network is [10.0.0.0/24], Domain name is [srv.world], Replace them to your own environment. |
root@dlp:~#
vi /etc/bind/named.conf include "/etc/bind/named.conf.options"; include "/etc/bind/named.conf.local"; include "/etc/bind/named.conf.default-zones"; # add include "/etc/bind/named.conf.internal-zones";
root@dlp:~#
vi /etc/bind/named.conf.options # add : set ACL entry for local network acl internal-network { 10.0.0.0/24; }; options { directory "/var/cache/bind"; ..... ..... # add local network set on [acl] section above # network range you allow to recieve queries from hosts allow-query { localhost; internal-network; }; # network range you allow to transfer zone files to clients # add secondary DNS servers if it exist allow-transfer { localhost; }; # 追記 : 再帰的な検索を許可する recursion yes; //======================================================================= // If BIND logs error messages about the root key being expired, // you will need to update your keys. See https://www.isc.org/bind-keys //======================================================================= dnssec-validation auto; # if not listen IPV6, change [any] to [none] listen-on-v6 { any; }; };
root@dlp:~#
vi /etc/bind/named.conf.internal-zones # create new # add zones for your network and domain name zone "srv.world" IN { type master; file "/etc/bind/srv.world.lan"; allow-update { none; }; }; zone "0.0.10.in-addr.arpa" IN { type master; file "/etc/bind/0.0.10.db"; allow-update { none; }; }; # if you don't use IPv6 and also suppress logs for IPv6 related, possible to change # set BIND to use only IPv4 root@dlp:~# vi /etc/default/named # add OPTIONS="-u bind -4 "
# For how to write the section [*.*.*.*.in-addr.arpa], write your network address reversely like follows # case of 10.0.0.0/24 # network address ⇒ 10.0.0.0 # network range ⇒ 10.0.0.0 - 10.0.0.255 # how to write ⇒ 0.0.10.in-addr.arpa # case of 192.168.1.0/24 # network address ⇒ 192.168.1.0 # network range ⇒ 192.168.1.0 - 192.168.1.255 # how to write ⇒ 1.168.192.in-addr.arpa |
[3] |
Next, Configure Zone Files for each Zone you set in [named.conf] above.
To Configure Zone Files, refer to here. |
Sponsored Link |