From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1McyfQ-0006fq-LB for garchives@archives.gentoo.org; Mon, 17 Aug 2009 09:38:16 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 107E0E05ED; Mon, 17 Aug 2009 09:38:15 +0000 (UTC) Received: from aplus.dartworks.biz (aplus.dartworks.biz [206.225.82.180]) by pigeon.gentoo.org (Postfix) with ESMTP id CF9B9E05ED for ; Mon, 17 Aug 2009 09:38:14 +0000 (UTC) Received: from dartworks.biz (adsl-75-36-224-23.dsl.pltn13.sbcglobal.net [::ffff:75.36.224.23]) (AUTH: CRAM-MD5 mercury) by aplus.dartworks.biz with esmtp; Mon, 17 Aug 2009 02:38:14 -0700 id 00410003.4A892506.00007D45 Date: Mon, 17 Aug 2009 02:37:42 -0700 From: Keith Dart To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] Problem with pppd-added routes Message-ID: <20090817023742.5a6b46f1@dartworks.biz> In-Reply-To: <20090817104518.5dcddc31@malediction> References: <20090817104518.5dcddc31@malediction> Organization: Dartworks X-Mailer: Claws Mail 3.7.2 (GTK+ 2.16.5; x86_64-pc-linux-gnu) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Archives-Salt: 9658ada4-9325-4560-a4f9-6fde6a42246e X-Archives-Hash: 91db103e140abe9b56fa93514d3f435a === On Mon, 08/17, Mike Kazantsev wrote: === > But then, as usual, pppd messes up the routing table, adding the > following route: > > __pptp_server_ip__ dev ppp0 proto kernel scope link src > __given_ip__ That's not messed up, that's what it's supposed to do. > resulting in routing table like this: > > __pptp_server_ip__ dev ppp0 proto kernel scope link src > __given_ip__ 192.168.0.0/28 dev ath0 proto kernel scope link src > 192.168.0.11 127.0.0.0/8 via 127.0.0.1 dev lo > default via 192.168.0.10 dev ath0 The __pptp_server_ip__ (you don't say what it is) should be the inner, or tunneled IP address to the server's tunneled interface. > ...and ppp0 falls off in two minutes, because of inability to access > __pptp_server_ip__. > > Naturally, all packets to __pptp_server_ip__ should go through > 192.168.0.10 gateway, so I've always managed to work around this > problem (with ISPs) by adding a route like this: No they shouldn't, because it probably isn't routable. It may be that your local IP network and the remote tunneled IP network are the same. That would cause you problems. If your connection is dropping then it may be that your destination is behind a firewall. It's hard to tell exactly what is going on with the limited information here. > So, the question: can I tell pppd/kernel not to add this route > somehow? I bet there should be some option, but I'm unable to find it > in man page or google. > Prehaps I can ban pppd from adding _any_ routes somehow? That's not the problem to solve. The most common problem is setting up routes to the tunneled destination. You probably need to add some static routes to the remote networks. You can do this by adding a shell script to /etc/ppp/ip-up.d directory: # cat 70-routes.sh #!/bin/sh # Used parameters and environment variables: # $1 - interface name # $6 - ipparam name case $6 in ipparamvalue) ip route add 10.0.0.0/8 dev $1;; esac -- Keith Dart -- -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Keith Dart public key: ID: 19017044 =====================================================================