hwdsl2 / setup-ipsec-vpn

Scripts to build your own IPsec VPN server, with IPsec/L2TP, Cisco IPsec and IKEv2
Other
25.12k stars 6.31k forks source link

af_key in Coreos #263

Closed thiesschneider closed 6 years ago

thiesschneider commented 6 years ago

Hey there,

I am trying to use your image but it is not starting properly.

The log of the container is showing the following errors:

modprobe: ERROR: ../libkmod/libkmod.c:586 kmod_search_moddep() could not open moddep file '/lib/modules/4.13.9-coreos/modules.dep.bin'
modprobe: FATAL: Module af_key not found in directory /lib/modules/4.13.9-coreos
xl2tpd[1]: setsockopt recvref[30]: Protocol not available
xl2tpd[1]: L2TP kernel support not detected (try modprobing l2tp_ppp and pppol2tp)
xl2tpd[1]: xl2tpd version xl2tpd-1.3.8 started on 7bbb4b10eb32 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

in coreos af_key is shown in the loaded modules (lsmod): af_key 36864 0

modinfo af_key
filename:       /lib/modules/4.13.9-coreos/kernel/net/key/af_key.ko
alias:          net-pf-15
license:        GPL
depends:        xfrm_algo
intree:         Y
name:           af_key
vermagic:       4.13.9-coreos SMP mod_unload

Do you have any ideas whats wrong with my configuration?

ExecStart=/usr/bin/docker run --name VPN \
      --env-file /container/vpn.env \
      -p ${COREOS_PUBLIC_IP}:500:500/udp \
      -p ${COREOS_PUBLIC_IP}:4500:4500/udp \
      -v /container/lib/modules:/lib/modules:ro \
      -d --privileged \
      hwdsl2/ipsec-vpn-server

edit: I am not sure if it is an issue for here or the other repo (https://github.com/hwdsl2/docker-ipsec-vpn-server/issues)

thiesschneider commented 6 years ago

okay. the af_key is loaded now... I pointed the volume to the wrong folder.

imajou commented 6 years ago

Could you please share the exact solution?

thiesschneider commented 6 years ago

I do not remember exactly what I did, but I think the volume has to point to /lib/modules of the system.