Open-Solaris VPNC

Connecting Opensolaris to a Cisco VPN, (thanks for the head start!) but some changes were needed for my system. (2008.11)

pkg install sunstudioexpress
export CC=/opt/SunStudioExpress/bin/cc

Download the tun/tap driver from Kazuyoshi.

run ./configure and then you will need to edit the Makefile (for x64 only!)

Change these options

modules: tun.o tap.o
$(LD) -r -o tun tun.o
$(LD) -r -o tap tap.o

to

modules: tun.o tap.o
$(LD) -melf_x86_64 -r -o tun tun.o
$(LD) -melf_x86_64 -r -o tap tap.o

Now you can run make & make install, or you can (at your own risk, they work for me!) download the pkg of both 32 and 64 bit kernels.

tuntap-0.2.5-opensolaris-i386.pkg.gz (http://www.mediafire.com/?ny0wqzsmyct)
tuntap-0.2.5-opensolaris-x86_64.pkg.gz (http://www.mediafire.com/?ny0wqzsmyct)

Next you need to get vpnc, I grabbed vpnc-0.5.3

pkg install SUNWgmake

Now edit the Makefile and change install to ginstall (on each cmd line), for example:

install -m600 vpnc.conf $(DESTDIR)$(ETCDIR)/default.conf

to

ginstall -m600 vpnc.conf $(DESTDIR)$(ETCDIR)/default.conf

Optionally change PREFIX from /usr/local to /usr

0.5.3 will not compile correct until you modify tunip.c changing (1061)

openlog(“vpnc”, LOG_PID | LOG_PERROR, LOG_DAEMON);

to

openlog(“vpnc”, LOG_PID, LOG_DAEMON);

Now you can run gmake & gmake install, or you can (at your own risk, they work for me!) download the pkg for vpnc.

vpnc-0.5.3-opensolaris-i386.pkg.gz(http://www.mediafire.com/?0tcwnx3e4xy)

edits to the vpnc-script (included in above package), to facilitate a working vpn..

commented out line 62 #IPROUTE=…

ADDED:

route add `echo “$INTERNAL_IP4_ADDRESS” | awk ‘{ printf “%s\n”,$1}’ FS=.`.0.0.0 “$INTERNAL_IP4_ADDRESS” -interface

to the end of the set_network_route() function (lets say your ip on the vpn is 192.168.0.140, this will route all 192.* through the vpn..

ADDED:

route $route_syntax_del default “$INTERNAL_IP4_ADDRESS”

to the end of the reset_default_route() function (disconnecting left some rouge route entries, it still leaves a few…but this gets things back to working order)
Now I have full vpn access to the cisco networks I normally connect to!

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: