V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
abelai
V2EX  ›  DNS

路由器 dns 解析 IP,浏览器无法正常访问

  •  
  •   abelai · Jan 10, 2025 · 2898 views
    This topic created in 482 days ago, the information mentioned may be changed or developed.

    我在路由器新加了一条 dns 解析,例如 192.168.4.36/file-xx.com 这是解析到内网的一个 IP

    然后在其他电脑上可以 ping 、telnet 、curl 都没有问题,但是只要用浏览器访问这个域名就会出现 502

    试过其他端口也是一样的 502

    因为需要每台局域网改 host 太麻烦,所以选择在路由器加解析

    telnet https://files.catbox.moe/xsyrzn.png

    ping https://files.catbox.moe/3cgk3w.png

    curl https://files.catbox.moe/hr6j24.png

    浏览器访问失败,其他浏览器也是一样 https://files.catbox.moe/mb76c2.png

    Supplement 1  ·  Jan 13, 2025
    统一回复:
    谢谢大家的回复,最终找到原因是走了本地代理,直接代到国外 IP 去了 把代理关了就好了 或者配置一下域名
    8 replies    2025-01-13 10:10:30 +08:00
    esee
        1
    esee  
       Jan 10, 2025 via Android
    浏览器是否自动添加了 https ,浏览器的安全 DNS 关掉,都试一下
    iShinku
        2
    iShinku  
       Jan 10, 2025
    会不会页面返回了 html 但 code 是 502?
    502 是服务器问题

    开发者模式看看 先看解析的 IP 然后看返回的内容和 code
    iShinku
        3
    iShinku  
       Jan 10, 2025
    curl -i file-xx.com
    看看 header
    ugvfpdcuwfnh
        4
    ugvfpdcuwfnh  
       Jan 10, 2025
    路由器本身也有 host ,如果是 openwrt 系统的话,我记得位置在/etc/host ,在这里改就行了。
    flynaj
        5
    flynaj  
       Jan 10, 2025 via Android
    浏览器按 f12 发上来看,发上来看。
    wnpllrzodiac
        6
    wnpllrzodiac  
       Jan 10, 2025 via Android
    502 就查 服务端日志了,dns tcp http 都过了
    yc8332
        7
    yc8332  
       Jan 11, 2025
    502 是你的服务有问题,不是解析问题
    abelai
        8
    abelai  
    OP
       Jan 13, 2025
    @chen05 这个是没问题的,正常返回内容了 就有在浏览器的时候不行
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   6106 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 43ms · UTC 06:20 · PVG 14:20 · LAX 23:20 · JFK 02:20
    ♥ Do have faith in what you're doing.