mirror of
https://github.com/hwdsl2/docker-ipsec-vpn-server.git
synced 2026-04-27 02:25:51 +03:00
[GH-ISSUE #462] 连不上vpn #432
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 @guobinzhao on GitHub (Dec 3, 2024).
Original GitHub issue: https://github.com/hwdsl2/docker-ipsec-vpn-server/issues/462
Checklist
Describe the issue
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior:
docker logs -f ipsec-vpn-server
output for uname&&lsb_release -a
iptables output
docker ps output
我在微软的两台虚拟机上应该是相同的配置,一台机器配置的vpn正常work(这台是去年配置的,但这台就快要被回收了)。所以又创建了一个新的虚拟机,做了相同的配置,但就是连不上vpn。删除虚拟机后又创建了一个新的,然后拉取hwdsl2/ipsec-vpn-server,run之后vpn就是死活连不上,反复试了几次都不行。请大神帮忙给看看。
另外,为了测试是否azure开放500和4500端口是否生效,我在500和4500端口起了两个nginx服务,外部可以正常访问500和4500端口,然后我把这两个nginx服务停掉了。
Expected behavior
A clear and concise description of what you expected to happen.
Logs
Enable logs, check VPN status, and add error logs to help explain the problem, if applicable.
Server (please complete the following information)
Client (please complete the following information)
Additional context
Add any other context about the problem here.
@hwdsl2 commented on GitHub (Dec 3, 2024):
@guobinzhao 你好!对于你的用例,你的 Docker 容器日志和主机的 IPTables 看起来正常,具体导致该问题的原因不太清楚。你好像没有启用 IKEv2 模式(参见运行 IPsec VPN 服务器),IKEv2 模式是比较推荐的连接方式。
你可以在容器内启用 Libreswan 日志,再次尝试连接客户端,然后检查日志是否有错误。如果没有新的日志,说明客户端的连接请求没有到达容器。如果有 retransmission 相关错误,可能是客户端和服务器之间的网络问题。另外,你也可以尝试一下其他解决方案。
@guobinzhao commented on GitHub (Dec 4, 2024):
@hwdsl2 非常感谢您的回复,我按照步骤启用 Libreswan 日志,然后再次尝试连接,这个是
tail -f /var/log/auth.log新的log,还是连接不上。帮忙给看看哪里出了问题,感谢。以下是/var/log/auth.log全部的日志
auth.log
@guobinzhao commented on GitHub (Dec 4, 2024):
另外我也启用了 IKEv2 模式,以下是容器的输出。我也把/etc/ipsec.d/vpnclient.sswan copy出来放到andirod手机,也还是连不上。
@hwdsl2 commented on GitHub (Dec 4, 2024):
@guobinzhao 你好!从你的日志来看,可能是客户端和服务器之间的网络问题,导致连接不稳定。你可以另外尝试一下 IPsec VPN 以外的其他解决方案。
@guobinzhao commented on GitHub (Dec 5, 2024):
@hwdsl2 问题应该不是网络不稳定导致的,我另外一台虚拟机能正常work。
@guobinzhao commented on GitHub (Dec 5, 2024):
@hwdsl2 Any way, thanks for looking into this.
@guobinzhao commented on GitHub (Dec 6, 2024):
@hwdsl2 is there any other help you can provide? anything? 我被这个问题困扰好久了。
@hwdsl2 commented on GitHub (Dec 6, 2024):
@guobinzhao 对于你的用例,可以再创建一个新的虚拟机配置一下试试看?日志中 retransmission 相关的错误说明有可能是客户端和服务器之间的网络问题,或者连接被屏蔽或干扰了。你也可以试一下 IPsec VPN 以外的其他解决方案。
@guobinzhao commented on GitHub (Dec 9, 2024):
@hwdsl2 感谢,这应该是我重试的第三个虚拟机了。
@guobinzhao commented on GitHub (Dec 11, 2024):
@hwdsl2 我又创建了一个虚拟机,第一次能登录,但是访问google没办法访问,链接会断开,然后尝试再次登录就登录不了了,第一次能看到登录成功的日志,第二次啥日志都没有了。
这是包含第一次成功登录但访问google失败的日志。麻烦给看一下
@guobinzhao commented on GitHub (Dec 11, 2024):
这是/var/log/auth.log,可以看到在尝试连接,但失败了。
@hwdsl2 commented on GitHub (Dec 11, 2024):
@guobinzhao 你好!从日志来看,可能是连接被屏蔽或干扰了。建议你尝试 IPsec VPN 以外的其他解决方案,比如 Shadowsocks。
@guobinzhao commented on GitHub (Dec 12, 2024):
好吧,感谢,我换了好几个vpn,也换了region都不行,不知道是否有人和我一样。any way,thanks a lot for looking into this issue. @hwdsl2