V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
通过以下 Referral 链接购买 DigitalOcean 主机,你将可以帮助 V2EX 持续发展
DigitalOcean - SSD Cloud Servers
s4d
V2EX  ›  VPS

两台新安装系统的 VPS,一模一样的安装 WG 的方法,怎么一台正常一台无法用呢?

  •  
  •   s4d · 211 天前 · 848 次点击
    这是一个创建于 211 天前的主题,其中的信息可能已经有所发展或是发生改变。
    系统情况:
    系统是 ubuntu 22 ,新安装的系统。Docker 安装 wg-easy.

    有问题的那一台尝试重装了很多次,两台 VPS 的网络不通,一台是美西 GIA ,一台是 HK GIA
    HK GIA 的有问题,怀疑是 MTU 的问题,多次尝试修改无效。

    尝试过修改端口,无效。

    服务器没有开 ufw ,ip route get 路由正确。



    安装脚本:
    version: "3.3"
    services:
    wg-easy:
    container_name: wg-easy
    environment:
    - WG_HOST=xxx.xxx.one
    - PASSWORD=pwdtest
    - WG_MTU=1420
    - WG_PERSISTENT_KEEPALIVE=25
    - WG_DEFAULT_ADDRESS=192.168.18.x
    - WG_DEFAULT_DNS=8.8.8.8,1.1.1.1
    - WG_ALLOWED_IPS=0.0.0.0/0,::/0
    volumes:
    - /root/docker_data/wg-easy:/etc/wireguard
    ports:
    - 41820:51820/udp
    - 41821:51821/tcp
    cap_add:
    - NET_ADMIN
    - SYS_MODULE
    sysctls:
    - net.ipv4.conf.all.src_valid_mark=1
    - net.ipv4.ip_forward=1
    restart: always
    image: ghcr.io/wg-easy/wg-easy
    networks: {}

    日志:

    2024-04-28 09:10:03.139 [APP] startActivation: Entering (tunnel: DMIT-299-1_TMBP)
    2024-04-28 09:10:03.141 [APP] startActivation: Starting tunnel
    2024-04-28 09:10:03.141 [APP] startActivation: Success
    2024-04-28 09:10:03.147 [APP] Tunnel 'DMIT-299-1_TMBP' connection status changed to 'connecting'
    2024-04-28 09:10:03.272 [NET] App version: 1.0.16 (27)
    2024-04-28 09:10:03.272 [NET] Starting tunnel from the app
    2024-04-28 09:10:03.891 [NET] DNS64: mapped 103.135.x.x (服务器 IP) to itself.
    2024-04-28 09:10:03.891 [NET] Attaching to interface
    2024-04-28 09:10:03.892 [NET] UAPI: Updating private key
    2024-04-28 09:10:03.892 [NET] Routine: handshake worker 4 - started
    2024-04-28 09:10:03.892 [NET] Routine: decryption worker 2 - started
    2024-04-28 09:10:03.892 [NET] UAPI: Removing all peers
    2024-04-28 09:10:03.892 [NET] Routine: handshake worker 2 - started
    2024-04-28 09:10:03.892 [NET] Routine: decryption worker 1 - started
    2024-04-28 09:10:03.892 [NET] Routine: encryption worker 1 - started
    2024-04-28 09:10:03.892 [NET] Routine: encryption worker 3 - started
    2024-04-28 09:10:03.892 [NET] Routine: encryption worker 2 - started
    2024-04-28 09:10:03.892 [NET] Routine: event worker - started
    2024-04-28 09:10:03.892 [NET] Routine: encryption worker 7 - started
    2024-04-28 09:10:03.892 [NET] Routine: encryption worker 5 - started
    2024-04-28 09:10:03.892 [NET] Routine: decryption worker 4 - started
    2024-04-28 09:10:03.892 [NET] Routine: handshake worker 1 - started
    2024-04-28 09:10:03.892 [NET] Routine: handshake worker 3 - started
    2024-04-28 09:10:03.892 [NET] Routine: encryption worker 4 - started
    2024-04-28 09:10:03.892 [NET] Routine: encryption worker 6 - started
    2024-04-28 09:10:03.892 [NET] Routine: decryption worker 3 - started
    2024-04-28 09:10:03.892 [NET] Routine: decryption worker 7 - started
    2024-04-28 09:10:03.892 [NET] Routine: handshake worker 7 - started
    2024-04-28 09:10:03.892 [NET] Routine: decryption worker 6 - started
    2024-04-28 09:10:03.892 [NET] Routine: handshake worker 6 - started
    2024-04-28 09:10:03.892 [NET] Routine: decryption worker 8 - started
    2024-04-28 09:10:03.892 [NET] Routine: handshake worker 8 - started
    2024-04-28 09:10:03.892 [NET] Routine: decryption worker 5 - started
    2024-04-28 09:10:03.892 [NET] Routine: handshake worker 5 - started
    2024-04-28 09:10:03.892 [NET] Routine: encryption worker 8 - started
    2024-04-28 09:10:03.892 [NET] Routine: TUN reader - started
    2024-04-28 09:10:03.893 [NET] peer(aUHP…zrhw) - UAPI: Created
    2024-04-28 09:10:03.893 [NET] peer(aUHP…zrhw) - UAPI: Updating preshared key
    2024-04-28 09:10:03.893 [NET] peer(aUHP…zrhw) - UAPI: Updating endpoint
    2024-04-28 09:10:03.893 [NET] peer(aUHP…zrhw) - UAPI: Updating persistent keepalive interval
    2024-04-28 09:10:03.893 [NET] peer(aUHP…zrhw) - UAPI: Removing all allowedips
    2024-04-28 09:10:03.894 [NET] peer(aUHP…zrhw) - UAPI: Adding allowedip
    2024-04-28 09:10:03.894 [NET] peer(aUHP…zrhw) - UAPI: Adding allowedip
    2024-04-28 09:10:03.894 [NET] UDP bind has been updated
    2024-04-28 09:10:03.894 [NET] Routine: receive incoming v4 - started
    2024-04-28 09:10:03.894 [NET] peer(aUHP…zrhw) - Starting
    2024-04-28 09:10:03.894 [NET] Routine: receive incoming v6 - started
    2024-04-28 09:10:03.894 [NET] peer(aUHP…zrhw) - Routine: sequential sender - started
    2024-04-28 09:10:03.894 [NET] peer(aUHP…zrhw) - Sending keepalive packet
    2024-04-28 09:10:03.894 [NET] peer(aUHP…zrhw) - Routine: sequential receiver - started
    2024-04-28 09:10:03.894 [NET] peer(aUHP…zrhw) - Sending handshake initiation
    2024-04-28 09:10:03.895 [NET] Interface state was Down, requested Up, now Up
    2024-04-28 09:10:03.895 [NET] Device started
    2024-04-28 09:10:03.895 [NET] Tunnel interface is utun3
    2024-04-28 09:10:03.895 [NET] Network change detected with satisfied route and interface order [en0]
    2024-04-28 09:10:03.895 [NET] Routine: receive incoming v4 - stopped
    2024-04-28 09:10:03.896 [NET] Routine: receive incoming v6 - stopped
    2024-04-28 09:10:03.896 [NET] UDP bind has been updated
    2024-04-28 09:10:03.896 [NET] Routine: receive incoming v6 - started
    2024-04-28 09:10:03.896 [NET] Routine: receive incoming v4 - started
    2024-04-28 09:10:03.896 [APP] Tunnel 'DMIT-299-1_TMBP' connection status changed to 'connected'
    2024-04-28 09:10:03.937 [NET] peer(aUHP…zrhw) - Received handshake response
    2024-04-28 09:10:03.997 [NET] Network change detected with satisfied route and interface order [en0, utun3]
    2024-04-28 09:10:03.998 [NET] Routine: receive incoming v4 - stopped
    2024-04-28 09:10:03.999 [NET] Routine: receive incoming v6 - stopped
    2024-04-28 09:10:03.999 [NET] UDP bind has been updated
    2024-04-28 09:10:03.999 [NET] peer(aUHP…zrhw) - Sending keepalive packet
    2024-04-28 09:10:04.000 [NET] Routine: receive incoming v4 - started
    2024-04-28 09:10:04.000 [NET] Routine: receive incoming v6 - started
    2024-04-28 09:10:08.142 [APP] Status update notification timeout for tunnel 'DMIT-299-1_TMBP'. Tunnel status is now 'connected'.
    2024-04-28 09:10:19.918 [NET] peer(aUHP…zrhw) - Received handshake initiation ——— 问题出现 ———
    2024-04-28 09:10:19.918 [NET] peer(aUHP…zrhw) - Sending handshake response
    2024-04-28 09:10:25.008 [NET] peer(aUHP…zrhw) - Received handshake initiation
    2024-04-28 09:10:25.008 [NET] peer(aUHP…zrhw) - Sending handshake response
    2024-04-28 09:10:30.382 [NET] peer(aUHP…zrhw) - Received handshake initiation
    2024-04-28 09:10:30.382 [NET] peer(aUHP…zrhw) - Sending handshake response
    2024-04-28 09:10:35.523 [NET] peer(aUHP…zrhw) - Received handshake initiation
    2024-04-28 09:10:35.523 [NET] peer(aUHP…zrhw) - Sending handshake response
    2024-04-28 09:10:40.643 [NET] peer(aUHP…zrhw) - Received handshake initiation
    2024-04-28 09:10:40.643 [NET] peer(aUHP…zrhw) - Sending handshake response
    2024-04-28 09:10:44.460 [APP] startDeactivation: Tunnel: DMIT-299-1_TMBP —— 手动停止 WG ————
    2024-04-28 09:10:44.467 [APP] Tunnel 'DMIT-299-1_TMBP' connection status changed to 'disconnecting'
    2024-04-28 09:10:44.611 [NET] Network change detected with satisfied route and interface order [en0]
    2024-04-28 09:10:44.613 [NET] Routine: receive incoming v4 - stopped
    2024-04-28 09:10:44.613 [NET] Routine: receive incoming v6 - stopped
    2024-04-28 09:10:44.613 [NET] UDP bind has been updated
    2024-04-28 09:10:44.618 [NET] Routine: receive incoming v4 - started
    2024-04-28 09:10:44.618 [NET] peer(aUHP…zrhw) - Sending keepalive packet
    2024-04-28 09:10:44.620 [NET] Routine: receive incoming v6 - started
    2024-04-28 09:10:44.846 [NET] Stopping tunnel
    2024-04-28 09:10:44.846 [NET] Device closing
    2024-04-28 09:10:44.846 [NET] Routine: TUN reader - stopped
    2024-04-28 09:10:44.846 [NET] Routine: event worker - stopped
    2024-04-28 09:10:44.846 [NET] Routine: receive incoming v4 - stopped
    2024-04-28 09:10:44.846 [NET] Routine: receive incoming v6 - stopped
    2024-04-28 09:10:44.846 [NET] peer(aUHP…zrhw) - Stopping
    2024-04-28 09:10:44.846 [NET] peer(aUHP…zrhw) - Routine: sequential sender - stopped
    2024-04-28 09:10:44.846 [NET] peer(aUHP…zrhw) - Routine: sequential receiver - stopped
    2024-04-28 09:10:44.847 [NET] Device closed
    2024-04-28 09:10:44.847 [NET] Routine: decryption worker 7 - stopped
    2024-04-28 09:10:44.847 [NET] Routine: decryption worker 4 - stopped
    2024-04-28 09:10:44.847 [NET] Routine: decryption worker 8 - stopped
    2024-04-28 09:10:44.847 [NET] Routine: decryption worker 2 - stopped
    2024-04-28 09:10:44.847 [NET] Routine: decryption worker 3 - stopped
    2024-04-28 09:10:44.847 [NET] Routine: handshake worker 8 - stopped
    2024-04-28 09:10:44.847 [NET] Routine: decryption worker 1 - stopped
    2024-04-28 09:10:44.847 [NET] Routine: handshake worker 3 - stopped
    2024-04-28 09:10:44.847 [NET] Routine: handshake worker 4 - stopped
    2024-04-28 09:10:44.847 [NET] Routine: decryption worker 6 - stopped
    2024-04-28 09:10:44.847 [NET] Routine: handshake worker 5 - stopped
    2024-04-28 09:10:44.847 [NET] Routine: handshake worker 6 - stopped
    2024-04-28 09:10:44.847 [NET] Routine: handshake worker 1 - stopped
    2024-04-28 09:10:44.847 [NET] Routine: handshake worker 2 - stopped
    2024-04-28 09:10:44.847 [NET] Routine: decryption worker 5 - stopped
    2024-04-28 09:10:44.847 [NET] Routine: handshake worker 7 - stopped
    2024-04-28 09:10:44.847 [NET] Routine: encryption worker 6 - stopped
    2024-04-28 09:10:44.847 [NET] Routine: encryption worker 8 - stopped
    2024-04-28 09:10:44.847 [NET] Routine: encryption worker 1 - stopped
    2024-04-28 09:10:44.847 [NET] Routine: encryption worker 7 - stopped
    2024-04-28 09:10:44.847 [NET] Routine: encryption worker 4 - stopped
    2024-04-28 09:10:44.847 [NET] Routine: encryption worker 3 - stopped
    2024-04-28 09:10:44.847 [NET] Routine: encryption worker 5 - stopped
    2024-04-28 09:10:44.847 [NET] Routine: encryption worker 2 - stopped
    2024-04-28 09:10:44.853 [APP] Tunnel 'DMIT-299-1_TMBP' connection status changed to 'disconnected'
    5 条回复    2024-05-01 12:46:23 +08:00
    canyue7897
        1
    canyue7897  
       210 天前 via iPhone
    香港的 udp 一直有问题。我用的就是这样的,当然我用不起 hk gia,我用的 udp 都或多或少有问题。
    northbrunv
        2
    northbrunv  
       210 天前 via Android
    hk 怕挨揍很多商家一刀切直接禁止 udp
    s4d
        3
    s4d  
    OP
       210 天前 via iPhone
    @northbrunv
    @canyue7897 DMIT HK GIA 禁 udp 了吗?之前买了他们家 JP GIA 没禁
    canyue7897
        4
    canyue7897  
       208 天前
    商家没有禁止 udp ,但是你的运营商会 qos,我都遇到广州电信好几次了。正在用着,udp 速度突然断崖式下降。以前没有,怀疑割裂接的问题。
    s4d
        5
    s4d  
    OP
       208 天前 via iPhone
    @canyue7897 香港的有这个问题。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   3825 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 22ms · UTC 10:36 · PVG 18:36 · LAX 02:36 · JFK 05:36
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.