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 [email protected] #<— stop server

$  sudo systemctl start [email protected] #<— start server

$  sudo systemctl restart [email protected] #<— restart server

$  sudo systemctl status [email protected] #<— get server status

To add a new client:

sudo ./centos7-vpn.sh

Leave a Reply