mirror of
https://github.com/hwdsl2/docker-ipsec-vpn-server.git
synced 2026-04-26 10:05:48 +03:00
[GH-ISSUE #465] The L2TP Connection attempt failed because the security layer encountered a processing error during initial negotiations with the remote computer. #437
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @raychan907 on GitHub (Dec 23, 2024).
Original GitHub issue: https://github.com/hwdsl2/docker-ipsec-vpn-server/issues/465
Server (please complete the following information)
OS:
Operating System: Ubuntu 24.04.1 LTS
Kernel: Linux 6.8.0-1017-raspi
Architecture: arm64
Hosting provider (if applicable): [e.g. GCP, AWS]
Raspberry Pi 5
Client (please complete the following information)
Additional context
VPN client name 是預設
這是env file 我設置過的.
VPN_IPSEC_PSK=
VPN_DNS_NAME=
VPN_USER=
VPN_PASSWORD=
VPN_ADDL_USERS=
VPN_ADDL_PASSWORDS=
VPN log.txt
docker compose.txt
REG ADD HKLM\SYSTEM\CurrentControlSet\Services\PolicyAgent /v AssumeUDPEncapsulationContextOnSendRule /t REG_DWORD /d 0x2 /f
REG ADD HKLM\SYSTEM\CurrentControlSet\Services\RasMan\Parameters /v ProhibitIpSec /t REG_DWORD /d 0x0 /f
請問我是做少了哪一個步驟?
@hwdsl2 commented on GitHub (Dec 23, 2024):
@raychan907 你好!你的 VPN 服务器配置和日志以及客户端注册表改动看起来基本正常。Docker compose 中 /lib/modules 目录应该映射到主机上的/lib/modules目录,而不是/opt/ipsec。另外,UDP 1701端口不需要打开或转发。
你可以启用 Docker 容器内的 Libreswan 日志,然后重新尝试连接,最后检查日志是否有错误。请参见:
https://github.com/hwdsl2/docker-ipsec-vpn-server/blob/master/docs/advanced-usage-zh.md#%E5%90%AF%E7%94%A8-libreswan-%E6%97%A5%E5%BF%97
如果尝试连接后没有新的日志,说明连接请求没有到达服务器,你可以自己继续进行故障排除。另外,如果日志中有 retransmission 相关错误,则说明可能是 VPN 客户端和服务器之间的网络问题。
另外,你也可以尝试不使用 Docker 直接搭建 VPN 服务器,或者试一下 IPsec VPN 之外的其他解决方案。
@raychan907 commented on GitHub (Dec 24, 2024):
Docker compose 中 /lib/modules 目录应该映射到主机上的/lib/modules目录
這個不能更改本地位置嗎? 因為我想把資料都放在/opt裡
另外我本身有另外設定了wireguard 但我同時亦需要IPsec.
以下是我運行後的結果
@hwdsl2 commented on GitHub (Dec 24, 2024):
@raychan907 是的,这样应该就启用 Libreswan 日志成功了。如果你把 /lib/modules 内容复制到别的目录的话,映射这个别的目录可能也可以。
@raychan907 commented on GitHub (Dec 24, 2024):
謝謝, 問題已解決.