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.37k stars 1.38k forks source link

fix for Android MTU/MSS issues 错误信息 #347

Closed bubersome closed 1 year ago

bubersome commented 1 year ago

Checklist

Describe the issue 所有默认选项没有改变,只是在[你的 env 文件]()中添加 VPN_ANDROID_MTU_FIX=yes 出现如下报错log

To Reproduce Steps to reproduce the behavior:

  1. ...
  2. ...

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.

~ docker run \
--name ipsec-vpn-server \ --env-file /root/docker-ipsec-vpn-server/vpn.env\ --restart=always \ -v ikev2-vpn-data:/etc/ipsec.d \ -v /lib/modules:/lib/modules:ro \ -p 500:500/udp \ -p 4500:4500/udp \ -d --privileged \ hwdsl2/ipsec-vpn-server 776f1da4e253016da2ad6f019e70f771af5a60d3df78dc00f066aa655023f25d ➜ ~ docker logs ipsec-vpn-server

Retrieving previously generated VPN credentials...

Trying to auto discover IP of this server... iptables v1.8.8 (legacy): can't initialize iptables table filter': Table does not exist (do you need to insmod?) Perhaps iptables or your kernel needs to be upgraded. iptables v1.8.8 (legacy): can't initialize iptables tablefilter': Table does not exist (do you need to insmod?) Perhaps iptables or your kernel needs to be upgraded. iptables v1.8.8 (legacy): can't initialize iptables table filter': Table does not exist (do you need to insmod?) Perhaps iptables or your kernel needs to be upgraded. iptables v1.8.8 (legacy): can't initialize iptables tablefilter': Table does not exist (do you need to insmod?) Perhaps iptables or your kernel needs to be upgraded. iptables v1.8.8 (legacy): can't initialize iptables table filter': Table does not exist (do you need to insmod?) Perhaps iptables or your kernel needs to be upgraded. iptables v1.8.8 (legacy): can't initialize iptables tablefilter': Table does not exist (do you need to insmod?) Perhaps iptables or your kernel needs to be upgraded. iptables v1.8.8 (legacy): can't initialize iptables table filter': Table does not exist (do you need to insmod?) Perhaps iptables or your kernel needs to be upgraded. iptables v1.8.8 (legacy): can't initialize iptables tablefilter': Table does not exist (do you need to insmod?) Perhaps iptables or your kernel needs to be upgraded. iptables v1.8.8 (legacy): can't initialize iptables table filter': Table does not exist (do you need to insmod?) Perhaps iptables or your kernel needs to be upgraded. iptables v1.8.8 (legacy): can't initialize iptables tablefilter': Table does not exist (do you need to insmod?) Perhaps iptables or your kernel needs to be upgraded. iptables v1.8.8 (legacy): can't initialize iptables table filter': Table does not exist (do you need to insmod?) Perhaps iptables or your kernel needs to be upgraded. iptables v1.8.8 (legacy): can't initialize iptables tablefilter': Table does not exist (do you need to insmod?) Perhaps iptables or your kernel needs to be upgraded. iptables v1.8.8 (legacy): can't initialize iptables table filter': Table does not exist (do you need to insmod?) Perhaps iptables or your kernel needs to be upgraded. iptables v1.8.8 (legacy): can't initialize iptables tablefilter': Table does not exist (do you need to insmod?) Perhaps iptables or your kernel needs to be upgraded. iptables v1.8.8 (legacy): can't initialize iptables table nat': Table does not exist (do you need to insmod?) Perhaps iptables or your kernel needs to be upgraded. iptables v1.8.8 (legacy): can't initialize iptables tablenat': Table does not exist (do you need to insmod?) Perhaps iptables or your kernel needs to be upgraded.

Applying fix for Android MTU/MSS issues... iptables v1.8.8 (legacy): can't initialize iptables table mangle': Table does not exist (do you need to insmod?) Perhaps iptables or your kernel needs to be upgraded. iptables v1.8.8 (legacy): can't initialize iptables tablemangle': Table does not exist (do you need to insmod?) Perhaps iptables or your kernel needs to be upgraded.

Starting IPsec service...

Server (please complete the following information)

Client (please complete the following information)

Additional context Add any other context about the problem here.

hwdsl2 commented 1 year ago

@bubersome 你好!该错误应该与 VPN_ANDROID_MTU_FIX=yes 无关。它一般是因为 IPTables 内核模块无法加载导致的。请在你的 Docker 主机上运行 sudo modprobe ip_tables,然后重新创建 Docker 容器。参见这个链接: https://github.com/hwdsl2/docker-ipsec-vpn-server/blob/master/docs/advanced-usage-zh.md#%E4%B8%8D%E5%90%AF%E7%94%A8-privileged-%E6%A8%A1%E5%BC%8F%E8%BF%90%E8%A1%8C