mirror of
https://github.com/hwdsl2/docker-ipsec-vpn-server.git
synced 2026-04-26 01:55:53 +03:00
[GH-ISSUE #209] 家庭路由启用了翻墙,NAS部署Docker版本后,启动日志显示的IP是翻墙IP #194
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 @yyysuo on GitHub (Oct 28, 2020).
Original GitHub issue: https://github.com/hwdsl2/docker-ipsec-vpn-server/issues/209
问题描述
1:家庭路由网关启用了翻墙功能,NAS主机处于大陆白名单模式下。
2:NAS Docker部署服务后,启动时,Docker镜像启动日志如下:
IPsec VPN server is now ready for use!
Connect to your new VPN with these details:
Server IP: XXX.XXX.XXX.XXX
Server IP为国外IP,非家庭网络IP
3:使用无异常。
疑问:
1:Server IP这个信息显示国外IP,有没有其它影响。
2:如何使Server IP显示正确。
@adcen0107 commented on GitHub (Oct 31, 2020):
你是将NAS的Docker部署成了ipsec的客户端,去连接公网的ipsec服务端吗?
@yyysuo commented on GitHub (Oct 31, 2020):
不是呀,nas是服务端,在外面的时候通过客户端连回家 借用家中网络环境,控制家中设备。
@adcen0107 commented on GitHub (Oct 31, 2020):
(1)我感觉这个docker启动后,通过往dns服务器询问自己的公网IP,然后将公网IP作为Server_IP而已。你查过路由器出去的公网IP是Server_IP不?
(2)我刚刚抓包,我初步判断Server_IP是这样来的,docker往dns服务器查询 opendns.com,得到回复后,再向opendns.com查询myip.opendns.com,得到自己的公网IP。你可以抓包看一下,你查询myip.opendns.com的回复是不是Server_IP,是国外IP不?
@yyysuo commented on GitHub (Oct 31, 2020):
是国外IP呀,看来我把opendns这个网站加入直连的话应该就没问题了,是国外白名单的原因,我主要是想知道这个server_ip识别不正确的话,会不会有其它影响,
@adcen0107 commented on GitHub (Nov 2, 2020):
可能速度慢一点吧,ServerIP就是提供一个公网的锚点,其它没影响。我还是没明白,你这边为什么会解析出一个国外IP呢?
@hwdsl2 commented on GitHub (Nov 2, 2020):
@yyysuo 你好!你可以通过在
env文件中添加VPN_PUBLIC_IP变量的方式来指定 "Server IP"。必须删除并重新创建 Docker 容器以生效。参见[1]。如 @adcen0107 所说,这个 Docker 镜像在启动时通过查询比如 OpenDNS 来找到你的服务器的公网 IP。但你可以通过手动添加变量来指定它。这个显示的 Server IP 并不重要。如果你可以正常使用 VPN 的话,也可以不去管它。
[1] 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
@yyysuo commented on GitHub (Nov 2, 2020):
非常感谢您的解答。