=== 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 <ke...@dartworks.biz>
   public key: ID: 19017044
   <http://www.dartworks.biz/>
   =====================================================================

Reply via email to