[GH-ISSUE #4] Can't connect to VPN Server #4

Closed
opened 2026-03-02 07:10:58 +03:00 by kerem · 6 comments
Owner

Originally created by @knowlet on GitHub (Jul 18, 2016).
Original GitHub issue: https://github.com/hwdsl2/docker-ipsec-vpn-server/issues/4

I run the docker same as the tutorial but it did't work!

My System info:

# uname -a && lsb_release -a
Linux Ubuntu-Server 4.4.0-31-generic #50-Ubuntu SMP Wed Jul 13 00:07:12 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 16.04 LTS
Release:        16.04
Codename:       denial

After docker logs ipsec-vpn-server I got this error message:

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 1f3b55fa2a26 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

And there seems no af_key in Ubuntu 16.04?
I can't tab modprobe af_key on my server.

Originally created by @knowlet on GitHub (Jul 18, 2016). Original GitHub issue: https://github.com/hwdsl2/docker-ipsec-vpn-server/issues/4 I run the docker same as the tutorial but it did't work! My System info: ``` # uname -a && lsb_release -a Linux Ubuntu-Server 4.4.0-31-generic #50-Ubuntu SMP Wed Jul 13 00:07:12 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 16.04 LTS Release: 16.04 Codename: denial ``` After `docker logs ipsec-vpn-server` I got this error message: ``` 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 1f3b55fa2a26 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 ``` And there seems no `af_key` in Ubuntu 16.04? I can't tab `modprobe af_key` on my server.
kerem closed this issue 2026-03-02 07:10:58 +03:00
Author
Owner

@hwdsl2 commented on GitHub (Jul 18, 2016):

Hi @knowlet, the output of docker logs ipsec-vpn-server is completely normal. Try re-creating the VPN connection on your client device.

What error did you see when running sudo modprobe af_key?

<!-- gh-comment-id:233278511 --> @hwdsl2 commented on GitHub (Jul 18, 2016): Hi @knowlet, the output of `docker logs ipsec-vpn-server` is completely normal. Try re-creating the VPN connection on your client device. What error did you see when running `sudo modprobe af_key`?
Author
Owner

@knowlet commented on GitHub (Jul 18, 2016):

I had rebuild the docker several times but my client device can't connect anyway.
There aren't any output after I run modprobe af_key.
Should I use user account with sudo but not using root to run it?

<!-- gh-comment-id:233280558 --> @knowlet commented on GitHub (Jul 18, 2016): I had rebuild the docker several times but my client device can't connect anyway. There aren't any output after I run `modprobe af_key`. Should I use user account with `sudo` but not using root to run it?
Author
Owner

@hwdsl2 commented on GitHub (Jul 18, 2016):

@knowlet It is normal to have no output when running modprobe af_key.

I think your Docker container is running fine. What is your client device (Windows, macOS, iOS, Android, etc.)? And what error did you see? Please follow the steps in [1] to configure your client device.

[1] https://github.com/hwdsl2/setup-ipsec-vpn/blob/master/docs/clients.md

<!-- gh-comment-id:233334323 --> @hwdsl2 commented on GitHub (Jul 18, 2016): @knowlet It is normal to have no output when running `modprobe af_key`. I think your Docker container is running fine. What is your client device (Windows, macOS, iOS, Android, etc.)? And what error did you see? Please follow the steps in [1] to configure your client device. [1] https://github.com/hwdsl2/setup-ipsec-vpn/blob/master/docs/clients.md
Author
Owner

@knowlet commented on GitHub (Jul 19, 2016):

@hwdsl2 I'm using macOS and when trying to connect to VPN Server it keeps telling me that connect no response.
I had tried to nmap my server but I can't find the port that was opened by this image, here are my iptables -L output:

Chain DOCKER (1 references)
target     prot opt source               destination         
ACCEPT     udp  --  anywhere             172.17.0.2           udp dpt:ipsec-nat-t
ACCEPT     udp  --  anywhere             172.17.0.2           udp dpt:isakmp
ACCEPT     tcp  --  anywhere             172.17.0.3           tcp dpt:mysql
ACCEPT     tcp  --  anywhere             172.17.0.5           tcp dpt:https
ACCEPT     tcp  --  anywhere             172.17.0.5           tcp dpt:http

netstat output:

$ netstat -anlp | grep LISTEN
(Not all processes could be identified, non-owned process info
 will not be shown, you would have to be root to see it all.)
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      -               
tcp6       0      0 :::3306                 :::*                    LISTEN      -               
tcp6       0      0 :::80                   :::*                    LISTEN      -               
tcp6       0      0 :::22                   :::*                    LISTEN      -               
tcp6       0      0 :::443                  :::*                    LISTEN      -  

and nmap -O output:

Host is up (0.00092s latency).
Not shown: 997 closed ports
PORT     STATE SERVICE
22/tcp   open  ssh
80/tcp   open  http
3306/tcp open  mysql
No exact OS matches for host (If you know what OS is running on it, see https://nmap.org/submit/ ).
<!-- gh-comment-id:233500105 --> @knowlet commented on GitHub (Jul 19, 2016): @hwdsl2 I'm using macOS and when trying to connect to VPN Server it keeps telling me that connect no response. I had tried to nmap my server but I can't find the port that was opened by this image, here are my `iptables -L` output: ``` Chain DOCKER (1 references) target prot opt source destination ACCEPT udp -- anywhere 172.17.0.2 udp dpt:ipsec-nat-t ACCEPT udp -- anywhere 172.17.0.2 udp dpt:isakmp ACCEPT tcp -- anywhere 172.17.0.3 tcp dpt:mysql ACCEPT tcp -- anywhere 172.17.0.5 tcp dpt:https ACCEPT tcp -- anywhere 172.17.0.5 tcp dpt:http ``` `netstat` output: ``` $ netstat -anlp | grep LISTEN (Not all processes could be identified, non-owned process info will not be shown, you would have to be root to see it all.) tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN - tcp6 0 0 :::3306 :::* LISTEN - tcp6 0 0 :::80 :::* LISTEN - tcp6 0 0 :::22 :::* LISTEN - tcp6 0 0 :::443 :::* LISTEN - ``` and `nmap -O` output: ``` Host is up (0.00092s latency). Not shown: 997 closed ports PORT STATE SERVICE 22/tcp open ssh 80/tcp open http 3306/tcp open mysql No exact OS matches for host (If you know what OS is running on it, see https://nmap.org/submit/ ). ```
Author
Owner

@hwdsl2 commented on GitHub (Jul 19, 2016):

@knowlet Please run command:

docker restart ipsec-vpn-server

Then post the output of:

docker ps | grep ipsec-vpn-server
docker logs ipsec-vpn-server
docker exec -it ipsec-vpn-server netstat -anput
netstat -anput

<!-- gh-comment-id:233502976 --> @hwdsl2 commented on GitHub (Jul 19, 2016): @knowlet Please run command: `docker restart ipsec-vpn-server` Then post the output of: `docker ps | grep ipsec-vpn-server` `docker logs ipsec-vpn-server` `docker exec -it ipsec-vpn-server netstat -anput` `netstat -anput`
Author
Owner

@knowlet commented on GitHub (Jul 19, 2016):

After I restart the container and it works!
thx.

<!-- gh-comment-id:233508434 --> @knowlet commented on GitHub (Jul 19, 2016): After I restart the container and it works! thx.
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#4
No description provided.