1

I've a Debian machine with this network scenario:

  1. eth0 - Internet Connection via local Router (172.20.1.x)
  2. ppp0 - Dial-up to a network without internet (10.x.x.x)

I've set pppd so it won't add any default routes to my routing table and my routing table looks like this after booting up the system:

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         172.20.1.1      0.0.0.0         UG    0      0        0 eth0
10.64.64.64     0.0.0.0         255.255.255.255 UH    0      0        0 ppp0
172.20.1.0      0.0.0.0         255.255.255.0   U     0      0        0 eth0

With this configuration I'm able to ping google.com, however I can't get to any machine with IP's like 10.0.0.1 or 10.0.0.2 etc...

Trying to fix this (with my poor knowledge) I modified my /etc/network/interfaces file to:

auto lo

iface lo inet loopback
iface eth0 inet dhcp

auto ppp0 
iface ppp0 inet ppp
    pre-up sleep 5
    provider vfp
    post-up  /sbin/route add -net 10.0.0.0 netmask 255.0.0.0 gw 10.64.64.64
    pre-down  /sbin/route del -net 10.0.0.0 netmask 255.0.0.0 gw 10.64.64.64

But apparently the command post-up /sbin/route add -net 10.0.0.0 netmask 255.0.0.0 gw 10.64.64.64 that should add the route to make it work is not taking effect—nothing is changing on the routing table.

What am I missing? / How can I fix this? Thank you ;)

PS: If i run route add -net 10.0.0.0 netmask 255.0.0.0 gw 10.64.64.64 after the system boots up I'm able to ping both google.com and 10.0.0.1 from the system.

1 Answer 1

2

to add or remove routes for ppp connections I don't use the interfaces file. I add scripts in /etc/ppp/ip-up.d and /etc/ppp/ip-down.d respectively instead. You simply can place scripts there with your route commands.

2
  • Testing now... Thx for the feedback ;)
    – TCB13
    Commented Jan 13, 2013 at 5:10
  • Working just fine ;) ty!
    – TCB13
    Commented Jan 13, 2013 at 5:15

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .