Re: usage of "ifup ppp0" as opposed to "pon"

From: David Efflandt (efflandt_at_xnet.com)
Date: 03/22/04


Date: Mon, 22 Mar 2004 02:04:41 +0000 (UTC)

On Sat, 20 Mar 2004 21:39:37 -0500, H. S. <g_reate_xcalibur@yahoo.com> wrote:
> (I am using Debian Sarge, running kernel 2.4.24-1-686)
>
> I recently installed new version of iptables and noticed it had made
> some changes to the start up scripts. While going over the
> documentation, I realized that I can use pre-up and up and down and
> post-down commands in the /etc/network/interfaces file to execute my
> firewall scripts. I am totally new to this method and I have it sort of
> working. But the problem is that I am not sure how ifup command relates
> to the pon command. I can have the various commands executed as an
> interface is brought up, but what happens if I just pon (which I think
> brings up the interfaces?). I may not have made myself very clear, so
> feel free to ask that I rephrase.

Firewall scripts related to ppp (or pppoe) should be run from
/etc/ppp/ip-up (or ip-up.local) and maybe also from ip-down. This will
assure that the firewall is always refreshed whenever pppd gets a new IP,
whether brought up manually or reconnects automatically (persist or
demand). Your local ppp0 IP is supplied to ip-up as $4.

Attempting to do this elsewhere may not work as you expect, especially if
you have dynamic IP and pppd reconnects automatically without ppp0
actually going down and back up. For example when using demand option,
'ifconfig ppp0' will not indicate whether ppp0 is actually connected, only
that it can accept routing, and will trigger a connection if necessary.
The only thing you can count on telling you when pppd has connected is
/etc/ppp/ip-up.

-- 
David Efflandt - All spam ignored  http://www.de-srv.com/


Relevant Pages

  • How can I set a default gateway that isnt there yet?
    ... I have a pppd running in the back ground waiting for a serial ... When the serial connection happens it starts up ppp0 ...
    (comp.os.linux.misc)
  • How can I set a default gateway that isnt there yet?
    ... I have a pppd running in the back ground waiting for a serial ... When the serial connection happens it starts up ppp0 ...
    (alt.os.linux)
  • Re: Modem Question, Please Help :(
    ... > Bogdan wrote: ... > start pppd. ... configuring my eth0 connection. ... But I can not get the ppp0 to work. ...
    (comp.os.linux)
  • Re: firewall script in /etc/ppp/ip-up.d
    ... > after the ppp0 interface comes up. ... manpage on pppd(8) and look for the section on ip-up. ... Your scripts should be able to use these values directly instead of trying to ...
    (comp.os.linux.misc)
  • Re: demand dialing
    ... scripts that wake the system up, ... pppd as me and it worked. ... This is an example of Linux being user-hostile. ... active-filter port 135 and port 139 and port 445 ...
    (comp.os.linux.networking)