Date: Thu, 07 Aug 2008 00:58:03 +0930 From: Andrew D <andrewd@webzone.net.au> To: Andy Dills <andy@xecu.net> Cc: freebsd-stable@freebsd.org Subject: Re: PPP doesn't set the correct interface in 7-STABLE Message-ID: <4899C303.50708@webzone.net.au> In-Reply-To: <20080806101147.Y50885@shell.xecu.net> References: <20080806101147.Y50885@shell.xecu.net>
next in thread | previous in thread | raw e-mail | index | archive | help
Andy Dills wrote: > I'm trying to setup pptpd to enable VPN connections. This worked well in > all versions of FreeBSD prior to 7. > > Now, however, the interface in the routing table is incorrectly set to > that of the ethernet card, rather than the appropriate tun interface. > > There is a months-old bug report detailing this: > > http://www.freebsd.org/cgi/query-pr.cgi?pr=122068&cat= > > He mentions two workarounds: > > there are two way to fix it. > 1. use differenet subnet for vpn. Don't use the same subnet for vpn > routing. user-ppp will set the correct routing table. > 2. downgrade to FreeBSD 6.2 > > #2 isn't really an option, and #1 isn't clear to me. I tried a couple of > different configurations and the interface never seems to get set > correctly. > I have a similar problem on one server that I manage. I run the following script every 30 secs. not exactly elegant, but does the job. #!/usr/local/bin/bash LNET='10.10' # local network DEFIP='254' # default gateway ip INT='fxp0' # interface for i in `/usr/bin/netstat -nr |grep $INT |awk '{print $1}'|grep $LNET|grep -v $DEFIP|grep -v '/'`; do /sbin/route delete $i done for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20; do IP=`ifconfig tun$i 2>/dev/null|grep inet|head -n 2 |tail -n 1|awk '{print $4}'` if [ -n "$IP" ];then RO=`netstat -nr | grep $IP |grep tun$i` if [ -z "$RO" ]; then /sbin/route add $IP -iface tun$i fi fi done HTH cya Andrew > > Suggestions? > > Thanks, > Andy > > --- > Andy Dills > Xecunet, Inc. > www.xecu.net > 301-682-9972 > --- > _______________________________________________ > freebsd-stable@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-stable > To unsubscribe, send any mail to "freebsd-stable-unsubscribe@freebsd.org"
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4899C303.50708>