macy

咨询个 wireguard 问题

  •  
  •   macy · Sep 7, 2023 · 3013 views
    This topic created in 1003 days ago, the information mentioned may be changed or developed.

    目前家里有动态公网 ip ,wireguard 搭建在家里的树莓上,在公司能访问家里的内网,但是家里的机器无法访问在公司的电脑,问了 gpt ,发现配置差不多,没发现是什么原因,大佬们帮忙看下是哪里的原因 pi 上的 server 端 办公司的 mac 端

    14 replies    2023-09-15 09:37:30 +08:00
    dangyuluo
        1
    dangyuluo  
       Sep 7, 2023
    “但是家里的机器无法访问在公司的电脑”,什么是访问,怎么不能访问,什么报错。要学会问问题。
    MacOS 开了防火墙?另外你这属于严重的信息安全违规,没事还好,一出事就找你背锅
    superhack
        2
    superhack  
       Sep 7, 2023
    公司 NAT 属于严格类型?是的话就得开端口转发或者走中继了
    macy
        3
    macy  
    OP
       Sep 7, 2023
    @dangyuluo 无法 ping 通 mac ,mac 上的 web 服务也无法访问,简单的理解为一直 pending ,没报错,
    macy
        4
    macy  
    OP
       Sep 7, 2023
    @superhack 有可能,wireguard 能否 p2p 的链接呢
    dangyuluo
        5
    dangyuluo  
       Sep 7, 2023
    Wireguard 协议本来设计的就是 peer 之间有能够连接到对方的开放端口,你公司的电脑 100%是在防火墙后的,家里肯定访问不了。
    blindlight1986
        6
    blindlight1986  
       Sep 7, 2023   ❤️ 1
    你 mac 里没把对面的 ip 写进 allowedips 吧
    superhack
        7
    superhack  
       Sep 7, 2023
    @macy 可以,但是对 NAT 类型有要求
    macy
        8
    macy  
    OP
       Sep 7, 2023
    @dangyuluo #5 了解了,感谢大佬
    macy
        9
    macy  
    OP
       Sep 7, 2023
    @blindlight1986 哎呀,我把 10.76.163.1 加进去就行了,感谢大佬
    shuang930225
        10
    shuang930225  
       Sep 7, 2023
    我家公网 IP ,用群晖搭的,扫码之后有几 K 流量,但是测试连不到家里,懒得折腾了
    macy
        11
    macy  
    OP
       Sep 7, 2023
    @shuang930225 估计是端口转发问题吧,首先要把光猫的端口转到路由器,路由器在转发到群辉
    SoFarSoGood
        12
    SoFarSoGood  
       Sep 9, 2023
    家里网络要添加静态路由
    shuang930225
        13
    shuang930225  
       Sep 14, 2023
    @macy 当时是 DMZ 全开放群晖端口的,桥接模式路由拨号,用群晖反代到路由和不反代都试过
    macy
        14
    macy  
    OP
       Sep 15, 2023
    @shuang930225 #13 貌似得把光猫里配置端口转发吧,网络这块我不是很了解,我没有 DMZ ,我使用的是虚拟主机,设置了几个端口转发到了路由器,在从路由器上设置端口转发到树莓派
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2835 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 37ms · UTC 15:04 · PVG 23:04 · LAX 08:04 · JFK 11:04
    ♥ Do have faith in what you're doing.