conn4575
V2EX  ›  问与答

使用了 openclash 后如何修改 /etc/resolv.conf 文件

  •  
  •   conn4575 · Jul 6, 2025 · 1468 views
    This topic created in 353 days ago, the information mentioned may be changed or developed.

    背景是 119.29.29.29 这个 DNS 被污染了,导致<你懂的>没法正常工作,我想着就修改路由器上的配置将 119.29.29.29 从解析列表里删了。但是过一段时间这个地址又被还原出来了。

    查了一些资料,了解到是 openclash 会定时修改 /etc/resolv.conf 里的配置导致的。

    我在 openclash->覆写配置->NameServer 里都已经将 119.29.29.29 这个地址给删除了,但是不知道哪里还是将它写入到了/etc/resolv.conf 里。求大佬指导

    2 replies    2025-07-07 11:09:38 +08:00
    busang
        1
    busang  
       Jul 7, 2025
    wan 获取手填的那个吧?
    hwdq0012
        2
    hwdq0012  
       Jul 7, 2025
    sudo echo nameserver x.x.x.x > /etc/resolv.conf
    sudo chmod +i /etc/resolv.conf # 锁住
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3186 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 53ms · UTC 12:24 · PVG 20:24 · LAX 05:24 · JFK 08:24
    ♥ Do have faith in what you're doing.