|
@@ -0,0 +1,78 @@
|
|
|
+ <!DOCTYPE html>
|
|
|
+ <html lang="en" xmlns="http://www.w3.org/1999/xhtml">
|
|
|
+ <head>
|
|
|
+ <title>Run OpenVPN Access Server in Docker</title>
|
|
|
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
|
|
+ <meta charset="UTF-8">
|
|
|
+ <meta name="keywords" content="Browser Based,Home Lab,Docker Made Easy,Home Lab Ideas,Install Guide,Self-Hosted,Web Based,Web Based Tools,Access Server,Debian,Installation,Linux,OVPN,OpenVPN,VPN,Container,Containerization,Docker,Docker How To,Docker Installation Tutorial,Docker Simplified,Docker Tutorial,Homelab,Ubuntu,How To,Tutorial,i12bretro">
|
|
|
+ <meta name="author" content="i12bretro">
|
|
|
+ <meta name="description" content="Run OpenVPN Access Server in Docker">
|
|
|
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
|
+ <meta name="revised" content="07/24/2024 07:22:34 PM" />
|
|
|
+ <link rel="icon" type="image/x-icon" href="includes/favicon.ico">
|
|
|
+ <script type="text/javascript" src="https://code.jquery.com/jquery-3.5.1.min.js"></script>
|
|
|
+ <script type="text/javascript" src="includes/js/steps.js"></script>
|
|
|
+ <link href="css/steps.css" rel="stylesheet" type="text/css" />
|
|
|
+ </head>
|
|
|
+ <body>
|
|
|
+ <div id="gridContainer">
|
|
|
+ <div class="topMargin"></div>
|
|
|
+ <div id="listName" class="topMargin">
|
|
|
+ <h1>Run OpenVPN Access Server in Docker</h1>
|
|
|
+ </div>
|
|
|
+ <div></div>
|
|
|
+ <div id="content">
|
|
|
+ <h2>What is OpenVPN Access Server?</h2>
|
|
|
+
|
|
|
+<blockquote><em>OpenVPN Access Server, [a] self-hosted VPN solution, simplifies the rapid deployment of a secure remote access and site-to-site solution with a web-based administration interface and built-in OpenVPN Connect app distribution with bundled connection profiles. -<a href="https://openvpn.net/access-server/" target="_blank">https://openvpn.net/access-server/</a></em></blockquote>
|
|
|
+
|
|
|
+<h2>Installing Docker</h2>
|
|
|
+
|
|
|
+<ol>
|
|
|
+ <li>Log into the Linux based device</li>
|
|
|
+ <li>Run the following commands in the terminal
|
|
|
+ <div class="codeBlock"># install prerequisites<br />
|
|
|
+ sudo apt install apt-transport-https ca-certificates git curl software-properties-common gnupg-agent -y<br />
|
|
|
+ # add docker gpg key<br />
|
|
|
+ curl -fsSL https://download.docker.com/linux/$(awk -F'=' '/^ID=/{ print $NF }' /etc/os-release)/gpg | sudo apt-key add -<br />
|
|
|
+ # add docker software repository<br />
|
|
|
+ sudo add-apt-repository "deb [arch=$(dpkg --print-architecture)] https://download.docker.com/linux/$(awk -F'=' '/^ID=/{ print $NF }' /etc/os-release) $(lsb_release -cs) stable"<br />
|
|
|
+ # install docker<br />
|
|
|
+ sudo apt install docker-ce docker-compose containerd.io -y<br />
|
|
|
+ # enable and start docker service<br />
|
|
|
+ sudo systemctl enable docker && sudo systemctl start docker<br />
|
|
|
+ # add the current user to the docker group<br />
|
|
|
+ sudo usermod -aG docker $USER<br />
|
|
|
+ # reauthenticate for the new group membership to take effect<br />
|
|
|
+ su - $USER</div>
|
|
|
+ </li>
|
|
|
+</ol>
|
|
|
+
|
|
|
+<h2>Running OpenVPN Access Server</h2>
|
|
|
+
|
|
|
+<ol>
|
|
|
+ <li>Now that Docker is installed, run the following commands to setup the OpenVPN Access Server Docker container and run it
|
|
|
+ <div class="codeBlock"># create working directory<br />
|
|
|
+ mkdir ~/docker/openvpn-as -p<br />
|
|
|
+ # run openvpn access server container<br />
|
|
|
+ docker run -d --name openvpn-as --cap-add=NET_ADMIN -p 943:943 -p 8443:443 -p 1194:1194/udp -v ~/docker/openvpn-as:/openvpn openvpn/openvpn-as<br />
|
|
|
+ # find the temporary password<br />
|
|
|
+ docker logs openvpn-as | grep 'Auto-generated pass'</div>
|
|
|
+ </li>
|
|
|
+ <li>Locate the line Auto-generated pass = and copy the password to your clipboard</li>
|
|
|
+ <li>Open a web browser and navigate to https://DNSorIP:943/admin</li>
|
|
|
+ <li>Login with the username openvpn and the Auto-generated password located earlier</li>
|
|
|
+ <li>Click the Agree button to accept the EULA</li>
|
|
|
+ <li>Click User Management > User Permissions in the left navigation</li>
|
|
|
+ <li>Click the edit icon next to the openvpn user</li>
|
|
|
+ <li>Enter a new password in the Password field > Click the Save Settings button</li>
|
|
|
+ <li>Click Logout at the bottom of the left navigation</li>
|
|
|
+ <li>Log back in with the username openvpn and the updated password</li>
|
|
|
+ <li>Welcome to OpenVPN Access Server running in Docker</li>
|
|
|
+</ol>
|
|
|
+
|
|
|
+<p>Source: <a href="https://openvpn.net/as-docs/docker.html" target="_blank">https://openvpn.net/as-docs/docker.html</a></p> </div>
|
|
|
+ </div>
|
|
|
+ </body>
|
|
|
+ </html>
|
|
|
+
|