How To Install OpenVPN on CentOS 6 or CentOS 7

Pre-requisiites:

CentOS 6 or CentOS 7 already installed and you have ssh access with root permission.

Run commands in the terminal:

$  sudo yum update

$  wget https://raw.githubusercontent.com/Angristan/openvpn-install/master/openvpn-install.sh -O centos7-vpn.sh

$  chmod +x centos7-vpn.sh

$  sudo ./centos7-vpn.sh

How do I start/stop/restart OpenVPN server on CentOS 7 ?

$  sudo systemctl stop openvpn@server #<— stop server

$  sudo systemctl start openvpn@server #<— start server

$  sudo systemctl restart openvpn@server #<— restart server

$  sudo systemctl status openvpn@server #<— get server status

To add a new client:

sudo ./centos7-vpn.sh

Leave a Reply