hwdsl2 / docker-ipsec-vpn-server

Docker image to run an IPsec VPN server, with IPsec/L2TP, Cisco IPsec and IKEv2
https://hub.docker.com/r/hwdsl2/ipsec-vpn-server
Other
6.51k stars 1.4k forks source link

修改远程端口问题 #450

Closed 465108069 closed 1 month ago

465108069 commented 1 month ago

我现在使用docker 版本布置完了一个服务器,工作正常,现在我想用macOS用ikev2连接,所以下载了vpnclient.mobileconfig文件,然后我发现udp4500端口被封锁了,我可以将udp4500端口映射到了其它端口。 我想问一下,是否可以在mobileconfig文件中修改配置修改远程连接的端口。

ArcCal commented 1 month ago

You can open the mobileconfig file with Apple Configurator, then locate and modify the key-value pair related to the port. However, since the traffic characteristics of IKEv2 VPN are quite distinct, firewalls can easily detect and block your connection.

465108069 commented 1 month ago

ArcCal

感谢您的回复,但是我打开文件后,未找到原有的设置端口的位置;

我也试着在

RemoteAddress x.x.x.x

的后面插入

RemotePort 80

这样的配置文件,但是不起作用,是key的名字不对?还是位置放错了?或都mac不支持修改? 我不清楚,请指点一下。

ArcCal commented 1 month ago

Open the mobileconfig file with Apple Configurator, locate "VPN" on the left panel, then add a colon and the port number after the server address. The result should look like this: 1.1.1.1:9000, or vpn.example:9500.

465108069 commented 1 month ago

我刚才试了一下,不能正常工作。

Open the mobileconfig file with Apple Configurator, locate "VPN" on the left panel, then add a colon and the port number after the server address. The result should look like this: 1.1.1.1:9000, or vpn.example:9500.

hwdsl2 commented 1 month ago

@465108069 你好!据我所知,macOS 和 iOS 系统对于 IPsec VPN 目前不支持自定义端口。默认的端口是 UDP 500 和 4500 两个端口。对于你的用例,建议另外尝试 IPsec VPN 以外的其他解决方案。另外,有关服务器上的可配置参数请参见这里