V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
conn4575
V2EX  ›  问与答

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

  •  
  •   conn4575 · 71 天前 · 906 次点击
    这是一个创建于 71 天前的主题,其中的信息可能已经有所发展或是发生改变。

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

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

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

    2 条回复    2025-07-07 11:09:38 +08:00
    busang
        1
    busang  
       71 天前
    wan 获取手填的那个吧?
    hwdq0012
        2
    hwdq0012  
       71 天前
    sudo echo nameserver x.x.x.x > /etc/resolv.conf
    sudo chmod +i /etc/resolv.conf # 锁住
    关于   ·   帮助文档   ·   自助推广系统   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   3829 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 10:19 · PVG 18:19 · LAX 03:19 · JFK 06:19
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.