qingmuhy0

GCP 总是自动换 DNS

  •  
  •   qingmuhy0 · Sep 28, 2019 · 5700 views
    This topic created in 2424 days ago, the information mentioned may be changed or developed.

    开了个 GCP 机器,用来代理,用了一些用 DNS 破解流媒体地域限制的歪门邪道,那个方法需要固定 DNS 到一个固定的地址,但我每次改了后,Google 过段时间就会自动该回去。把 DNS 文件设置为只读也阻止不了,求救。 123.jpg 1234.jpg 如图为 Google 自动改成了内网 DNS

    14 replies    2020-10-22 20:47:40 +08:00
    leavic
        1
    leavic  
       Sep 28, 2019
    请自己 google resolvconf
    yexm0
        2
    yexm0  
       Sep 28, 2019 via Android
    看后台是不是跑着 google 的程序?是就试试 kill 了
    Yien
        3
    Yien  
       Sep 28, 2019
    求歪门邪道秘笈
    love4taylor
        4
    love4taylor  
    PRO
       Sep 28, 2019 via Android
    iptables 重定向喽
    dot2017
        5
    dot2017  
       Sep 28, 2019
    1. 将 resolve.conf 设置成只读
    2. 找网卡的配置文件,里面应该有一项 autoconfig,屏蔽掉
    dot2017
        6
    dot2017  
       Sep 28, 2019
    另外 aws 和 azure 也是一样的,目的就是让虚拟机默认走内网的 dns。
    ETiV
        7
    ETiV  
       Sep 29, 2019
    极大概率是 DHCP client 搞的,不会记错的……

    我在 AWS 上被坑过,改了当时是生效了,结果过了个不定期的时间,又给还原回去了,业务就 down 了

    看了系统日志发现是 DHCP 给弄的…
    mikeguan
        8
    mikeguan  
       Sep 29, 2019 via Android
    你的这个只读对 root 用户无效,需要 chattr 加上 i 权限
    trepwq
        9
    trepwq  
       Sep 29, 2019
    root@instance-1:~# cat /etc/resolv.conf
    # This file is managed by man:systemd-resolved(8). Do not edit.
    #
    # This is a dynamic resolv.conf file for connecting local clients to the
    # internal DNS stub resolver of systemd-resolved. This file lists all
    # configured search domains.
    #
    # Run "systemd-resolve --status" to see details about the uplink DNS servers
    # currently in use.
    #
    # Third party programs must not access this file directly, but only through the
    # symlink at /etc/resolv.conf. To manage man:resolv.conf(5) in a different way,
    # replace this symlink by a static file or a different symlink.
    #
    # See man:systemd-resolved.service(8) for details about the supported modes of
    # operation for /etc/resolv.conf.
    Astralis
        10
    Astralis  
       Sep 29, 2019
    代理软件的配置文件内可以指定 dns 的吧,不一定非要修改系统 dns
    zeyexe
        11
    zeyexe  
       Sep 29, 2019
    这里提到了很多种方法,任君选择

    https://www.cyberciti.biz/faq/dhclient-etcresolvconf-hooks/
    notgood
        12
    notgood  
       Sep 29, 2019 via iPhone
    LZ 求歪门邪道秘笈. 謝謝🙏
    notgood
        13
    notgood  
       Sep 29, 2019 via iPhone
    你要 chattr 加上 i 权限 chattr +i /etc/resolv.conf
    求歪门邪道秘笈. 謝謝🙏
    goldalan
        14
    goldalan  
       Oct 22, 2020
    修改 /etc/sysconfig/network/config 文件,将 NETCONFIG_DNS_POLICY='auto'这句改为 NETCONFIG_DNS_POLICY=''
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1111 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 356ms · UTC 18:17 · PVG 02:17 · LAX 11:17 · JFK 14:17
    ♥ Do have faith in what you're doing.