MFcliff
V2EX  ›  WireGuard

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

  •  
  •   MFcliff · Jan 16, 2024 · 3042 views
    This topic created in 874 days ago, the information mentioned may be changed or developed.

    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 replies    2024-01-16 14:46:21 +08:00
    limaofeng
        1
    limaofeng  
       Jan 16, 2024
    如果只是 wireguard ,流量不是都会走 Server 吗?如果 server 在国外。就都会绕一圈再回来
    limaofeng
        2
    limaofeng  
       Jan 16, 2024
    客户端配置中的

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


    AllowedIPs 这个不要配置 0.0.0.0/0

    不然所有流量都转发到 wireguard Server 去了
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5446 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 49ms · UTC 08:56 · PVG 16:56 · LAX 01:56 · JFK 04:56
    ♥ Do have faith in what you're doing.