Yeah, you start the VPN at router level and
all traffic will be directed through the VPN. As opposed to starting a VPN session on the computer, which only affects the machine in question. It comes really useful when you have devices not capable of initiating a VPN connection on their own, like an apple TV for instance.
Thanks for the input guys, I came up with a very basic code in the meantime:
tell application "Terminal"
activate
do script "ssh [email protected]"
delay 3
tell application "System Events"
keystroke "myPassword"
keystroke return
keystroke "/etc/init.d/openvpn start"
keystroke return
delay 1
keystroke "exit"
keystroke return
delay 1
end tell
quit application "Terminal"
end tell
It actually works very well, but not what you suggested Raz0rEdge - the biggest problem being with the password out in the open. So I use Expect to fix that, but I'm really struggling to understand how it works. How would the password
not be 'in the open' with Expect?