[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Routing which depends on source address?



On Thu, Nov 08, 2001 at 04:42:37PM +0100, Markus Garscha wrote:
> the gw is running debian. the goal is to use two different dialups depending
> on the source address, e.g use default route over ppp0 device when data
> comes from 192.168.1.11 and use default route over ppp0 device when data
> comes from 192.168.1.12. 
> 
> i heard that iptables can do this, examples?

Hi Markus...

iproute2 is what you are looking for.  Your issue is strictly routing so
iptables/ipchains isn't the best way to go.  We needed something very similar
a few weeks back; although not over a dial-up line.

Take a look at the Linux 2.4 Advanced Routing HOWTO.  You can find a copy
at www.linuxdoc.org/HOWTO/Adv-Routing-HOWTO.html.  There is a section
covering iproute2 with examples.

Debian potato already uses iproute2 although they call it iproute, so you
don't need to install anything special.  All you need to do is recompile
your kernel to add IP Policy Routing, set up the tables and away you go.
The HOWTO explains all this.

You can use iptables/ipchains if you need to do other things.  But iproute2
is the way to go for you.

           bob
-- 
 bob billson        email: reb@bhive.dhs.org          ham: kc2wz       
                           reb@elbnet.com             Linux geek   /)  
 "Níl aon tinteán mar do thinteán féin."              beekeeper -8|||} 
        --Dorothy                                                  \)  



Reply to: