1 |
=== On Mon, 08/17, Mike Kazantsev wrote: === |
2 |
> But then, as usual, pppd messes up the routing table, adding the |
3 |
> following route: |
4 |
> |
5 |
> __pptp_server_ip__ dev ppp0 proto kernel scope link src |
6 |
> __given_ip__ |
7 |
|
8 |
That's not messed up, that's what it's supposed to do. |
9 |
|
10 |
> resulting in routing table like this: |
11 |
> |
12 |
> __pptp_server_ip__ dev ppp0 proto kernel scope link src |
13 |
> __given_ip__ 192.168.0.0/28 dev ath0 proto kernel scope link src |
14 |
> 192.168.0.11 127.0.0.0/8 via 127.0.0.1 dev lo |
15 |
> default via 192.168.0.10 dev ath0 |
16 |
|
17 |
The __pptp_server_ip__ (you don't say what it is) should be the inner, |
18 |
or tunneled IP address to the server's tunneled interface. |
19 |
|
20 |
> ...and ppp0 falls off in two minutes, because of inability to access |
21 |
> __pptp_server_ip__. |
22 |
> |
23 |
> Naturally, all packets to __pptp_server_ip__ should go through |
24 |
> 192.168.0.10 gateway, so I've always managed to work around this |
25 |
> problem (with ISPs) by adding a route like this: |
26 |
|
27 |
No they shouldn't, because it probably isn't routable. It may be |
28 |
that your local IP network and the remote tunneled IP network are the |
29 |
same. That would cause you problems. If your connection is dropping |
30 |
then it may be that your destination is behind a firewall. It's hard to |
31 |
tell exactly what is going on with the limited information here. |
32 |
|
33 |
> So, the question: can I tell pppd/kernel not to add this route |
34 |
> somehow? I bet there should be some option, but I'm unable to find it |
35 |
> in man page or google. |
36 |
> Prehaps I can ban pppd from adding _any_ routes somehow? |
37 |
|
38 |
That's not the problem to solve. The most common problem is setting up |
39 |
routes to the tunneled destination. You probably need to add some |
40 |
static routes to the remote networks. You can do this by adding a shell |
41 |
script to /etc/ppp/ip-up.d directory: |
42 |
|
43 |
# cat 70-routes.sh |
44 |
#!/bin/sh |
45 |
|
46 |
# Used parameters and environment variables: |
47 |
# $1 - interface name |
48 |
# $6 - ipparam name |
49 |
|
50 |
case $6 in |
51 |
ipparamvalue) |
52 |
ip route add 10.0.0.0/8 dev $1;; |
53 |
esac |
54 |
|
55 |
|
56 |
|
57 |
-- Keith Dart |
58 |
|
59 |
-- |
60 |
|
61 |
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
62 |
Keith Dart <keith@×××××××××.biz> |
63 |
public key: ID: 19017044 |
64 |
<http://www.dartworks.biz/> |
65 |
===================================================================== |