V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
MFcliff
V2EX  ›  WireGuard

用 wireguard 组网跨境使用,如何实现境内外分流,现在通过 gre 隧道打通,所有的流量都走境外了,导致境内业务访问就比较慢了

  •  
  •   MFcliff · 107 天前 · 908 次点击
    这是一个创建于 107 天前的主题,其中的信息可能已经有所发展或是发生改变。

    1 #clt0 2 [Interface] 3 ListenPort = 51820 4 PrivateKey = clt0-pri-key 5 Address = 10.1.1.1/24 6 DNS = 8.8.8.8 7 MTU = 1380 8 9 #gw 10 [Peer] 11 PublicKey = public-key 12 AllowedIPs = 0.0.0.0/0 13 Endpoint = internet-ip:51820 14 PersistentKeepalive = 10

    2 条回复    2024-01-16 14:46:21 +08:00
    limaofeng
        1
    limaofeng  
       107 天前
    如果只是 wireguard ,流量不是都会走 Server 吗?如果 server 在国外。就都会绕一圈再回来
    limaofeng
        2
    limaofeng  
       107 天前
    客户端配置中的

    [Peer]
    PublicKey = xxx
    PresharedKey = xzzz
    AllowedIPs = 10.8.0.0/24, 10.0.4.0/24


    AllowedIPs 这个不要配置 0.0.0.0/0

    不然所有流量都转发到 wireguard Server 去了
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2318 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 08:17 · PVG 16:17 · LAX 01:17 · JFK 04:17
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.