Deploy OpenVPN Server

Virtual Private Network (VPN) is no longer an afterthought with everyone working remotely during the coronavirus lockdown. Protecting your employees’ privacy and making sure company sensitive data remain secure has become a top business strategy for c-suite executives. VPN allows you and your colleagues to switch device IP addresses, secure internet traffic and protect your physical location online.

You can set up an OpenVPN Server for your organisation using our script. Follow this link and create an account. You’ll get a free $100 (£76.67 - today’s market rate) in credit over 60 days. Use it to launch a Centos 7 x86_64 VPS instance. Login as a root user and run:

yum update -y

Create a new file (openvpn_centos7.sh) and save the bash script below inside it:

#!/bin/bash
clear						        "
echo "🤖: Deploying Hori Systems Limited OpenVPN Access Server..."
yum update -y
yum install wget -y
yum install net-tools -y
wget https://horisystems.com/assets/rpm_packages/openvpn-as-2.5-CentOS7.x86_64.rpm
rpm -i openvpn-as-2.5-CentOS7.x86_64.rpm
cd /usr/local/openvpn_as/lib/python2.7/site-packages/
rm pyovpn-2.0-py2.7.egg
wget https://horisystems.com/assets/rpm_packages/pyovpn-2.0-py2.7.egg
cd /usr/local/openvpn_as/bin
./ovpn-init
echo "🤖: Okay, I'm done! Now setting up ADMIN password..."
passwd openvpn
echo "🤖: Okay, I'm done!"

Subsequently, run the following command:

# Make it executable and run it
chmod +x openvpn_centos7.sh && ./openvpn_centos7.sh <<EOF
DELETE
yes
yes
1
943
443
yes
yes
yes
yes
yes
yes ''
openvpn
openvpn
EOF

It will output Admin and Client UI login details. Login as the Admin, agree to the End User Licence Agreement, enable PAM, and update the running server. Then, you can proceed with the creation of a new user and password using the following command:

useradd CEONeil && passwd CEONeil

Grant CEONeil permission to auto-login under User Permissions page in the Admin UI, save settings and update the running server. CEONeil can now login as a user. Don’t forget to instruct the user to download the appropriate OpenVPN Connect app (Windows, macOSX, Android, iOS and Linux).

Enjoyed what you read or learned something new? You can send us a message, feedback, or suggestions — or, let us know how we can help your organisation deploy a custom and secure VPN solution. We will manage the infrastructure for a reasonable yearly commitment.