Generate an OpenVPN Connect private tunnel profile in the unified format
MIT | ||
ovpngen | ||
README.md |
Overview
A simple shell script that creates OpenVPN compatible tunnel profiles in the unified file format. Tested on:
- Linux OpenVPN version 2.4.4
- iOS version 1.2.5 build 1 of OpenVPN Connect
- Android version 0.6.73 of OpenVPN for Android
Usage
Invoke the script with 5 tokens and the profile is outputted to stdout.
- Server Fully Qualified Domain Name of the OpenVPN server (or IP address).
- Full path to the CA cert.
- Full path to the client cert.
- Full path to the client private key.
- Full path to the server TLS shared secret key.
- Optionally define a port number (defaults to 1194 if left blank).
- Optionally define a protocol (defaults to udp if left blank).
Example (run as root) using all 7 augments to setup a profile working port 443 using TCP
CLIENT=foo
./ovpngen nipple.titty.org \
/etc/openvpn/server/ca.crt \
/etc/easy-rsa/pki/signed/$CLIENT.crt \
/etc/easy-rsa/pki/private/$CLIENT.key \
/etc/openvpn/server/ta.key \
443 \
tcp > $CLIENT.ovpn
The resulting foo.ovpn may need to be edited. Pay attention to the commented lines!
Credit
Majority of the credit goes to the script's original author, trovao. His version can be found here.