mirror of
https://github.com/hwdsl2/docker-ipsec-vpn-server.git
synced 2026-04-26 18:15:50 +03:00
[GH-ISSUE #327] IKEv2、L2TP都无法链接 #305
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 @CBillZhang on GitHub (Nov 26, 2022).
Original GitHub issue: https://github.com/hwdsl2/docker-ipsec-vpn-server/issues/327
服务器使用docker部署


但无法连接

无日志输出
使用七牛云服务器,500和4500udp端口都已打开
Mac用ikev2方式、iphone用l2tp方式,都无法正常连接
很奇怪的是docker log无连接日志
@CBillZhang commented on GitHub (Nov 26, 2022):
补充下,七牛云硅谷服务器,centos8.5版本64位
@hwdsl2 commented on GitHub (Nov 26, 2022):
@CBillZhang 你好!我对这个服务器提供商(七牛云)不熟悉。根据你的描述,可能是防火墙的问题。在你的截图的防火墙配置中,请同时打开入站和出站方向的 UDP 500 和 4500 端口 (出站方向为源端口)。这可能与阿里云类似 (#433)。
你可以启用 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
另外,你的 Docker 镜像较旧,可以更新镜像和容器:
https://github.com/hwdsl2/docker-ipsec-vpn-server/blob/master/README-zh.md#%E6%9B%B4%E6%96%B0-docker-%E9%95%9C%E5%83%8F
@CBillZhang commented on GitHub (Nov 27, 2022):
你好,开启日志后,有链接日志

同时出方向端口也开了
@hwdsl2 commented on GitHub (Nov 27, 2022):
@CBillZhang 你好!不需要打开 UDP 1701 端口。你的日志中的 retransmit 字样说明连接可能被 GFW 屏蔽了。建议你尝试其他解决方案比如 Shadowsocks。
@mengqingxiang commented on GitHub (Jan 2, 2025):
--network=host 可以试试这个,我进入到docker中的时候发现他ping不同任何域名,于是我尝试加了这个以后可以了