Subject: VPN connection problems
To: None <netbsd-help@netbsd.org>
From: Richard Pennington <rich@pennware.com>
List: netbsd-help
Date: 02/26/2005 07:46:07
Hi,
I'm trying to use vpnc to connect to my work network. I currently use a Cisco
windows client, but I'd rather connect from my NetBSD box.
I've been able to successfully connect to the network (that is, vpnc reports
no errors when started).
I can't seem to access anything on the network after I'm connected.
The example script that comes with the vpnc package is apparently incompatable
with NetBSD so I've been trying to roll my own.
Originally it was:
...
# started from vpnc..
ifconfig $TUNDEV inet $INTERNAL_IP4_ADDRESS \
pointopoint $INTERNAL_IP4_ADDRESS \
netmask 255.255.255.255 mtu 1412 up
ip route add $(ip route get $VPNGATEWAY | fix_ip_get_output)
ip route | grep '^default' | fix_ip_get_output > "$defr"
echo "$VPNGATEWAY" > "$gateway"
ip route del default
ip route add default dev $TUNDEV
ip route flush cache
exit 0
The ipconfig and ip commands seem to be from somewhere else (Linux?).
I modified this script to look like:
...
# started from vpnc..
echo $TUNDEV $INTERNAL_IP4_ADDRESS $VPNGATEWAY
ifconfig $TUNDEV inet $INTERNAL_IP4_ADDRESS \
$INTERNAL_IP4_ADDRESS \
netmask 255.255.255.255 mtu 1412 up
route delete -net 3
route add -net 3 $INTERNAL_IP4_ADDRESS
exit 0
This gives, from netstat -r:
Internet:
Destination Gateway Flags Refs Use Mtu Interface
default door UGS 3 17 - vr0
3/8 3.7.204.131 UGS 0 0 - tun0
3.7.204.131 localhost UH 1 0 - tun0
66.72.240.144/28 link#2 UC 3 0 - vr0
door 00:80:c8:d9:fe:4f UHLc 1 2 - vr0
main 00:50:ba:a1:09:5d UHLc 1 42 - lo0
...
and from ifconfig:
tun0: flags=51<UP,POINTOPOINT,RUNNING> mtu 1412
inet 3.7.204.131 -> 3.7.204.131 netmask 0xffffffff
What I'm trying to do is have all 3.x.x.x traffic sent to work.
I'm probably missing something simple. Any suggestions?
Thanks.
-Rich
--
Richard Pennington
Email: rich@pennware.com
http://www.pennware.com ftp://ftp.pennware.com