This tutorial works great on CentOS 7.x, if it somehow didn't work on CentOS 8.x ( i didn't test it on CentOS 8 ) ( or above if you are coming from the future :) ), you will have to do some workarounds.
$ yum -y install epel-release
$ yum -y install openvpn easy-rsa
$ yum -y install nano
$ cp /usr/share/doc/openvpn-*/sample/sample-config-files/server.conf /etc/openvpn/
$ nano /etc/openvpn/server.conf
topology subnet
push "dhcp-option DNS 208.67.222.222" # change dns to whatever you want
push "dhcp-option DNS 208.67.222.222" # change dns to whatever you want
user nobody
group nobody
;tls-auth ta.key 0
#optional uncomment # if you want your clients to be able to see each other, useful for offices or companies
client-to-client
$ cd /usr/share/easy-rsa/
$ ls
check which version exists, for this tutorial, easy-rsa version is 3.0.6 if it is changed (updated, got higher version, you can use the higher version)
$ cd 3.0.6
$ ./easyrsa init-pki
$ ./easyrsa build-ca nopass
// Leave blank, press enter
$ ./easyrsa gen-req server nopass
// Leave blank, press enter
$ ./easyrsa gen-req client nopass
// Leave blank, press enter
$ ./easyrsa sign-req server server nopass
yes
$ ./easyrsa sign-req client client nopass
yes
$ ./easyrsa gen-dh
$ cd pki
$ pwd
$ nano /etc/openvpn/server.conf
ca ca.crt
cert server.crt
key server.key
ca /usr/share/easy-rsa/3.0.6/pki/ca.crt
cert /usr/share/easy-rsa/3.0.6/pki/issued/server.crt
key /usr/share/easy-rsa/3.0.6/pki/private/server.key
dh dh2048.pem
to
dh /usr/share/easy-rsa/3.0.6/pki/dh.pem
$ sysctl -w net.ipv4.ip_forward=1
$ echo "net.ipv4.ip_forward = 1" >> /etc/sysctl.conf
$ sudo yum -y install firewalld
$ systemctl start firewalld
$ systemctl status firewalld
$ sudo firewall-cmd --set-default=trusted
$ firewall-cmd --permanent --zone=trusted --add-masquerade
$ firewall-cmd --permanent --add-service openvpn
$ firewall-cmd --reload
$ firewall-cmd --list-all
$ cp /etc/openvpn/server.conf /etc/openvpn/service.conf
$ systemctl start openvpn@server
$ systemctl enable openvpn@server
$ yum -y install wget unzip
$ unzip -qq master.zip && rm -rf master.zip
$ cd Setup-VPN-Server-OpenVPN-Server-in-Linux-CentOS-master
$ nano OpenVPNClientsKeysGenerator.sh
$ sed -i -e 's/\r$//' OpenVPNClientsKeysGenerator.sh
$ sudo chmod +x OpenVPNClientsKeysGenerator.sh
$ ./OpenVPNClientsKeysGenerator.sh