Deploy and Configure OpenVPN

Tech Stack

  • OpenVPN

  • Iptables

Common Problems

Download OpenVPN Instal Script

$ wget https://git.io/vpn -O openvpn-install.sh

Run the Script

$ sudo chmod +x openvpn-install.sh
$ sudo bash openvpn-install.sh
Welcome to this OpenVPN road warrior installer!

Which protocol should OpenVPN use?
   1) UDP (recommended)
   2) TCP
Protocol [1]: 1

What port should OpenVPN listen to?
Port [1194]: 

Select a DNS server for the clients:
   1) Current system resolvers
   2) Google
   3) 1.1.1.1
   4) OpenDNS
   5) Quad9
   6) AdGuard
DNS server [1]: 2

Enter a name for the first client:
Name [client]: regiapriandi

OpenVPN installation is ready to begin.
Press any key to continue...

OpenVPN configuration file

File store at /root/regiapriandi.opvn