Skip to content

Instantly share code, notes, and snippets.

@grokdesigns
Last active July 24, 2017 18:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save grokdesigns/0de0aca6562990fc0fb97c8b847fdcbe to your computer and use it in GitHub Desktop.
Save grokdesigns/0de0aca6562990fc0fb97c8b847fdcbe to your computer and use it in GitHub Desktop.
Force VPN Config
<key>IKEv2</key>
<dict>
***IKEv2 Configuration Info***
<key>OnDemandEnabled</key>
<integer>1</integer>
<key>OnDemandRules</key>
<array>
<dict>
<key>Action</key>
<string>Connect</string>
<key>URLStringProbe</key>
<string>https://vpncheck.domain.com</string>
</dict>
<dict>
<key>Action</key>
<string>Disconnect</string>
<key>URLStringProbe</key>
<string>https://vpncheckint.domain.com</string>
</dict>
<dict>
<key>Action</key>
<string>Disconnect</string>
</dict>
</array>
***Remainder of IKEv2 Config***
</dict>
server
{
listen INTERFACE_IP:443;
server_name vpncheck.domain.com vpncheckint.domain.com;
access_log /var/log/nginx/vpncheck.domain.com.access.log combined buffer=16k;
error_log /var/log/nginx/vpncheck.domain.com.error.log;
include ssl.conf;
location /
{
return 200 'VPN Up';
add_header Content-Type text/plain;
access_log off;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment