From dc81347dd12219da7b26e245aaa0e80c00f066e8 Mon Sep 17 00:00:00 2001 From: Kyle Manna Date: Sun, 1 Nov 2020 21:48:13 -0800 Subject: [PATCH] docs: Drop --privileged docker run flag * Fix all the docs to not mention this flag. --- README.md | 2 +- docs/advanced.md | 2 +- docs/tcp.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index cd11030..3293964 100644 --- a/README.md +++ b/README.md @@ -69,7 +69,7 @@ If you prefer to use `docker-compose` please refer to the [documentation](docs/d * Create an environment variable with the name DEBUG and value of 1 to enable debug output (using "docker -e"). - docker run -v $OVPN_DATA:/etc/openvpn -p 1194:1194/udp --privileged -e DEBUG=1 kylemanna/openvpn + docker run -v $OVPN_DATA:/etc/openvpn -p 1194:1194/udp --cap-add=NET_ADMIN -e DEBUG=1 kylemanna/openvpn * Test using a client that has openvpn installed correctly diff --git a/docs/advanced.md b/docs/advanced.md index ad7c8b3..2698197 100644 --- a/docs/advanced.md +++ b/docs/advanced.md @@ -17,4 +17,4 @@ The [`ovpn_genconfig`](/bin/ovpn_genconfig) script is intended for simple config * Start the server with: - docker run -v $PWD:/etc/openvpn -d -p 1194:1194/udp --privileged kylemanna/openvpn + docker run -v $PWD:/etc/openvpn -d -p 1194:1194/udp --cap-add=NET_ADMIN kylemanna/openvpn diff --git a/docs/tcp.md b/docs/tcp.md index 6896ea4..1507d5d 100644 --- a/docs/tcp.md +++ b/docs/tcp.md @@ -21,7 +21,7 @@ specified protocol, adjust the mapping appropriately: ## Running a Second Fallback TCP Container Instead of choosing between UDP and TCP, you can use both. A single instance of OpenVPN can only listen for a single protocol on a single port, but this image makes it easy to run two instances simultaneously. After building, configuring, and starting a standard container listening for UDP traffic on 1194, you can start a second container listening for tcp traffic on port 443: - docker run -v $OVPN_DATA:/etc/openvpn --rm -p 443:1194/tcp --privileged kylemanna/openvpn ovpn_run --proto tcp + docker run -v $OVPN_DATA:/etc/openvpn --rm -p 443:1194/tcp --cap-add=NET_ADMIN kylemanna/openvpn ovpn_run --proto tcp `ovpn_run` will load all the values from the default config file, and `--proto tcp` will override the protocol setting.