Linux 53 端口被 systemd-resolve 占用

  1. 先停用 systemd-resolved 服务
    systemctl stop systemd-resolved

     

  2. 编辑 /etc/systemd/resolved.conf 文件
    vi /etc/systemd/resolved.conf

     

  3. 换下面说明更改,然后按一下“esc”键,再输入“:wq”(不要输入引号),回车保存
    [Resolve]
    DNS=8.8.8.8  #取消注释,增加dns
    #FallbackDNS=
    #Domains=
    #LLMNR=no
    #MulticastDNS=no
    #DNSSEC=no
    #Cache=yes
    DNSStubListener=no  #取消注释,把yes改为no

     

  4. 最后运行下面命令即可
    ln -sf /run/systemd/resolve/resolv.conf /etc/resolv.conf

     

最直接的办法

systemctl stop systemd-resolved
systemctl disable systemd-resolved

#删除后重新创建resolv.conf
rm -rf /etc/resolv.conf

声 明 1 bujj博客:www.bujj.org
2 原创文章,转载请注明转自bujj博客:www.bujj.org
3 当前页网址:https://www.bujj.org/index.php/2022/01/28/285/
THE END
分享
二维码
< <上一篇
下一篇>>