Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

One way to quickly connect to a Cisco VPN Network
In February, this hint explainted how to install vpnc as a replacement for the Cisco VPN client. I finally got it working with a little tweaking and divergence from the original instructions, based in part on follow-up comments.

But what I really wanted was to have my VPN as easy (or easier) to activate than using the (otherwise awful) Cisco application: largely because I use my company's VPN in conjunction with 3G mobile broadband, which has a habit of dropping connection when my commuter train goes through a tunnel, requiring regular reconnection!

I tried using Shimo and vpntool with no success, and finally got it working using the following solution...

  1. Install vpnc using Fink (as per earlshango's suggestion in the original comments). You need to add the 'unstable' repository when you configure Fink, since vpnc isn't considered a stable release yet (but don't worry; it works fine). This will install all dependencies.
  2. Convert the Cisco profile(s) as per original hint.
  3. Ensure that the new conf file(s) are not visible to other users. In Terminal, do this: sudo chmod go-rwx /etc/vpnc/acme_connection.conf. Also make sure that the profiesl have your VPN password embedded in them, with a line as follows: Xauth password your_vpn_password.
  4. Test that everything's working using, for example: sudo /sw/sbin/vpnc /etc/vpnc/acme_connection.conf.
  5. Configure sudo to allow your normal account (in my case a non-admin one) to launch vpnc. I did this by running visudo as an admin user, and adding aliases as follows in the relevant sections of the file:
    User_Alias ME = frogmella, WIN_DOMAINfrogmella
    Cmnd_Alias VPNC = /sw/sbin/vpnc, /sw/sbin/vpnc-disconnect
    ME ALL = NOPASSWD: VPNC
  6. Make shell scripts in your ~/Library/Scripts folder: one to connect to each VPN you use, and one to disconnect anything. For example:

    VPN - Connect to Acme script:
    #!/bin/bash
    sudo /sw/sbin/vpnc /etc/vpnc/acme_connection.conf
    VPN - Disconnect from all script:
    #!/bin/bash
    sudo /sw/sbin/vpnc-disconnect
  7. Run AppleScript Utility (in the Utilities folder) and check Show Script Menu in Menu Bar. The newly-created shell scripts should now show in the Scripts menu. So now you have a one-click solution for connecting and disconnecting.
[robg adds: I haven't tested this one.]
    •    
  • Currently 1.11 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (9 votes cast)
 
[20,206 views]  

One way to quickly connect to a Cisco VPN | 11 comments | Create New Account
Click here to return to the 'One way to quickly connect to a Cisco VPN' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
One way to quickly connect to a Cisco VPN
Authored by: Edubits on Jun 29, '09 09:58:04AM

Even better, in Snow Leopard support for Cisco VPN is build in the OS!



[ Reply to This | # ]
One way to quickly connect to a Cisco VPN
Authored by: Sesquipedalian on Jun 29, '09 10:41:25AM

Nice!



[ Reply to This | # ]
One way to quickly connect to a Cisco VPN
Authored by: howiedi2 on Jun 29, '09 11:09:15AM

Why not just use the Cisco VPN client? Why make this more difficult than it needs to be???



[ Reply to This | # ]
One way to quickly connect to a Cisco VPN
Authored by: Soliman on Jun 29, '09 11:51:58AM

Because it is buggy and highly unstable? [Even manages to crash OSX completely]

Because it automatically drops connections after 1h?

Beause you don't like closed source software when its provider doesn't seem to care about service for OSX users?


---
Sylvain



[ Reply to This | # ]
One way to quickly connect to a Cisco VPN
Authored by: frogmella on Jun 29, '09 03:49:01PM

Also, the Cisco client will refuse to save passwords if that's the way the connection's defined. Mine being a long random alphanumeric, I find it really frustrating to have to type this in constantly.



[ Reply to This | # ]
One way to quickly connect to a Cisco VPN
Authored by: mzs on Jul 02, '09 11:01:32PM

I second the buggy and unstable. These are the things that have happened for me when I used the Cisco VPN client (various versions):

I installed it and after the installation I noticed that everything I had had under /opt was now blown away and replaced with Cisco stuff (or was that /usr/local, can't remember now).

There were a few versions where you could look in the console and see a kernel extension being repeatedly loaded and unloaded at a rate of something like twice every ten seconds.

I plumbed ethernet over firewire. On good days it would work, on bad days the routing tables were so messed-up that nothing would come out or in the airport or ethernet anymore until a reboot.

Lots and lots of hangs, crashes, and panics in addition to the times when it just plain would not work for who knows what reason.



[ Reply to This | # ]
Why not give IPSecuritas a try?
Authored by: fab23 on Jun 29, '09 01:24:42PM
Once recently I had to connect a Mac to a OpenBSD IPsec VPN server. After several attempts with editing ipsec.conf directly and asking Google a lot of questions I found IPSecuritas. With it I finally got the VPN working very quickly. It also has some pre-settings for major VPN solutions (even Cisco), but I did not had a chance yet to try them out.

bye
Fabian

[ Reply to This | # ]

Why not give IPSecuritas a try?
Authored by: frogmella on Jun 29, '09 03:46:27PM

Yup, IPSecuritas is excellent, but it doesn't currently work with all Cisco devices - specifically ASA models.



[ Reply to This | # ]
Why not give IPSecuritas a try?
Authored by: Cisco_King on Jul 24, '09 06:45:00AM
Excellent TIP. Thanks for sharing.

If you are a Cisco lover you must check out:

http://routerpictures.blogspot.com

Have fun.



[ Reply to This | # ]
One way to quickly connect to a Cisco VPN
Authored by: DougEdwards47 on Jun 30, '09 06:30:12AM

I get the following error message when I try and run the test command - anybody got an idea of what is wrong?

sudo /sw/sbin/vpnc /etc/vpnc/MacUsers.conf
can't initialise tunnel interface: No such file or directory



[ Reply to This | # ]
One way to quickly connect to a Cisco VPN
Authored by: frogmella on Jun 30, '09 09:18:51AM

Did you install all the dependencies that Fink suggested?
There may also be some more detail in the console.



[ Reply to This | # ]