From ad4b9823330b0ac8a3b3efcef42392857268a332 Mon Sep 17 00:00:00 2001 From: Brandon Rozek Date: Sat, 2 May 2020 18:36:21 -0400 Subject: [PATCH] Added credentials setup section --- content/blog/openvpncontainer.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/content/blog/openvpncontainer.md b/content/blog/openvpncontainer.md index 6c3e85c..7f60003 100644 --- a/content/blog/openvpncontainer.md +++ b/content/blog/openvpncontainer.md @@ -31,6 +31,11 @@ services: The `net_admin` capability according to the documentation "perform various network-related operations". This would make sense since an additional network interface is configured for a VPN connection. The `label:disable` definition is to disable label confinement. +In this setup, you will need to put the `.ovpn` profile that you wish to connect to under the `/volumes/openvpn-client/vpn/` directory. + +## (Optional) Username/Password Setup +In the event you need a username and password to connect, create a file called `pass.txt` in the same directory as your ovpn profile. The file `pass.txt` will contain the username in the first line and the password in the second line. Then in your ovpn profile make sure you have a line that says `auth-user-pass pass.txt`. + ## Routing Traffic through VPN Let's say your ISP throttles torrent connections and you want to route your `qBittorrent` container so that you can download Linux distributions faster. Here's how you can define it in the docker-compose file. @@ -53,4 +58,4 @@ qbittorrent: ## Network Workarounds -Sadly as of the time of writing, routing a container's traffic makes it lose its ability to belong to a network. I knocked into this when I tried accessing the qBittorrent API. So for the sake of example, if you want to connect to qbittorrent, you need to route the traffic to the openvpn-client container at port 8000 which we specified earlier to be the webui port of qbittorrent. \ No newline at end of file +Sadly as of the time of writing, routing a container's traffic makes it lose its ability to belong to a network. I knocked into this when I tried accessing the qBittorrent API. So for the sake of example, if you want to connect to qbittorrent, you need to route the traffic to the openvpn-client container at port 8000 which we specified earlier to be the webui port of qbittorrent.