两台新安装系统的 VPS,一模一样的安装 WG 的方法,怎么一台正常一台无法用呢? - V2EX
V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
通过以下 Referral 链接购买 DigitalOcean 主机,你将可以帮助 V2EX 持续发展
DigitalOcean - SSD Cloud Servers
s4d
V2EX    VPS

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

  •  
  •   s4d 2024-04-28 09:20:11 +0:00 1317 次点击
    这是一个创建于 610 天前的主题,其中的信息可能已经有所发展或是发生改变。
    系统情况:
    系统是 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) - Sening 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  
       2024-04-28 20:11:11 +08:00 via iPhone
    香港的 udp 一直有问题。我用的就是这样的,当然我用不起 hk gia,我用的 udp 都或多或少有问题。
    Brunuh2Ville2
        2
    Brunuh2Ville2  
       2024-04-29 07:37:40 +08:00 via Android
    hk 怕挨揍很多商家一刀切直接禁止 udp
    s4d
        3
    s4d  
    OP
       2024-04-29 08:03:46 +08:00 via iPhone
    @northbrunv
    @canyue7897 DMIT HK GIA 禁 udp 了吗?之前买了他们家 JP GIA 没禁
    canyue7897
        4
    canyue7897  
       2024-05-01 08:49:27 +08:00
    商家没有禁止 udp ,但是你的运营商会 qos,我都遇到广州电信好几次了。正在用着,udp 速度突然断崖式下降。以前没有,怀疑割裂接的问题。
    s4d
        5
    s4d  
    OP
       2024-05-01 12:46:23 +08:00 via iPhone
    @canyue7897 香港的有这个问题。
    关于     帮助文档     自助推广系统     博客     API     FAQ     Solana     3059 人在线   最高记录 6679       Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 24ms UTC 12:28 PVG 20:28 LAX 04:28 JFK 07:28
    Do have faith in what you're doing.
    ubao msn snddm index pchome yahoo rakuten mypaper meadowduck bidyahoo youbao zxmzxm asda bnvcg cvbfg dfscv mmhjk xxddc yybgb zznbn ccubao uaitu acv GXCV ET GDG YH FG BCVB FJFH CBRE CBC GDG ET54 WRWR RWER WREW WRWER RWER SDG EW SF DSFSF fbbs ubao fhd dfg ewr dg df ewwr ewwr et ruyut utut dfg fgd gdfgt etg dfgt dfgd ert4 gd fgg wr 235 wer3 we vsdf sdf gdf ert xcv sdf rwer hfd dfg cvb rwf afb dfh jgh bmn lgh rty gfds cxv xcv xcs vdas fdf fgd cv sdf tert sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf shasha9178 shasha9178 shasha9178 shasha9178 shasha9178 liflif2 liflif2 liflif2 liflif2 liflif2 liblib3 liblib3 liblib3 liblib3 liblib3 zhazha444 zhazha444 zhazha444 zhazha444 zhazha444 dende5 dende denden denden2 denden21 fenfen9 fenf619 fen619 fenfe9 fe619 sdf sdf sdf sdf sdf zhazh90 zhazh0 zhaa50 zha90 zh590 zho zhoz zhozh zhozho zhozho2 lislis lls95 lili95 lils5 liss9 sdf0ty987 sdft876 sdft9876 sdf09876 sd0t9876 sdf0ty98 sdf0976 sdf0ty986 sdf0ty96 sdf0t76 sdf0876 df0ty98 sf0t876 sd0ty76 sdy76 sdf76 sdf0t76 sdf0ty9 sdf0ty98 sdf0ty987 sdf0ty98 sdf6676 sdf876 sd876 sd876 sdf6 sdf6 sdf9876 sdf0t sdf06 sdf0ty9776 sdf0ty9776 sdf0ty76 sdf8876 sdf0t sd6 sdf06 s688876 sd688 sdf86