debian禁止覆盖dns【阿里云】
vim /etc/network/interfaces
1 2 |
# 加入 dns-nameservers 8.8.8.8 8.8.4.4 |
vim /etc/dhcp/dhclient.conf
1 2 |
# 写死 supersede domain-name-servers 8.8.8.8; |
systemctl restart networking
查看dns是否正确 cat /etc/reslov.conf
1 2 |
nameserver 8.8.8.8 nameserver 8.8.4.4 |