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

Can't connect using docker-ipsec-vpn-server:latest in windows 10 #212

Closed RayMMond closed 3 years ago

RayMMond commented 3 years ago

Checklist

Describe the issue

To Reproduce Steps to reproduce the behavior:

  1. pull docker-ipsec-vpn-server:latest
  2. docker run \ --name ipsec-vpn-server \ --restart=always \ -p 500:500/udp \ -p 4500:4500/udp \ -d --privileged \ hwdsl2/ipsec-vpn-server
  3. connect with win10

Logs

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]: L2TP kernel support not detected (try modprobing l2tp_ppp and pppol2tp)
xl2tpd[1]: xl2tpd version xl2tpd-1.3.12 started on 7c3652193e69 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
xl2tpd[1]: Connection established to 110.185.174.70, 1701.  Local: 31022, Remote: 18 (ref=0/0).  LNS session is 'default'
xl2tpd[1]: check_control: Received out of order control packet on tunnel 18 (got 3, expected 2)
xl2tpd[1]: handle_packet: bad control packet!
xl2tpd[1]: start_pppd: I'm running:
xl2tpd[1]: "/usr/sbin/pppd"
xl2tpd[1]: "/dev/pts/0"
xl2tpd[1]: "passive"
xl2tpd[1]: "nodetach"
xl2tpd[1]: "192.168.42.1:192.168.42.10"
xl2tpd[1]: "refuse-pap"
xl2tpd[1]: "auth"
xl2tpd[1]: "require-chap"
xl2tpd[1]: "name"
xl2tpd[1]: "l2tpd"
xl2tpd[1]: "file"
xl2tpd[1]: "/etc/ppp/options.xl2tpd"
xl2tpd[1]: Call established with 110.185.174.70, PID: 305, Local: 10168, Remote: 1, Serial: 0
/usr/sbin/pppd: You need to create the /dev/ppp device node by
executing the following command as root:
        mknod /dev/ppp c 108 0
xl2tpd[1]: child_handler : pppd exited for call 1 with code 4
xl2tpd[1]: call_close: Call 10168 to 110.185.174.70 disconnected
xl2tpd[1]: write_packet: tty is not open yet.
xl2tpd[1]: control_finish: Connection closed to 110.185.174.70, port 1701 (), Local: 31022, Remote: 18
xl2tpd[1]: Terminating pppd: sending TERM signal to pid 305

Server (please complete the following information) Docker info:

Containers: 8
 Running: 8
 Paused: 0
 Stopped: 0
Images: 60
Server Version: 1.13.1
Storage Driver: overlay2
 Backing Filesystem: extfs
 Supports d_type: true
 Native Overlay Diff: false
Logging Driver: journald
Cgroup Driver: systemd
Plugins:
 Volume: local
 Network: bridge host macvlan null overlay
Swarm: inactive
Runtimes: docker-runc runc
Default Runtime: docker-runc
Init Binary: /usr/libexec/docker/docker-init-current
containerd version:  (expected: aa8187dbd3b7ad67d8e5e3a15115d3eef43a7ed1)
runc version: e45dd70447fb72ee4e1f6989173aa6c5dd492d87 (expected: 9df8b306d01f59d3a8029be411de015b7304dd8f)
init version: fec3683b971d9c3ef73f284f176672c44b448662 (expected: 949e6facb77383876aeff8a6944dde66b3089574)
Security Options:
 seccomp
  WARNING: You're not using the default seccomp profile
  Profile: /etc/docker/seccomp.json
Kernel Version: 4.19.91-21.2.al7.x86_64
Operating System: Alibaba Cloud Linux (Aliyun Linux) 2.1903 LTS (Hunting Beagle)
OSType: linux
Architecture: x86_64
Number of Docker Hooks: 3
CPUs: 2
Total Memory: 7.461 GiB

Client (please complete the following information)

hwdsl2 commented 3 years ago

@RayMMond Hello! Does your Docker host run Debian 10 (Buster)? From the logs, it looks like your Docker host is missing /dev/ppp:

/usr/sbin/pppd: You need to create the /dev/ppp device node by
executing the following command as root:
        mknod /dev/ppp c 108 0

This is a problem with the cloud versions of Debian 10 kernels. See [1].

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

RayMMond commented 3 years ago

@hwdsl2 Thanks! I got it!