1. 打开终端,输入以下命令安装dnsutils:

    sudo apt-get update
    sudo apt-get install dnsutils
    
  2. 打开 /etc/resolv.conf 文件,输入以下命令:

    sudo nano /etc/resolv.conf
    
  3. 在文件中添加以下行:

    nameserver 8.8.8.8
    nameserver 8.8.4.4
    

    这里使用了 Google 的公共 DNS 服务器,你也可以使用其他 DNS 服务器。

  4. 保存并关闭文件。

  5. 重启网络服务:

    sudo systemctl restart networking.service
    
  6. 测试 DNS 是否正常工作:

    nslookup www.google.com
    

    如果返回了正确的 IP 地址,则说明 DNS 配置成功。

debian11怎么配置dns

原文地址: https://www.cveoy.top/t/topic/bMtA 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录