How do I install OpenVPN by script, manually or via docker on a cloud VPS? The software is needed to mask the local network without the requirement to connect via SSH or RDP.
Before rolling OpenVPN to a cloud VPS, it's worth clarifying the technical requirements. The software is installed on Linux, Windows or dedicated servers.
The step-by-step instruction looks like this:
sudo yum update
command is used.nano /etc/selinux/config)
.After the changes are accepted and the server is ready to work, it remains to roll OpenVPN to the cloud VPS. You can do it in one of three ways: script, manually or via docker.
To do this, we need to install docker (if it is not on the project yet). The command for the installation looks like this:
apt install curl docker.io
Next, you need to enter the command:
docker run --name dockovpn --cap-add=NET_ADMIN
-p 1194:1194/udp -p 80:8080/tcp
-e HOST_ADDR=$(curl -s https://api.ipify.org)
alekslitvinenk/openvpn
It will automatically generate the configuration needed to connect to the OpenVPN server. Downloading is available at the link about http://Здесь specifies ip-address/.
The advantage is that everything happens almost automatically. The script itself is available from the terminal at the link
https://raw.githubusercontent.com/angristan/openvpn-install/master/openvpn-install.sh
To give it the rights to run, you need to type in the command line:
chmod +x openvpn-install.sh
To run the script enter the command:
./openvpn-install.sh
Next, questions appear in the terminal, which the administrator needs to answer (it depends on what the configuration file will be).
When the installation is complete, the script will offer to specify the client name and password (to be used when connecting).
To begin with we set the command:
apt install -y openvpn
The minus is that you will have to work with configurations, settings and certificates yourself.