A set of scripts and configs to easily set up openvpn with basic user/password autentication.
- python2
- python-bcrypt
- python-pysqlite2
- openvpn
- openssl
Generate certificate for the vpn server, can optionally be used as CA.
$ openssl req -x509 -nodes -days 1825 -newkey rsa:2048 -keyout HOSTNAME.key -out HOSTNAME.crt
Generate openvpn tls-auth key
$ openvpn --genkey --secret ta.key
Generate Diffie-Hellman key
$ openssl dhparam -out dh2048.pem 2048
Generate vpn configs
$ python ./generate_configs.py
Start openvpn
$ sudo openvpn --config server-generated.conf