A virtual private network, or VPN, is a method of securely connecting to a network from a remote location, and is commonly used in work environments. While some institutions require the use of third-party VPN client software, others allow the use of Apple's built-in VPN clients.
In these cases, you can choose to enable the VPN menu in the OS X menu bar, and can then use it to quickly establish a VPN connection. However, if you are regularly connecting to your VPN, you may choose to also implement a hot-key shortcut to speed things up a bit more.
This workflow will connect a VPN service called 'MyVPN (PPTP)' when run (click for larger view).
(Credit: Screenshot by Topher Kessler/CNET)
To do this, you will need to use Apple's Automator program to link a small AppleScript routine to a hot key, which can be done by following this procedure:
tell current location of network preferences
set VPN to "SERVICE NAME"
set VPNactive to connected of current configuration of service VPN
if VPNactive then
disconnect service VPN
else
connect service VPN
end if
end tell
end tell
Note: If this tutorial worked for you (and it should work), please leave a comment below. Thanks.
In these cases, you can choose to enable the VPN menu in the OS X menu bar, and can then use it to quickly establish a VPN connection. However, if you are regularly connecting to your VPN, you may choose to also implement a hot-key shortcut to speed things up a bit more.
This workflow will connect a VPN service called 'MyVPN (PPTP)' when run (click for larger view).
(Credit: Screenshot by Topher Kessler/CNET)
To do this, you will need to use Apple's Automator program to link a small AppleScript routine to a hot key, which can be done by following this procedure:
- Open the Automator utility and create a new "Service" workflow.
- Set the workflow to receive "no input" in "any application" in the top-most menus.
- Add the "Run AppleScript" action to the workflow, and replace its script contents with the following (adapted from MarkupBoy):
tell current location of network preferences
set VPN to "SERVICE NAME"
set VPNactive to connected of current configuration of service VPN
if VPNactive then
disconnect service VPN
else
connect service VPN
end if
end tell
end tell
- Be sure to replace SERVICE NAME with the name of your VPN connection, which can be looked up in the Network system preferences (if the name is truncated, click the Advanced... button and view the full name at the top of the Advanced Settings panel).
- Save the workflow with a name like "Connect to VPN"
Note: If this tutorial worked for you (and it should work), please leave a comment below. Thanks.
0 comments:
Post a Comment