Distributions
Ubuntu
Fedora
CentOS
中文资源站
网易开源镜像站
raw0xff
V2EX  ›  Linux

win 下 tcp 监听 localhost8000 端口, wsl 内的 ubuntu 如何与之连接?

  •  
  •   raw0xff · Mar 21, 2022 · 2568 views
    This topic created in 1547 days ago, the information mentioned may be changed or developed.

    在 win 下 golang 监听 localhost 8000 端口,win 下的 telnet 可以连接上。如何与 wsl 内的 linux 建立连接?试了 172.x.x.x 貌似都不行。求解

    lisongeee
        1
    lisongeee  
       Mar 21, 2022   ❤️ 1
    关闭 Windows 防火墙
    wangyu17455
        2
    wangyu17455  
       Mar 21, 2022 via Android   ❤️ 1
    wsl1 还是 2 ,2 的话去网络适配器里找到 win 的 ip 然后连,1 的话直接连,连不上就放通防火墙
    raw0xff
        3
    raw0xff  
    OP
       Mar 21, 2022
    @lisongeee 正解。用 win 防火墙的高级设置对端口放行。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3241 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 37ms · UTC 12:45 · PVG 20:45 · LAX 05:45 · JFK 08:45
    ♥ Do have faith in what you're doing.