While it looks hackish, I don't think there's a better way (in Bash) to open
the /dev/net/tun character device.
Checking for presence of /dev/net/tun like were doing is not good enough.
OpenVPN road warrior installer for Ubuntu, Debian, CentOS and Fedora.
This script will let you set up your own VPN server in no more than a minute, even if you haven't used OpenVPN before. It has been designed to be as unobtrusive and universal as possible.