From owner-freebsd-net@FreeBSD.ORG Mon Dec 15 10:13:03 2008 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2F6C21065672 for ; Mon, 15 Dec 2008 10:13:03 +0000 (UTC) (envelope-from max@love2party.net) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.186]) by mx1.freebsd.org (Postfix) with ESMTP id BA1768FC29 for ; Mon, 15 Dec 2008 10:13:02 +0000 (UTC) (envelope-from max@love2party.net) Received: from vampire.homelinux.org (dslb-088-066-061-136.pools.arcor-ip.net [88.66.61.136]) by mrelayeu.kundenserver.de (node=mrelayeu7) with ESMTP (Nemesis) id 0ML2xA-1LCARg16GR-0004Nb; Mon, 15 Dec 2008 11:13:00 +0100 Received: (qmail 34692 invoked from network); 15 Dec 2008 10:13:00 -0000 Received: from fbsd8.laiers.local (192.168.4.151) by laiers.local with SMTP; 15 Dec 2008 10:13:00 -0000 From: Max Laier Organization: FreeBSD To: freebsd-net@freebsd.org Date: Mon, 15 Dec 2008 11:12:59 +0100 User-Agent: KMail/1.10.1 (FreeBSD/8.0-CURRENT; KDE/4.1.1; i386; ; ) References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200812151112.59847.max@love2party.net> X-Provags-ID: V01U2FsdGVkX1+huYQDeevUskqGWj6b3qkphZxsMXcpyQ/rnjg cfcMbLAOwrn4At+1GW5t3qn12iNU1GxNQxJK1FpvPT50zlexOt gRR/X8/q9O2VyVTyYck6A== Cc: Denis Mysenko Subject: Re: PPP / Routing table X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Dec 2008 10:13:03 -0000 On Monday 15 December 2008 10:17:38 Denis Mysenko wrote: > Hello everybody! > > I got stuck here with PPP + Poptop :( I use Poptop 1.3.4 on FreeBSD > 7.1-PRERELEASE for a VPN server. > > As far as I understand, the problem is related either to userland ppp or to > FreeBSD itself and not to Poptop. So here it is: > > There is a Poptop server running for several VPN clients, MPPE is enabled > for PPP. When somebody connects, tunnel interface is created and > corresponding entry in the routing table is made, like this one: > UGH 0 0 tun0 > > Everything works fine, both with MPPE turned on and off. The problem starts > when second client connects to Poptop! New tunnel interface, let's say > tun1, is created correctly, with proper IP address. However, routing table > is updated with incorrect entry: > UGH 0 0 tun0 > > As we can see, FreeBSD added a routing entry going through the same tunnel > interface - of the previous client! So obviously new VPN connection doesn't > work. What is strange - is that it happens only when second client turns on > MPPE. With MPPE turned off - everything works fine. > > I was playing a lot with different parameters and once I got everything > working, but not anymore :) Since I don't see any logical reason - I cannot > recover the proper config. > > As far as I understand, so far, PPP creates a tunnel interface and then > FreeBSD, and not PPP, adds a routing table entry since a new network > interface was added - am I true? Local IP (my side of the PtP) for all > tunnel devices is the same - let's say 192.168.0.1. So as I see it, when > detecting corresponding interface FreeBSD chooses the first tunnel > interface because it has the same local IP. The question is - why does MPPE > affect this process? And it used to work half a day ago anyway. > > Please - if anybody has any idea - could you help me!? :) Looks to me as if poptop (which I am not familiar with) tries to do something clever and fails miserably. # netstat -rnfinet | grep 10 # ifconfig tun0 create 10.0.1.1 10.0.1.2 # ifconfig tun1 create 10.0.1.1 10.0.1.3 # netstat -rnfinet | grep 10 10.0.1.2 10.0.1.1 UH 0 0 tun0 10.0.1.3 10.0.1.1 UH 0 0 tun1 It is also unclear to me why you'd see RTF_GATEWAY on ptp routes. It might help to ktrace poptop to see what kind of ioctl it is issuing. -- /"\ Best regards, | mlaier@freebsd.org \ / Max Laier | ICQ #67774661 X http://pf4freebsd.love2party.net/ | mlaier@EFnet / \ ASCII Ribbon Campaign | Against HTML Mail and News