From df7a8e39550fad6fdb43056e241cb67970fd342b Mon Sep 17 00:00:00 2001 From: tiyn Date: Sat, 25 Mar 2023 02:51:11 +0100 Subject: [PATCH] docker-images: kylemanna/openvpn correct setup and usage added --- wiki/docker-images/kylemanna_-_openvpn.md | 28 ++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/wiki/docker-images/kylemanna_-_openvpn.md b/wiki/docker-images/kylemanna_-_openvpn.md index e1bd7cf..bdc4818 100644 --- a/wiki/docker-images/kylemanna_-_openvpn.md +++ b/wiki/docker-images/kylemanna_-_openvpn.md @@ -8,7 +8,33 @@ The official container and documentation was made by ## Set-up Create the file `rebuild.sh`. -Change the settings according to your needs and run `./rebuild.sh` afterwards. +Change the settings according to your needs. + +Then run the following commands. +Change `` to the URL the VPN is accessible at. +If not already done set a port forward or something similar. + +```sh +docker volume create --name openvpn +docker run -v openvpn:/etc/openvpn --rm kylemanna/openvpn ovpn_genconfig -u udp:// +docker run -v openvpn:/etc/openvpn --rm -it kylemanna/openvpn ovpn_initpki +``` + +Afterwards run `./rebuild.sh`. + +## Usage + +### Create Certificates + +Each device that connects to the [OpenVPN](/wiki/vpn.md#openvpn) server should +have a certificate to connect by. +Create a certificate and retrieve it by running the following commands. +Change all occurences of `` to the name of the client. + +```sh +docker run -v openvpn:/etc/openvpn --rm -it kylemanna/openvpn easyrsa build-client-full nopass +docker run -v openvpn:/etc/openvpn --rm kylemanna/openvpn ovpn_getclient > .ovpn +``` ## Volumes