Can't make connection away from home

Tim Writer tim-s/rLXaiAEBtBDgjK7y7TUQ at public.gmane.org
Fri Dec 16 04:52:49 UTC 2005


moliver-fC0AHe2n+mcIvw5+aKnW+Pd9D2ou9A/h at public.gmane.org writes:

> Quoting Tim Writer <tim-s/rLXaiAEBtBDgjK7y7TUQ at public.gmane.org>:
> 
> > moliver-fC0AHe2n+mcIvw5+aKnW+Pd9D2ou9A/h at public.gmane.org writes:
> >
> >> Quoting Joseph Kubik <josephkubik-Re5JQEeQqe8AvxtiuMwx3w at public.gmane.org>:
> >>
> >> > 63.201.39.254    is your default router.
> >> > On linux, when you run route -n what is the default route set to?
> >> > Can you ping the default route?
> >>
> >> On linux, here's the output:
> >> Destination      Gateway   Genmask         Flags  ... Iface
> >> 70.137.191.254   0.0.0.0   255.255.255.255 UH         ppp0
> >> 192.168.0.0      0.0.0.0   255.255.255.0   U          eth0
> >> 0.0.0.0          192.168.0.1  0.0.0.0      UG         eth0
> >
> > There's your problem. Your default gateway is set to 192.168.0.1, meaning all
> > traffic to destinations not directly connected to eth0 or ppp0 are sent via
> > 192.168.0.1. Do this:
> >
> >    # route del -net default gw 192.168.0.1
> >    # route add -net default gw 70.137.191.254
> 
> Thanks, that worked.  Not with 70.137.191.254 of course, but rather
> with the new IP it came up with this time.  Any way I can make this
> automatic, preferably in a way I can easily reverse when I go
> back to T.O.?  I'm afraid I didn't really understand the advice
> about adding defaultroute to the ppp configuration or not configuring
> eth0.

The PPP server (pppd) accepts a "defaultroute" option. This tells pppd to
make it (the PPP connection) the default route once the connection has been
established. I think you said you're using Debian Sarge. On Debian, you
simply add "defaultroute" to your /etc/ppp/peers/dsl-provider configuration
file. It's probably there already but commented out. This assumes you're
starting pppd with:

    # pon dsl-provider

About eth0. Generally, you shouldn't configure an IP address on an Ethernet
interface used for PPPoE. I think you mentioned you were using a GUI tool to
configure it. Disabling the device in the GUI tool (or telling it not to
start on boot) will probably have the desired affect.

The easiest way to reverse this when you return is to create a separate
configuration for when you're away. I think you said you were visiting your
mother. Just do this:

    # cd /etc/ppp/peers
    # cp -a dsl-provider mother

Now, modify "mother" accordingly and revert "dsl-provider" to your default
settings for Toronto. To start PPPoE when visiting your Mother:

    # pon mother

To start it in T.O.:
 
    # pon dsl-provider

HTH,

-- 
tim writer <tim-s/rLXaiAEBtBDgjK7y7TUQ at public.gmane.org>                                  starnix inc.
647.722.5301                                      toronto, ontario, canada
http://www.starnix.com              professional linux services & products
--
The Toronto Linux Users Group.      Meetings: http://tlug.ss.org
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml





More information about the Legacy mailing list