使用 bind9 作為 DNS Server
在 /etc/bind
的 named.conf
會 include 四個 config
named.conf.options
named.conf.local
named.conf.default-zones
named.conf.view.ntou
將 DNS 紀錄的 directory 設定在 /var/cache/bind
並只允許 140.121.100.16
以及 140.121.81.16
的 recursive 查詢
指定每個網域紀錄的 file
ind.ntou.edu.tw
相關的在 /var/cache/bind/named.ind
設定前使用 sudo rndc freeze ind.ntou.edu.tw
每次更改都要增加 Serial number
更改好後使用 sudo rndc thaw ind.ntou.edu.tw
要查看 slave 的 file 使用
sudo named-compilezone -f raw -F text -o output.txt 121.140.IN-ADDR.ARPA named.121
看log
journalctl -xeu named.service