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.43k stars 1.39k forks source link

开启额外账号后,额外账号不能连接. #171

Closed ghost closed 4 years ago

ghost commented 4 years ago

vpn.env配置如下:

VPN_IPSEC_PSK=abcdeabcdeabcdeabcde
VPN_USER=colin
VPN_PASSWORD=hui11241124
VPN_ADDL_USERS=zhangsan lisi
VPN_ADDL_PASSWORDS=zhangsan123 lisi123

配置额外账号后,重启容器,还是只有colin账号可用,其它账号连接失败. 使用docker logs查看日志信息如下:

docker logs vpn-server

Retrieving VPN credentials...
/opt/src/run.sh: 4: /opt/src/vpn.env: lisi: not found
/opt/src/run.sh: 5: /opt/src/vpn.env: lisi123: not found

Trying to auto discover IP of this server...

================================================

IPsec VPN server is now ready for use!

Connect to your new VPN with these details:

Server IP: 11xxxxxxx6
IPsec PSK: abcdeabcdeabcdeabcde
Username: colin
Password: hui11241124

Write these down. You'll need them to connect!

Important notes:   https://git.io/vpnnotes2
Setup VPN clients: https://git.io/vpnclients

================================================

Redirecting to: /etc/init.d/ipsec start
Starting pluto IKE daemon for IPsec: Initializing NSS database

.
xl2tpd[1]: Not looking for kernel SAref support.
xl2tpd[1]: Using l2tp kernel support.
xl2tpd[1]: xl2tpd version xl2tpd-1.3.12 started on 315b7cd766b5 PID:1
xl2tpd[1]: Written by Mark Spencer, Copyright (C) 1998, Adtran, Inc.
xl2tpd[1]: Forked by Scott Balmos and David Stipp, (C) 2001
xl2tpd[1]: Inherited by Jeff McAdams, (C) 2002
xl2tpd[1]: Forked again by Xelerance (www.xelerance.com) (C) 2006-2016
xl2tpd[1]: Listening on IP address 0.0.0.0, port 1701
anyuke commented 2 years ago

the same problem, How to fixed?

hwdsl2 commented 2 years ago

@anyuke Hello! If you bind mount the env file [1], be sure to first edit your env file and use single quotes '' to enclose the values of all variables. See [1] for more information.

[1] https://github.com/hwdsl2/docker-ipsec-vpn-server/blob/master/docs/advanced-usage.md#bind-mount-the-env-file