[GH-ISSUE #89] failing when restarting docker #76

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

Originally created by @mariosanchez23 on GitHub (Aug 28, 2018).
Original GitHub issue: https://github.com/hwdsl2/docker-ipsec-vpn-server/issues/89

When I restart the machine or just docker the vpn server restarts but does not work, i.e. I am not able to connect. If I just do a manual restart doing:

docker restart ipsec-vpn-server

it works fine.
What can I look for?

The command I used to install it was the one in the documentation (with my own env file)

docker run
--name ipsec-vpn-server
--env-file ./vpn.env
--restart=always
-p 500:500/udp
-p 4500:4500/udp
-v /lib/modules:/lib/modules:ro
-d --privileged
hwdsl2/ipsec-vpn-server

Originally created by @mariosanchez23 on GitHub (Aug 28, 2018). Original GitHub issue: https://github.com/hwdsl2/docker-ipsec-vpn-server/issues/89 When I restart the machine or just docker the vpn server restarts but does not work, i.e. I am not able to connect. If I just do a manual restart doing: docker restart ipsec-vpn-server it works fine. What can I look for? The command I used to install it was the one in the documentation (with my own env file) docker run \ --name ipsec-vpn-server \ --env-file ./vpn.env \ --restart=always \ -p 500:500/udp \ -p 4500:4500/udp \ -v /lib/modules:/lib/modules:ro \ -d --privileged \ hwdsl2/ipsec-vpn-server
kerem closed this issue 2026-03-02 07:11:33 +03:00
Author
Owner

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

@mariosanchez23 Hello! Make sure that the af_key kernel module is loaded on system boot. See [1]. Inspect logs for further troubleshooting by running docker logs ipsec-vpn-server. To enable and check Libreswan logs, see [2].

[1] https://github.com/hwdsl2/docker-ipsec-vpn-server#start-the-ipsec-vpn-server
[2] https://github.com/hwdsl2/docker-ipsec-vpn-server#enable-libreswan-logs

<!-- gh-comment-id:416583102 --> @hwdsl2 commented on GitHub (Aug 28, 2018): @mariosanchez23 Hello! Make sure that the `af_key` kernel module is loaded on system boot. See [1]. Inspect logs for further troubleshooting by running `docker logs ipsec-vpn-server`. To enable and check Libreswan logs, see [2]. [1] https://github.com/hwdsl2/docker-ipsec-vpn-server#start-the-ipsec-vpn-server [2] https://github.com/hwdsl2/docker-ipsec-vpn-server#enable-libreswan-logs
Author
Owner

@mariosanchez23 commented on GitHub (Aug 29, 2018):

Thanks for the answer.
Regarding 1) as I am using docker on Mac, I believe I don't need to do anything, do you need to run sudo modprobe af_key INSIDE the IPSec-vpn docker instance? It is not clear to me.
If so, how? how can I make sure it is loaded automatically?

<!-- gh-comment-id:416930393 --> @mariosanchez23 commented on GitHub (Aug 29, 2018): Thanks for the answer. Regarding 1) as I am using docker on Mac, I believe I don't need to do anything, do you need to run sudo modprobe af_key INSIDE the IPSec-vpn docker instance? It is not clear to me. If so, how? how can I make sure it is loaded automatically?
Author
Owner

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

@mariosanchez23 Using this image with Docker for Mac is not yet supported
at this time. Only Linux hosts have been tested.

<!-- gh-comment-id:416955021 --> @hwdsl2 commented on GitHub (Aug 29, 2018): @mariosanchez23 Using this image with Docker for Mac is not yet supported at this time. Only Linux hosts have been tested. >
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#76
No description provided.