VPN start from terminal?

Hey all,

I'm using Leopards 'System Prefs > Network' tab to add a VPN connection between 2 OS X servers, one acting as VPN server and another as the client.

I'm looking to set up the client to automatically attempt to connect and disconnect based on a repetitive CRON job, but not so sure how to manage this from the terminal.

I know the standard ifconfig type things, but as these are adhoc PPP connections, I'm not sure what I need to do to instantiate the VPN without user interaction.

Can anyone please point me in the right direction? I'd like to avoid applescript if at all possible and stick to proper shell/terminal commands.

Thanks in advance
Martin

 Aluminium iMac  MacBook Pro C2D  iMac G4 USB2.0  iBook G4 -=, Mac OS X (10.5.1), =-  Mac Mini Core Duo (Linux Server)  Mac Mini G4 (10.5 Server)

Posted on Feb 9, 2008 12:06 PM

Reply
7 replies

Feb 9, 2008 3:59 PM in response to spartan1017

Indeed, I did investigate this option, but based on my experience of linux/unix, the usual files are very non-existant 🙂

ie, /etc/ppp/ is empty. nothing as I would have usually expected after dealing with RH and Debian, seems this may be an area of the OS that has been migrated to newer Apple style functionality, hence I can't rely on my knowledge base of pppd as I'd hoped!

I did once play with Tiger though and manage to get that reading ip-up/down scripts for adhoc firewall usage, I don't remember tiger being so empty in the /etc/ppp/ folders.

Thanks
Martin

Feb 10, 2008 2:52 AM in response to Tim Haigh

Well, my point is that to use OS X's GUI based VPN setup, it obviously doesn't use any of the old unix based files, so there must be another way OSX handles PPP.

I'd much rather try to use OS X's way of raising a PPP connection so that maintenance can be done by non-technical users via the screen rather than set up all the files to do something that the front end isn't overseeing... I'm just looking to find a way that CRON can kick off the connection at a certain time.

If there is anyway to bring up the OSX front end managed PPP connection, I'd appreciate tips...

Thanks
Martin

Feb 10, 2008 2:59 AM in response to spartan1017

Just to clarify, and as an example..

If you wanted to call time machine backups from the command line, you can directly call the time machine daemon (Apple's functionality) rather than having to configure rsync and write your own backup scripts.

I'm basically asking the same question for PPP/VPN connections. Apple obviously has its own way of doing this and invoking pppd rather than the old /etc/ppp scripts and config. I'd like to know if we can call Apple's 'daemon' for instantiating ppp connections (as configured in system prefs) rather than setting up some lovely options and peers files that the front end is oblivious of..

Thanks in advance for any help provided,
Martin

Feb 10, 2008 10:28 AM in response to Tim Haigh

Indeed I did... Hence rewording my question, as it must be possible to call the framework via some kind of network related daemon, rather than go for a fully 'behind the scenes' alternative to which the user interface is oblivious.

I'm perfectly capable of setting up the relevant files, but I'd like the user I'm doing this for to be able to change passwords & settings via the GUI if poss, hence wanting to understand how to get the VPN connections as defined in network settings via Sys Prefs to open/close, similar to if you did an ifconfig en0 up from the terminal.

If there is no answer, no worries.. I can do it in Applescript, but I'm sure the managing system can be called directly.

Cheers
M.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

VPN start from terminal?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.