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
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.
8
11
9
-
Although there are many possible VPN-on-Demand (VoD) triggers, this utility currently only implements `SSIDMatch`and `InterfaceTypeMatch`. For 'high' (default) security level, the following algorithm is executed upon network changes, in order:
12
+
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:
10
13
11
14
- If wireless SSID matches any specified with `--trusted-ssids`, tear down the VPN connection and do not reconnect on demand.
12
15
- Else if wireless SSID matches any specified with `--untrusted-ssids`, unconditionally bring up the VPN connection on the next network attempt.
13
16
- Else if the primary network interface becomes Wifi (any SSID except those above), unconditionally bring up the VPN connection on the next network attempt.
14
17
- Else if the primary network interface becomes Cellular, leave any existing VPN connection up, but do not reconnect on demand.
15
18
- Else, unconditionally bring up the VPN connection on the next network attempt.
16
19
17
-
Note: The other match triggers, such as `DNSDomainMatch`, `DNSServerAddressMatch`, `URLStringProbe`, and per-connection domain inspection (`ActionParameters`), are not implemented. I reckon some kind of DSL will need to be built to support them; pull-requests are welcome.
20
+
Note: The other match triggers, such as `DNSDomainMatch`, `DNSServerAddressMatch`, and per-connection domain inspection (`ActionParameters`), are not implemented. I reckon some kind of DSL will need to be built to support them; pull-requests are welcome.
--cert-uuid UUID Override a Certificate payload UUID.
56
59
-t, --trusted-ssids SSIDS List of comma-separated trusted SSIDs.
57
60
-u, --untrusted-ssids SSIDS List of comma-separated untrusted SSIDs.
61
+
--url-probe URL This URL must return HTTP status 200, without redirection, before the VPN service will try establishing.
58
62
--ovpnconfigfile FILE Path to OpenVPN client config file.
59
63
-o, --output FILE Output to file. [Default: stdout]
60
64
```
@@ -79,6 +83,14 @@ For 'medium' security level, the following algorithm is executed upon network ch
79
83
- Else if the primary network interface becomes Cellular, leave any existing VPN connection up, but do not reconnect on demand.
80
84
- Else, unconditionally bring up the VPN connection on the next network attempt.
81
85
86
+
### URL Probe
87
+
88
+
Apple provides a `URLStringProbe` test condition where a VPN connection will only be established, if and only if a specified URL is successfully fetched (returning a 200 HTTP status code) without redirection.
89
+
90
+
This feature can be enabled for statistical and maintenance-protection reasons. Otherwise, it can also workaround a circular limitation with unsecured wireless captive portals. See Known Issues below for further elaboration.
91
+
92
+
By enabling this option, you will need to reliably and quickly respond with HTTP status code 200 at the URL string supplied.
93
+
82
94
## Examples
83
95
84
96
### Typical Usage
@@ -235,6 +247,7 @@ Output:
235
247
--p12file path/to/john-ipad.p12 --p12pass p12passphrase john ipad
236
248
237
249
Output similar to above:
250
+
238
251
```
239
252
<?xml version="1.0" encoding="UTF-8"?>
240
253
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
@@ -323,7 +336,7 @@ Output similar to above:
323
336
324
337
Workaround: Manually disable VPN-on-Demand in Settings.app > VPN > Server (i) option screen. Reenable only after Internet access is available.
325
338
326
-
TODO: Implement `URLStringProbe` where, if and only if this URL is successfully fetched (returning a 200 HTTP status code) without redirection, will the VPN service be required, relied on, and brought up.
339
+
Solution: Implement `URLStringProbe` where, if and only if this URL is successfully fetched (returning a 200 HTTP status code) without redirection, will the VPN service be required, relied on, and brought up. Enable with the `--url-probe` flag.
When I run `ovpnmcgen.rb g --host aruba.cucumber.org --cafile ca.crt --p12file p12file.p12 --url-probe 'https://url.to.probe/' cucumber aruba`
127
+
Then the output should match:
128
+
"""
129
+
<key>URLStringProbe</key>
130
+
\s*<string>https://url.to.probe/</string>
131
+
"""
132
+
And the output should match:
133
+
"""
134
+
<dict>
135
+
\s*<key>Action</key>
136
+
\s*<string>Ignore</string>
137
+
\s*</dict>
138
+
"""
139
+
140
+
Scenario: The url-probe flag is not set.
141
+
When I run `ovpnmcgen.rb g --host aruba.cucumber.org --cafile ca.crt --p12file p12file.p12 cucumber aruba`
142
+
Then the output should not contain:
143
+
"""
144
+
<key>URLStringProbe</key>
145
+
"""
146
+
And the output should not match:
147
+
"""
148
+
<dict>
149
+
\s*<key>Action</key>
150
+
\s*<string>Ignore</string>
151
+
\s*</dict>
152
+
"""
153
+
125
154
Scenario: The [un]trusted-ssids flags are set.
126
155
When I run `ovpnmcgen.rb g --host aruba.cucumber.org --cafile ca.crt --p12file p12file.p12 --trusted-ssids trusted1,trusted2 --untrusted-ssids evil3,evil4 cucumber aruba`
0 commit comments