[H-GEN] bind pppd to an interface

sburns at ihug.com.au sburns at ihug.com.au
Mon Jun 21 21:58:17 EDT 2004


> [ Humbug *General* list - semi-serious discussions about Humbug and     ]
> [ Unix-related topics. Posts from non-subscribed addresses will vanish. ]
> 
> Greeting Fellow Humbug people,,
> 
> I have a machine with 2 adsl connections, one is for the internet and 
> contains the default gateway, the other is for a private link to another 
> network, the machine performs NAT for the local network and the remote one.
> 
> Unfortunately I cannot rely on each connection to come up on the same 
> ppp interface every time.
> 
> Is there a way to bind an instance of pppd to a particular ppp interface 
> (ppp0, ppp1) so i dont have to munge my firewall rules.
> 
> I've looked at the man page for PPP and done some searching but alas, 
> the correct search string eludes me.
> 
> 
Hi,
    I hit this problem at work.  We have 30 odd ppp connections which come up
more or less randomly with different firewall/routing rules for each.

    One solution is through /etc/ppp/ip-up.local  $1 is the interface, and $6 is
what you called it.  Just put your firewalling/routing commands inside a switch
statement on $6 and apply the firewall rulles to interface $1

    I went a little further and added iptables targets for ppp0, ppp1 and ppp2
(3 modems) with traffic through these sent to the appropriate rule.  This allows
me to easily wipe the existing rules for the particular interface used and
recreate from scratch.

Scott







More information about the General mailing list