I have edited a script (credits below as well as a CentOS/RHEL version) for automated OpenVPN setup. OpenVPN server on your OpenVZ VPS can be set up in under a couple of minutes. Port forwarding, client config, key archiving, and config setup is all done for you. Note that setting the port to 53 can be used to bypass captive portals as an alternative to using iodine. Feedback is appreciated.
Make sure that your VPS has it’s TUN/TAP modules enabled by your provider first. To verify it is working, enter the command below:
If you receive this message, your TUN/TAP device is ready for use:
cat: /dev/net/tun: File descriptor in bad state
If you receive this message, contact your provider for assistance:
cat: /dev/net/tun: No such file or directory
To install the script, copy and paste this into your SSH client of choice:
wget http://www.putdispenserhere.com/wp-content/uploads/openvpninstall.sh chmod +x openvpninstall.sh ./openvpninstall.sh