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

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

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

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

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