1
0
Fork 0
mirror of synced 2024-11-22 01:15:35 -05:00

update for v2.4.0 of openvpn

This commit is contained in:
graysky 2016-12-30 10:04:16 -05:00
parent 16bce04c29
commit a506341991
2 changed files with 32 additions and 24 deletions

View file

@ -13,7 +13,7 @@ Invoke the script with 5 tokens and the profile is outputted to stdout.
### Example ### Example
``` ```
sudo ./ovpngen titty.nipples.org /etc/openvpn/ca.crt /etc/easy-rsa/pki/signed/client.crt /etc/easy-rsa/pki/private/client.key /etc/openvpn/ta.key > iphone.ovpn sudo ./ovpngen titty.nipples.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 > iphone.ovpn
``` ```
The resulting myprofile.ovpn can be edited if desired. The resulting myprofile.ovpn can be edited if desired.

30
ovpngen
View file

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
## Tested and works with OpenVPN Connect 1.0.7 build 199 (iOS 64-bit) on iOS 9.3.3 ## Tested and works with OpenVPN Connect 1.0.7 build 199 (iOS 64-bit) on iOS 10.2
## ##
## Majority of the credit goes to the script's original author, trovao ## Majority of the credit goes to the script's original author, trovao
## Link to original script: https://gist.github.com/trovao/18e428b5a758df24455b ## Link to original script: https://gist.github.com/trovao/18e428b5a758df24455b
@ -8,17 +8,23 @@
usage() { usage() {
echo "Usage: $0 SERVER CA_CERT CLIENT_CERT CLIENT_KEY SHARED_SECRET PORT PROTO" echo "Usage: $0 SERVER CA_CERT CLIENT_CERT CLIENT_KEY SHARED_SECRET PORT PROTO"
echo echo
echo "The first 5 tokens are required while the last are optional" cat << EOF
echo " SERVER = Fully qualified domain name" The first 5 tokens are required while the last are optional
echo " CA_CERT = Full path to the CA cert" SERVER = Fully qualified domain name
echo " CLIENT_CERT = Full path to the client cert" CA_CERT = Full path to the CA cert
echo " CLIENT_KEY = Full path to the client private key" CLIENT_CERT = Full path to the client cert
echo " SHARED_SECRET = Full path to the server TLS shared secret key" CLIENT_KEY = Full path to the client private key
echo " PORT = Port number (defaults to 1194 if left blank)" SHARED_SECRET = Full path to the server TLS shared secret key
echo " PROTO = Protocol (defaults to udp if left blank)" PORT = Port number (defaults to 1194 if left blank)
PROTO = Protocol (defaults to udp if left blank)
EOF
echo echo
echo "For example:" echo 'For example:'
echo "ovpngen titty.nipples.org /etc/openvpn/ca.crt /etc/easy-rsa/pki/signed/client.crt /etc/easy-rsa/pki/private/client.key /etc/openvpn/ta.key > iphone.ovpn" echo ' ovpngen titty.nipples.org \'
echo ' /etc/openvpn/server/ca.crt \'
echo ' /etc/easy-rsa/pki/signed/client.crt \'
echo ' /etc/easy-rsa/pki/private/client.key \'
echo ' /etc/openvpn/server/ta.key > iphone.ovpn'
exit 0 exit 0
} }
@ -83,3 +89,5 @@ cat "${tls_key}"
cat << EOF cat << EOF
</tls-auth> </tls-auth>
EOF EOF
# vim:set ts=2 sw=2 et: