Subject: Re: vpnc on NetBSD 2.0.2
To: NetBSD Users <netbsd-users@NetBSD.org>
From: Holger Weiss <lists@jhweiss.de>
List: netbsd-users
Date: 07/24/2005 22:32:45
* Gilles Gravier <Gilles@Gravier.org> [2005-07-23 14:31]:
> Using the net/vpnc package (0.3.2)... I "make install"... then create a 
> default.cfg file which I put in /usr/pkg/etc/vpnc ... I then launch 
> vpnc-connect ... connection seems to go well, until I get a bunch of 
> messages about "ip command not found". Now, I look at a Linux system, 
> and there is a command called "ip"... but on NetBSD, there isn't.

Yes, the vpnc package unfortunately installs the "vpnc-connect" script
as shipped with vpnc, which assumes Linux.

> So has anybody any idea on how to get vpnc to work?

See Huberts HOWTO at <http://ezine.daemonnews.org/200409/vpnc.html>, for
example.  The following commands will establish a VPN tunnel for the
default route.

 $ DEFAULT_GW=`netstat -rnfinet | awk '/^default/ {print $2}'`
 $ VPN_GW="123.45.6.7"
 $ route add $VPN_GW $DEFAULT_GW
 $ vpnc
 $ TUNIP=`ifconfig tun0 | awk '{ip=$2} END {print ip}'`
 $ route delete default
 $ route add default -interface $TUNIP

Note that setting the $DEFAULT_GW => $VPN_GW host route is only needed
if the VPN gateway is not within your LAN.

Instead of tunneling the default route, you may of course limit the
tunnel to some destination net (as shown in Huberts HOWTO).

Holger

-- 
PGP fingerprint:  F1F0 9071 8084 A426 DD59  9839 59D3 F3A1 B8B5 D3DE