D
D
dimaguru2019-11-13 00:26:40
openvpn
dimaguru, 2019-11-13 00:26:40

How to run openvpn via docker?

How to run openvpn via docker using only .ovpn file? Now I start open vpn with this code:

openvpn --config user1.ovpn --keepalive 10 60 --daemon

but when the server is disconnected or restarted, the connection falls off, I looked for solutions through docker but did not find anything intelligible, maybe someone knows a ready-made image like:
sudo docker run -e user1.ovpn docker/openvpn
thanks

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dmitry, 2019-11-13
@dimaguru

They are like dirt there.
https://hub.docker.com/search?q=openvpn&type=image
and I’ll add, you don’t need docker here, you just need to configure your openvpn client as a system service so that it autostarts when the server is rebooted. Depending on which distribution you have, this is done in different ways.
Here is an example, https://linuxconfig.org/how-to-run-a-vpn-client-au...

R
Radjah, 2019-11-13
@Radjah

I did this https://blog.radjah.ru/2018/02/openvpn.html

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question