From 37f86037d835cc535b93841a3d2e144d15b68737 Mon Sep 17 00:00:00 2001 From: Kyle Manna Date: Wed, 9 Jul 2014 12:18:43 -0700 Subject: [PATCH] advanced: Add advanced configs * Copy paste stuff for using host mounted volumes --- docs/advanced.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 docs/advanced.md diff --git a/docs/advanced.md b/docs/advanced.md new file mode 100644 index 0000000..ced0407 --- /dev/null +++ b/docs/advanced.md @@ -0,0 +1,21 @@ +# Advanced Configurations + +The ovpn_genconfig script is intended for simple configurations that apply to the majority of the users. If your use case isn't general, it likely won't be supported. This document aims to explain how to work around that. + +## Create host volume mounts rather then data volumes + +* Refer to the Quick Start document, and substitute `--volumes-from $OVPN_DATA` with `-v /path/on/host/openvpn0:/etc/openvpn` +* Quick example that is likely to be out of date, but here's how to get started: + + mkdir openvpn0 + cd openvpn0 + docker run --rm -v $PWD:/etc/openvpn kylemanna/openvpn ovpn_genconfig -u udp://VPN.SERVERNAME.COM:1194 + docker run --rm -v $PWD:/etc/openvpn -it kylemanna/openvpn ovpn_initpki + vim openvpn.conf + docker run --rm -v $PWD:/etc/openvpn -it kylemanna/openvpn easyrsa build-client-full CLIENTNAME nopass + docker run --rm -v $PWD:/etc/openvpn kylemanna/openvpn ovpn_getclient CLIENTNAME > CLIENTNAME.ovpn + +* Start the server with: + + docker run -v $PWD:/etc/openvpn -d -p 1194:1194/udp --privileged kylemanna/openvpn +