Run OpenVPN Access Server in Docker
#OpenVPN #Docker #Containerize
Full steps can be found at https://i12bretro.github.io/tutorials...
--------------------------------------------------------------------
What is OpenVPN Access Server?
--------------------------------------------------------------------
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. - https://openvpn.net/access-server/
--------------------------------------------------------------------
Installing Docker
--------------------------------------------------------------------
01. Log into the Linux based device
02. Run the following commands in the terminal
install prerequisites
sudo apt install apt-transport-https ca-certificates git curl software-properties-common gnupg-agent -y
add docker gpg key
curl -fsSL https://download.docker.com/linux/$(awk -F'=' '/^ID=/{ print $NF }' /etc/os-release)/gpg | sudo apt-key add -
add docker software repository
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"
install docker
sudo apt install docker-ce docker-compose containerd.io -y
enable and start docker service
sudo systemctl enable docker && sudo systemctl start docker
add the current user to the docker group
sudo usermod -aG docker $USER
reauthenticate for the new group membership to take effect
su - $USER
--------------------------------------------------------------------
Running OpenVPN Access Server
--------------------------------------------------------------------
01. Now that Docker is installed, run the following commands to setup the OpenVPN Access Server Docker container and run it
create working directory
mkdir ~/docker/openvpn-as -p
run openvpn access server container
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
find the temporary password
docker logs openvpn-as | grep 'Auto-generated pass'
02. Locate the line Auto-generated pass = and copy the password to your clipboard
03. Open a web browser and navigate to https://DNSorIP:943/admin
04. Login with the username openvpn and the Auto-generated password located earlier
05. Click the Agree button to accept the EULA
06. Click User Management ≫ User Permissions in the left navigation
07. Click the edit icon next to the openvpn user
08. Enter a new password in the Password field ≫ Click the Save Settings button
09. Click Logout at the bottom of the left navigation
10. Log back in with the username openvpn and the updated password
11. Welcome to OpenVPN Access Server running in Docker
Source: https://openvpn.net/as-docs/docker.html
Connect with me and others ###
★ Discord: / discord
★ Reddit: / i12bretro
★ Twitter: / i12bretro