[GH-ISSUE #83] Cannot modprobe af_key #71

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

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

Good afternoon.

Using this VPN image with Docker 18.03 on CoreOS 1745

Got this error when launching:
modprobe: ERROR: ../libkmod/libkmod.c:586 kmod_search_moddep() could not open moddep file '/lib/modules/4.14.48-coreos-r2/modules.dep.bin' modprobe: FATAL: Module af_key not found in directory /lib/modules/4.14.48-coreos-r2 Redirecting to: /etc/init.d/ipsec start

That is running configuration:
docker run \ --name ipsec-vpn-server \ --env-file ./vpn.env \ --restart=unless-stopped \ -p 500:500/udp \ -p 4500:4500/udp \ -v /lib/modules:/lib/modules:ro \ -d --privileged \ hwdsl2/ipsec-vpn-server

I suppose, I should somehow modify the volume exposing with -v /lib/modules:/lib/modules:ro
Any obvious modification of exposure does not work.

Originally created by @imajou on GitHub (Jul 18, 2018). Original GitHub issue: https://github.com/hwdsl2/docker-ipsec-vpn-server/issues/83 Good afternoon. Using this VPN image with Docker 18.03 on CoreOS 1745 Got this error when launching: `modprobe: ERROR: ../libkmod/libkmod.c:586 kmod_search_moddep() could not open moddep file '/lib/modules/4.14.48-coreos-r2/modules.dep.bin' modprobe: FATAL: Module af_key not found in directory /lib/modules/4.14.48-coreos-r2 Redirecting to: /etc/init.d/ipsec start` That is running configuration: `docker run \ --name ipsec-vpn-server \ --env-file ./vpn.env \ --restart=unless-stopped \ -p 500:500/udp \ -p 4500:4500/udp \ -v /lib/modules:/lib/modules:ro \ -d --privileged \ hwdsl2/ipsec-vpn-server` I suppose, I should somehow modify the volume exposing with `-v /lib/modules:/lib/modules:ro` Any obvious modification of exposure does not work.
kerem closed this issue 2026-03-02 07:11:30 +03:00
Author
Owner

@hwdsl2 commented on GitHub (Aug 27, 2018):

@Imajou Hello! CoreOS is not currently supported.

<!-- gh-comment-id:416122266 --> @hwdsl2 commented on GitHub (Aug 27, 2018): @Imajou Hello! CoreOS is not currently supported.
Author
Owner

@hwdsl2 commented on GitHub (Sep 12, 2018):

@Imajou Hello! I tried to reproduce this issue under CoreOS 1855.4.0 but the sudo modprobe af_key command runs fine both outside and inside the Docker container.

I think there is a problem with your system's kernel modules, perhaps your kernel module folder name in /lib/modules does not match the version of your kernel (check uname -r)?

The latest version of this Docker image is now compatible with CoreOS, with the fix in commit 0d09e01.

<!-- gh-comment-id:420512235 --> @hwdsl2 commented on GitHub (Sep 12, 2018): @Imajou Hello! I tried to reproduce this issue under CoreOS 1855.4.0 but the `sudo modprobe af_key` command runs fine both outside and inside the Docker container. I think there is a problem with your system's kernel modules, perhaps your kernel module folder name in `/lib/modules` does not match the version of your kernel (check `uname -r`)? The latest version of this Docker image is now compatible with CoreOS, with the fix in commit 0d09e01.
Author
Owner

@sudanking commented on GitHub (Jun 27, 2019):

I still can not run Docker image in CoreOS even after I remove aes256-sha2_512 ..... any suggestions??

error:
initial Main Mode message received on 172.17.0.2:500 but no connection has been authorized with policy PSK+IKEV1_ALLOW

<!-- gh-comment-id:506441197 --> @sudanking commented on GitHub (Jun 27, 2019): I still can not run Docker image in CoreOS even after I remove aes256-sha2_512 ..... any suggestions?? error: initial Main Mode message received on 172.17.0.2:500 but no connection has been authorized with policy PSK+IKEV1_ALLOW
Author
Owner

@hwdsl2 commented on GitHub (Jul 10, 2019):

@sudanking The error probably means you are mixing IPsec/L2TP clients with IPsec/XAuth clients and connecting them shortly after one another. Try restarting the Docker container.

If still not working, backup your VPN credentials, get the latest version of the Docker image, then re-create your Docker container and try again.

<!-- gh-comment-id:509908766 --> @hwdsl2 commented on GitHub (Jul 10, 2019): @sudanking The error probably means you are mixing IPsec/L2TP clients with IPsec/XAuth clients and connecting them shortly after one another. Try restarting the Docker container. If still not working, backup your VPN credentials, get the latest version of the Docker image, then re-create your Docker container and try again.
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#71
No description provided.