<< More shit I can do without | Main | Impressions of OpenSolaris >>

Getting vpnc to work on OpenSolaris

chris on 2008-Feb-02 12:37 AM

I haven't found a recipe of how to get the vpnc project to work on OpenSolaris. So when I found one that worked for me I figured I'd post it, even though I don't know if it will work on Solaris 10, on other builds of OpenSolaris, or even on your computer given the exact same build I'm using. (I'm still a Solaris newb.) So YMMV.

My setup:

1) Install some dependencies with Blastwave:

 $ pkg-get -i binutils
 $ pkg-get -i libgcrypt
 $ pkg-get -i intltool
 $ pkg-get -i libiconv
 $ pkg-get -i gnupg
 $ pkg-get -i tun
 $ pkg-get -i gcc3

2) Put gcc on your PATH (assuming you're using bash):

 $ export PATH=$PATH:/opt/csw/gcc3/bin

3) Download vpnc-0.5.1

4) Unpack vpnc, cd into the directory

5) Open 'Makefile' in your favorite text editor and change all calls of 'install' to 'ginstall' (don't change the make targets, just the invocations)

6) Make and install:

 $ gmake
 $ gmake install

7) If they're not already there, add some items to your path (you'll need this permanently):

 $ export PATH=$PATH:/usr/local/bin:/usr/local/sbin

8) Create the directory for vpnc to store files:

 $ mkdir /var/run/vpnc

9) Modify the first line of the following files to use '#!/usr/bin/bash' instead of '#!/bin/bash':

    /usr/local/sbin/vpnc-disconnect
    /etc/vpnc/vpnc-script

10) Update the 'route add' statements in /etc/vpnc/vpnc-script on lines 164, 175, 183 and 189 by appending ' -interface'

11) Create your config. You can use the bundled 'pcf2vpnc' script (installed to /usr/local/bin) to translate the Cisco profile your company provides to a vpnc configuration:

 $ pcf2vpnc Your-Company-Profile.pcf > /etc/vpnc/Your-Company.conf

12) Fire it up!

 $ vpnc Your-Company.conf

13) You can see that it's working by listing your interfaces:

 $ ifconfig -a
 ...
 tun0: flags=10010008d1<UP,POINTOPOINT,RUNNING,NOARP,\
MULTICAST,IPv4,FIXEDMTU> mtu 1412 index 7
        inet 172.16.6.170 --> 172.16.6.170 netmask ffffffff
        ether eb:d5:90:b2:eb:d5

or printing your route table:

 $ netstat -nrv

14) Other useful resources:

Comments

No comments to display.

New comments are disabled.

(looking at the mirror)
- Jarkko, did you run vms/vms_yfix.pl after mucking with perly. [hc]?
(looking at own toes)
- Did you or did you not?
(picking own nose, still staring at own toes)
- Awww, okay, you did not.

--Jarkko Hietaniemi

Archives
4/2008 (2) 3/2008 (2) 2/2008 (4) 1/2008 (3) 12/2007 (2) 11/2007 (8) 10/2007 (3) 9/2007 (2) 8/2007 (8) 7/2007 (5) 6/2007 (19) 5/2007 (4) 4/2007 (2) 2/2007 (4) 1/2007 (4) 12/2006 (8) 11/2006 (7) 10/2006 (11) 9/2006 (6) 8/2006 (2) 7/2006 (3) 6/2006 (14) 5/2006 (1) 4/2006 (5) 3/2006 (12) 2/2006 (14) 1/2006 (18) 12/2005 (12) 11/2005 (10) 10/2005 (9) 9/2005 (3) 8/2005 (6) 7/2005 (18) 6/2005 (12) 4/2005 (6) 3/2005 (21) 2/2005 (13) 1/2005 (12) 12/2004 (14) 11/2004 (23) 10/2004 (23) 9/2004 (22) 8/2004 (7) 7/2004 (12) 6/2004 (23) 5/2004 (29) 4/2004 (24) 3/2004 (34) 2/2004 (21) 1/2004 (31) 12/2003 (16) 11/2003 (37) 10/2003 (32) 9/2003 (24) 8/2003 (21) 7/2003 (29) 6/2003 (27) 5/2003 (27) 4/2003 (26) 3/2003 (41) 2/2003 (29) 1/2003 (38) 12/2002 (46) 11/2002 (41) 10/2002 (45) 9/2002 (99) 8/2002 (111) 7/2002 (7) 6/2002 (19) 5/2002 (18) 4/2002 (7) 3/2002 (8) 2/2002 (22) 1/2002 (13) 12/2001 (4) 11/2001 (5) 10/2001 (5) 9/2001 (6) 8/2001 (6) 7/2001 (5) 6/2001 (5) 5/2001 (4) 4/2001 (4) 3/2001 (3) 2/2001 (6) 1/2001 (3) 12/2000 (1) 11/2000 (2) 10/2000 (7) 9/2000 (7) 8/2000 (6) 7/2000 (13) 6/2000 (6) 5/2000 (2) 4/2000 (3) 3/2000 (8) 2/2000 (4) 1/2000 (4)

All Tags
ada advertising aging aimeeman airlines ajax alcohol animals annoyances ant apache api astronomy attention baby badsoftware barackobama beauty bicycle bicycling birthday biz blog blogging books brain broadband browser build bureaucracy california cars cartoons cats charity chores classifieds clothes clown codegeneration coffee collaboration comics commercials communication community conference config corporate cpan css curmudgeon cwinters.com daily life dancing database datetime dating dc death debate design development distributed diy documentation dormont doublespeak driving dumb ebay ecommerce econ education ejb ella email embedded environment etech exercise expat family farming feed fiber fiction food fun furniture future gambling games geek gentoo geology gis government grammar greece groups gui hair hardware harrypotter hate health hiring history holiday house http ide identity illness imap ipod isp j2me jamming java javascript javaspaces jini job journalism kickass kids kinesis language lazy links linux lisp list lists living mac madison management map marriage maven media medical memory messaging meta military money movies moving ms150 music naked niagara nostalgia nyc oi2 opensource orm outsourcing parenting patent patterns pennsylvania perforce perl personal photography photos pinball pittsburgh planning politics postgres postgresql presentation privacy programming proliant proxy pseudoscience purity quiz quote race radio rant refactoring reflection relationship releases religion rest reunion review ricksantorum rules sandiego scatological science scm scripting security serendipity server servlet sex shell silly slang sleep soa soccer solaris specialization speech sports spring standards starwars steelers struts suburbs swing sysadmin tags team technology telecommuting terrorism testing thnkpad tradition transaction transportation travel traveling tutoring ui unix uptime usability usergroup vacation vc vocollect voice voting vpn walmart washingtondc weather web webservices wedding wiki win32 work writing xml yapc zeroconf