You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: ChangeLog
+6
Original file line number
Diff line number
Diff line change
@@ -1,3 +1,9 @@
1
+
= 0.6.0 / 2018-01-27
2
+
* Added support for `EvaluateConnection`, `Domains`, via `--domains`. It will include an `ActionParameters` dict containing `Domains`, and if `--domain-probe-url` is set, also contains `RequiredURLStringProbe`.
3
+
* Added support for updated bundle identifier (VPNSubType) `net.openvpn.connect.app` (changed since OpenVPN Connect 1.2.x), via `--v12compat`.
4
+
* Added support for `--cert` and `--key` for inline attachment of certificate and key, to workaround bug in OpenVPN Connect 1.2.5.
5
+
* Added support for `vpn-on-demand: 0` key/value pair when `--no-vod` is set, so that OpenVPN Connect can control this profile.
Generates iOS configuration profiles (.mobileconfig) that configures OpenVPN for use with VPN-on-Demand that are not accessible through the Apple Configurator or the iPhone Configuration Utility.
11
11
12
+
---
13
+
14
+
**OpenVPN Connect (iOS) v1.2.x**:
15
+
- Breaking changes: enable the `--v12compat` switch.
16
+
- Bug/workaround: enable the `--cert` & `--key` switches as necessary.
17
+
18
+
Refer to [known issues](#known-issues) below for more details.
19
+
20
+
---
21
+
12
22
Although there are many possible VPN-on-Demand (VoD) triggers, this utility currently only implements `SSIDMatch`, `InterfaceTypeMatch`, and optionally `URLStringProbe`. For 'high' (default) security level, the following algorithm is executed upon network changes, in order:
13
23
14
24
- If wireless SSID matches any specified with `--trusted-ssids`, tear down the VPN connection and do not reconnect on demand.
--vpn-uuid UUID Override a VPN configuration payload UUID.
58
74
--profile-uuid UUID Override a Profile UUID.
59
75
--cert-uuid UUID Override a Certificate payload UUID.
60
76
-t, --trusted-ssids SSIDS List of comma-separated trusted SSIDs.
61
77
-u, --untrusted-ssids SSIDS List of comma-separated untrusted SSIDs.
78
+
-d, --domains DOMAINS List of comma-separated domain names requiring VPN service.
79
+
--domain-probe-url PROBE An HTTP(S) URL to probe, using a GET request. If no HTTP response code is received from the server, a VPN connection is established in response.
62
80
--url-probe URL This URL must return HTTP status 200, without redirection, before the VPN service will try establishing.
63
81
--remotes REMOTES List of comma-separated alternate remotes: "<host> <port> <proto>".
64
82
--ovpnconfigfile FILE Path to OpenVPN client config file.
@@ -110,13 +128,25 @@ This feature can be enabled for statistical and maintenance-protection reasons.
110
128
111
129
By enabling this option, you will need to reliably and quickly respond with HTTP status code 200 at the URL string supplied.
112
130
131
+
### Domain Matching
132
+
To require an iOS device to bring up the VPN when `example.com` is requested is not so easy, especially if it is has a publicly accessible DNS resolution.
133
+
134
+
Apple provides an `EvaluateConnection` and `ActionParameters` configuration options with the view that certain domains will have DNS resolution failures, and hence, require the VPN to be up. In most corporate cases with internal-facing hostnames, it works well. See the `--domains` option.
135
+
136
+
However, if there are certain sensitive public sites (or blocked sites) that you decide that a VPN should be brought up instead, you will need to additionally specify a `RequiredURLStringProbe` that returns a non-200 response. See the `--domain-probe-url` option.
137
+
113
138
## Examples
114
139
115
140
### Typical Usage
116
-
$ ovpnmcgen.rb gen --trusted-ssids home --host vpn.example.com \
117
-
--cafile path/to/ca.pem --tafile path/to/ta.key \
141
+
$ ovpnmcgen.rb gen --v12compat \
142
+
--trusted-ssids home \
143
+
--host vpn.example.com \
144
+
--cafile path/to/ca.pem \
145
+
--tafile path/to/ta.key \
118
146
--url-probe http://vpn.example.com/status \
119
-
--p12file path/to/john-ipad.p12 --p12pass p12passphrase john ipad
*Diagnosis*: Certificates no longer found or VoD mobileconfig broken after OpenVPN Connect upgrade to v1.2.5.
401
+
402
+
The VPN switch in the Settings.app jumps rapidly from On to Off, status switches from Connecting... to Disconnected immediately. No logs produced within the OpernVPN Connect app log viewer.
403
+
404
+
This is caused by 1) a breaking change, where the `VPNSubType` has changed, and 2) a bug where the OpenVPN Connect is missing a keychain access entitlement from Apple.
405
+
406
+
*Solution + Workaround*: Enable the `--v12compat` switch to resolve (1), and use `--cert` and `--key` switches to workaround (2).
407
+
354
408
- "Not connected to Internet" error/behaviour when VPN should be established.
355
409
356
410
*Diagnosis*: Load any site in Safari. An error message "Safari cannot open the page because your iPhone is not connected to the Internet" will be presented.
c.description='Generates iOS configuration profiles (.mobileconfig) that configures OpenVPN for use with VPN-on-Demand that are not accessible through the Apple Configurator or the iPhone Configuration Utility.'
19
-
c.example'Typical Usage','ovpnmcgen.rb gen --trusted-ssids home --host vpn.example.com --cafile path/to/ca.pem --tafile path/to/ta.key --p12file path/to/john-ipad.p12 --p12pass p12passphrase john ipad'
20
-
c.example'Extended Usage','ovpnmcgen.rb gen --trusted-ssids home,school --untrusted-ssids virusnet --host vpn.example.com --cafile path/to/ca.pem --tafile path/to/ta.key --p12file path/to/john-ipad.p12 --p12pass p12passphrase john ipad'
19
+
c.example'Typical Usage','ovpnmcgen.rb gen --v12compat --trusted-ssids home --host vpn.example.com --cafile path/to/ca.pem --tafile path/to/ta.key --p12file path/to/john-ipad.p12 --p12pass p12passphrase john ipad'
20
+
c.example'Extended Usage','ovpnmcgen.rb gen --v12compat --trusted-ssids home,school --untrusted-ssids virusnet --host vpn.example.com --cafile path/to/ca.pem --tafile path/to/ta.key --p12file path/to/john-ipad.p12 --p12pass p12passphrase john ipad'
c.example'Using OpenSSL to convert from PKCS#12 (.p12) to Cert PEM file','openssl pkcs12 -in path/to/john-ipad.p12 -out path/to/john-ipad-cert.crt -nodes -nokeys'
23
+
c.example'Using OpenSSL to convert from PKCS#12 (.p12) to Key PEM file','openssl pkcs12 -in path/to/john-ipad.p12 -out path/to/john-ipad-key.pem -nodes -nocerts'
22
24
c.option'--cafile FILE','Path to OpenVPN CA file. (Required)'
23
25
c.option'--tafile FILE','Path to TLS-Auth Key file.'
26
+
c.option'--cert FILE','Path to Cert file.'
27
+
c.option'--key FILE','Path to Private Key file.'
24
28
c.option'--host HOSTNAME','Hostname of OpenVPN server. (Required)'
25
29
c.option'--proto PROTO','OpenVPN server protocol. [Default: udp]'
26
30
c.option'-p','--port PORT','OpenVPN server port. [Default: 1194]'
27
31
c.option'--p12file FILE','Path to user PKCS#12 file. (Required)'
28
32
c.option'--p12pass PASSWORD','Password to unlock PKCS#12 file.'
29
-
c.option'--[no-]vod','Enable or Disable VPN-On-Demand. [Default: Enabled]'
33
+
c.option'--[no-]vod','Enable or Disable VPN-On-Demand. When Disabled, sets `vpn-on-demand: 0`, so that OpenVPN Connect can control this profile. [Default: Enabled]'
34
+
c.option'--v12compat','Enable OpenVPN Connect 1.2.x compatibility. When Enabled, use updated `VPNSubType: net.openvpn.connect.app` (changed since OpenVPN Connect 1.2.x). [Default: Disabled]'
c.option'--vpn-uuid UUID','Override a VPN configuration payload UUID.'
32
37
c.option'--profile-uuid UUID','Override a Profile UUID.'
33
38
c.option'--cert-uuid UUID','Override a Certificate payload UUID.'
34
39
c.option'-t','--trusted-ssids SSIDS',Array,'List of comma-separated trusted SSIDs.'
35
40
c.option'-u','--untrusted-ssids SSIDS',Array,'List of comma-separated untrusted SSIDs.'
41
+
c.option'-d','--domains DOMAINS',Array,'List of comma-separated domain names requiring VPN service.'
42
+
c.option'--domain-probe-url PROBE',String,'An HTTP(S) URL to probe, using a GET request. If no HTTP response code is received from the server, a VPN connection is established in response.'
36
43
c.option'--url-probe URL','This URL must return HTTP status 200, without redirection, before the VPN service will try establishing.'
37
44
c.option'--remotes REMOTES',Array,'List of comma-separated alternate remotes: "<host> <port> <proto>".'
38
45
c.option'--ovpnconfigfile FILE','Path to OpenVPN client config file.'
@@ -50,7 +57,11 @@
50
57
51
58
raiseArgumentError.new"Host is required"unlessoptions.hostorconfig.host
52
59
raiseArgumentError.new"cafile is required"unlessoptions.cafileorconfig.cafile
53
-
raiseArgumentError.new"PKCS#12 file is required"unlessoptions.p12fileorconfig.p12file
60
+
61
+
# A --p12file or (--cert and --key) needs to be provided. Shall not prevent user from specifying both.
0 commit comments