配置主DNS
环境
master pc2 10.7.70.152 client pc1 10.7.70.151 pc3 10.7.70.153
一.安装
master安装bind9、resolvconf、dnsutils
client安装resolvconf
pc2:~# dpkg -l bind9
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-==============-===================-============-=================================
ii bind9 1:9.16.22-1~deb11u1 amd64 Internet Domain Name Server
启动服务
systemctl start named
开机自启
systemctl enable named
二.修改
修改地址 并把dns改为服务机的ip地址
vim /etc/network/interfaces.d/50-cloud-init