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

查看 23|回复 0
作者:s4d   
系统情况:
系统是 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'
您需要登录后才可以回帖 登录 | 立即注册

返回顶部