From owner-freebsd-stable@FreeBSD.ORG Wed Aug 6 15:44:24 2008 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 787031065674 for ; Wed, 6 Aug 2008 15:44:24 +0000 (UTC) (envelope-from SRS0=_sr25.=YR=webzone.net.au=andrewd@smtp.webzone.net.au) Received: from smtp.webzone.net.au (smtp.webzone.net.au [210.8.36.14]) by mx1.freebsd.org (Postfix) with ESMTP id 1813E8FC16 for ; Wed, 6 Aug 2008 15:44:23 +0000 (UTC) (envelope-from SRS0=_sr25.=YR=webzone.net.au=andrewd@smtp.webzone.net.au) Received: from ppp121-45-47-195.lns10.adl2.internode.on.net ([121.45.47.195] helo=[192.168.202.99]) by smtp.webzone.net.au with esmtpa (Exim 4.69 (FreeBSD)) (envelope-from ) id 1KQl0e-000Mqv-UF; Thu, 07 Aug 2008 01:03:09 +0930 Message-ID: <4899C430.1030004@webzone.net.au> Date: Thu, 07 Aug 2008 01:03:04 +0930 From: Andrew D User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) MIME-Version: 1.0 To: Andy Dills References: <20080806101147.Y50885@shell.xecu.net> In-Reply-To: <20080806101147.Y50885@shell.xecu.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-AUTH-WEBZONE: andrewd@webzone.net.au successfully authed as username:andrewd Cc: freebsd-stable@freebsd.org Subject: Re: PPP doesn't set the correct interface in 7-STABLE X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Aug 2008 15:44:24 -0000 Sorry I should add, in the second 'for' it should start with 0 if you're not using the first interface for another vpn (ie openvpn) or connection (ie dsl/dialup). 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"