Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm trying to configure the Snow Leopard's VPN on demand service without success

VPN on demand screenshot

I've tried the following domain+configuration pairs but none of them have worked:

domain.net default
*.domain.net default

My goal is that each time I go to www.domain.net with Safari, ssh server1.domain.net or everything else on this domain.net the connection will be established trough the VPN !

I've tried plenty of different configs but it has never worked so far...

share|improve this question
    
Wow, I didn't know snow leopard did VPN on demand. I wish windows did it (apart from the more complex direct access...) –  Christopher Edwards May 7 '10 at 17:29
    
There's another configuration section for VPN where you can add your password to the keychain. Make sure that's already set up--in my experience VPN-on-demand will only trigger if the initial connection fails, so this might not work if your server responds to both public and private connections. –  NReilingh Jul 29 '10 at 15:57
    
there is a way to indicate that an answer is not useful. It's done by downvoting. The answers you suggested to delete are off-topic, sure, but they don't qualify as offensive or worthy of deletion. They just should be downvoted. –  Gnoupi Aug 14 '10 at 6:46
    
Could this topic help? It suggest you must not be able to connect to that host without VPN for it to work. –  Daniel Beck Jan 26 '11 at 14:53
1  
this is not 100% related, but somewhat: superuser.com/questions/265861/… ... it's obviously only part of a solution to get some kind of VPN on demand, of course. –  Yar Apr 3 '11 at 6:58

4 Answers 4

I have been using Tunnelblick quite successfully. Perhaps give that a try?

I know this doesn't directly answer the question, but could be useful in bypassing the problem.

share|improve this answer
1  
So if it doesn't answer the question, put this remark as comment ! I know how to use tunneling, but I want to use VPN on demand. –  Kami Apr 20 '10 at 8:49

I've not found a true "on-demand" solutions for ssh tunnels. Here is the definition (to me):

  • A host (whether local or remote) has a listening service on port XXX
  • A client (again, local or remote) connects to port XXX
  • Host then initiates a pre-defined ssh connection to another host and sets up appropriate port forwarding, authentication typically handled for the client.
  • The client is then able to use that connection based on the port forwarding.

As near as I can tell there is no software that currently enables the "on-demand" part; as defined by a service that is actively listening for connections. You can obviously start a service that creates the tunnel, but that is of course a manual operation.

Currently my solution is using launchd to keep an ssh connection open all the time. I used this blog post to craft my own solution: http://chris.improbable.org/2008/05/21/mac-quickie-tunnel-your-traffic-using-openssh-and/

If you update your question I could probably help you roll your own, again, this is a dedicated solution not "on-demand".

As an alternative to this, you can look as SSH Tunnel Manager or the afore mentioned TunnelBlick to start tunnels manually.

share|improve this answer
2  
On-demand VPN is a feature that is advertised in Mac OS X; however, judging from this question and by searching on the web, it doesn't work properly for many people in Snow Leopard. I've tested it myself and it doesn't behave as it should. –  Stephen Jennings May 10 '10 at 14:26
3  
This doesn't address the question. In my work environment, I need to connect to the VPN before I can initiate any sort of ssh connection. –  Doug Harris May 10 '10 at 15:08
1  
Completely useless ... I love the part If you update your question I could probably help you roll your own, again, this is a dedicated solution not "on-demand". I'm still laughing on this. –  Studer May 23 '10 at 22:02

As I discovered after some testing: VPN on demand on OS X doesn't work with configuration "Default"!

Solution:

Add a minimum one named configuration on the VPN interface which you use for connecting. Then everything works fine - it's simple like that!

share|improve this answer
    
It works only with OS X built-in apps like Safari/Mail and like Gareth said, Default doesn't work, you should create a new configuration –  Haytham Elkhoja Jul 23 '11 at 12:17
    
Another requirement is that the triggering domain must be a hostname that can not be resolved using public DNS according to apple.stackexchange.com/questions/19681/… And even then VPN on demand is likely to only function using applications developed by Apple. –  Pro Backup Jul 30 '13 at 14:01

Apparently this works only if you're using certificate-based authentication.

What is VPN on demand, and how do I get it to work with iOS?

The VPN connection is made whenever the device tries to connect to certain domains. Specific apps don't need to do anything; as soon as they try to access such a server the VPN connection is initiated.

Visit this support page for information about how to use the Configuration Utility to create a configuration profile that sets up VPN On Demand.

share|improve this answer
1  
This appears to be a solution for iOS while the OP is requesting for Snow Leopard. –  KronoS Jul 19 '12 at 6:19

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.