[GH-ISSUE #189] Can't connect to VPN server #176

Closed
opened 2026-03-02 07:44:28 +03:00 by kerem · 4 comments
Owner

Originally created by @ghost on GitHub (May 11, 2020).
Original GitHub issue: https://github.com/hwdsl2/docker-ipsec-vpn-server/issues/189

I have just created the docker image of the VPN. I am unable to connect via my laptop or my smartphone.

Server info:

Distributor ID: Ubuntu
Description: Ubuntu 18.04.4 LTS
Release: 18.04
Codename: bionic

Docker Log:

Redirecting to: /etc/init.d/ipsec start
Starting pluto IKE daemon for IPsec: .
xl2tpd[1]: setsockopt recvref[30]: Protocol not available
xl2tpd[1]: This binary does not support kernel L2TP.
xl2tpd[1]: xl2tpd version xl2tpd-1.3.6 started on 183da3bce39e 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
xl2tpd[1]: Listening on IP address 0.0.0.0, port 1701

I have opened both ports on the server firewall using ufw.

Any ideas what it could be?

Originally created by @ghost on GitHub (May 11, 2020). Original GitHub issue: https://github.com/hwdsl2/docker-ipsec-vpn-server/issues/189 I have just created the docker image of the VPN. I am unable to connect via my laptop or my smartphone. **Server info**: > Distributor ID: Ubuntu > Description: Ubuntu 18.04.4 LTS > Release: 18.04 > Codename: bionic **Docker Log**: > Redirecting to: /etc/init.d/ipsec start > Starting pluto IKE daemon for IPsec: . > xl2tpd[1]: setsockopt recvref[30]: Protocol not available > xl2tpd[1]: This binary does not support kernel L2TP. > xl2tpd[1]: xl2tpd version xl2tpd-1.3.6 started on 183da3bce39e 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 > xl2tpd[1]: Listening on IP address 0.0.0.0, port 1701 I have opened both ports on the server firewall using ufw. Any ideas what it could be?
kerem closed this issue 2026-03-02 07:44:28 +03:00
Author
Owner

@cdoer commented on GitHub (May 11, 2020):

try it

docker run \
    --name vpn \
    --restart=always \
    -p 500:500/udp \
    -p 4500:4500/udp \
    -p 1701:1701/udp \
    -v "/root/l2tp-server/vpn.env:/opt/src/vpn.env:ro" \
    -d --privileged \
    hwdsl2/ipsec-vpn-server

/root/l2tp-server/vpn.env is you vpn.env file

<!-- gh-comment-id:626617184 --> @cdoer commented on GitHub (May 11, 2020): try it ``` docker run \ --name vpn \ --restart=always \ -p 500:500/udp \ -p 4500:4500/udp \ -p 1701:1701/udp \ -v "/root/l2tp-server/vpn.env:/opt/src/vpn.env:ro" \ -d --privileged \ hwdsl2/ipsec-vpn-server ``` /root/l2tp-server/vpn.env is you vpn.env file
Author
Owner

@ghost commented on GitHub (May 11, 2020):

That didn't work either. End up with:

Redirecting to: /etc/init.d/ipsec start
Starting pluto IKE daemon for IPsec: Initializing NSS database
xl2tpd[1]: Not looking for kernel SAref support.
xl2t[1]: Using l2tp kernel support.
xl2tpd[1]: xl2tpd version xl2tpd-1.3.12 started on 99df409c4089 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
<!-- gh-comment-id:626619367 --> @ghost commented on GitHub (May 11, 2020): That didn't work either. End up with: ``` Redirecting to: /etc/init.d/ipsec start Starting pluto IKE daemon for IPsec: Initializing NSS database xl2tpd[1]: Not looking for kernel SAref support. xl2t[1]: Using l2tp kernel support. xl2tpd[1]: xl2tpd version xl2tpd-1.3.12 started on 99df409c4089 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 ```
Author
Owner

@ghost commented on GitHub (May 11, 2020):

When using IPVoid I can see that the ports are open and accessible from outside.

<!-- gh-comment-id:626631505 --> @ghost commented on GitHub (May 11, 2020): When using [IPVoid](https://www.ipvoid.com/udp-port-scan/) I can see that the ports are open and accessible from outside.
Author
Owner

@hwdsl2 commented on GitHub (May 12, 2020):

@TachyonRSA Hello! Please see [1] for the correct way to use this Docker image. If unable to connect, you may enable and check Libreswan logs [2] for errors. If no new logs appear after trying to connect, then it's most likely a firewall or network issue between your VPN client and server. The two ports UDP 500 and UDP 4500 are required for the IPsec VPN.

[1] https://github.com/hwdsl2/docker-ipsec-vpn-server#how-to-use-this-image
[2] https://github.com/hwdsl2/docker-ipsec-vpn-server#enable-libreswan-logs

<!-- gh-comment-id:627103836 --> @hwdsl2 commented on GitHub (May 12, 2020): @TachyonRSA Hello! Please see [1] for the correct way to use this Docker image. If unable to connect, you may enable and check Libreswan logs [2] for errors. If no new logs appear after trying to connect, then it's most likely a firewall or network issue between your VPN client and server. The two ports UDP 500 and UDP 4500 are required for the IPsec VPN. [1] https://github.com/hwdsl2/docker-ipsec-vpn-server#how-to-use-this-image [2] https://github.com/hwdsl2/docker-ipsec-vpn-server#enable-libreswan-logs
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/docker-ipsec-vpn-server#176
No description provided.