Make VPN default connection?

Discussion in 'OS X Mountain Lion (10.8)' started by kriista1234, Sep 8, 2012.

  1. kriista1234 macrumors regular

    Joined:
    Jan 12, 2008
    #1
    I recently setup VPN directly in OS X by using this guide:

    https://www.publicvpn.com/support/MacOSX105.php

    (A couple of friends have hired a dedicated server to run it through)

    It's great that it's integrated right into the OS and it's just a menu bar click away. The problem is that whenever my computer goes to sleep it disconnects and I have to manually connect it again. I can set my computer to never go to sleep but that's a bit wasteful not to mention that closing/opening a laptop does the same thing.

    Is there a way to make VPN be the default connect, always? So that when the computer goes to sleep and wakes back up, it connects the wifi and then immediately pulls up the VPN connection.
     
  2. Skoopman macrumors 6502

    Joined:
    Sep 24, 2011
    #2
    There is a way which I have not tried yet, because I don't have Xcode installed. Take a look here. If somebody makes the script into an application, please post it here.
     
  3. kriista1234 thread starter macrumors regular

    Joined:
    Jan 12, 2008
    #3
    Just set it up. Not tested it yet (in the middle of doing other stuff) but hopefully it works.

    Here's the script as an application(hardcoded to the VPN name being "VPN").
     

    Attached Files:

  4. kriista1234 thread starter macrumors regular

    Joined:
    Jan 12, 2008
    #4
    Ok, it appears to work, though not immediately. It takes a bit before it autoconnects, but it does happen.

    You do get the "disconnected from VPN" error every time you come out of sleep though, which is annoying.
     
  5. Skoopman macrumors 6502

    Joined:
    Sep 24, 2011

Share This Page