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

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

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

    腾讯云最新优惠活动来了:云产品限时1折,云服务器低至88元/年 ,点击这里立即抢购:9i0i.cn/qcloud,更有2860元代金券免费领取,付款直接抵现金用,点击这里立即领取:9i0i.cn/qcloudquan

    (福利推荐:你还在原价购买阿里云服务器?现在阿里云0.8折限时抢购活动来啦!4核8G企业云服务器仅2998元/3年,立即抢购>>>:9i0i.cn/aliyun

    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  
       103 天前
    如果只是 wireguard ,流量不是都会走 Server 吗?如果 server 在国外。就都会绕一圈再回来
    limaofeng
        2
    limaofeng  
       103 天前
    客户端配置中的

    [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   ·   我们的愿景   ·   实用小工具   ·   3853 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 00:56 · PVG 08:56 · LAX 17:56 · JFK 20:56
    Developed with CodeLauncher
    ? Do have faith in what you're doing.


    http://www.vxiaotou.com