On Sat, 2002-03-09 at 18:58, Jeff Waugh wrote:
> Hey all,
> 
> So, I have a machine with a number of aliases on eth0. Thus, the machine
> answers on multiple IP addresses, provided by eth0, eth0:0, etc.
> 
> Only trouble is, I want connections *from* the machine to go out via eth0
> (and thus its IP address) only. That's easy enough for things like postfix,
> where I can just set the smtp_bind_address.
> 
> It's far harder with web browsers, ssh clients, etc.
> 
> How do I get the machine to default to using eth0 and its IP address for
> outgoing connections?

With 2.4 (hope you're talking 2.4 here, or this is pointless :)), you
can set up multiple routing tables using iproute, and all sorts of other
funky stuff.

For example:

ip route add default via 200.200.200.200 dev eth1 table isdn

will set up a second routing table with a default route to a different
IP on eth1.

You can then do:

ip rule add from 201.201.201.0/24 table isdn

Which will send traffic originating from the above IP through eth1.

You can also use fwmark to have different kinds of traffic look up
alternate routing cables.

This the kind of thing you're after?

Brad.


-- 
SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug

Reply via email to