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

Re: forcing client source ip on multi-ip system



On Wed, 24 Jul 2002 07:43:25 +0300 Baruch Even <baruch@debian.org>
wrote:

> I have a system with two IPs on the same subnet (on interfaces eth0
> and eth0:1), I want a single server to use one of the IPs for the
> source IP of it's request. This I know how to achieve. But I want that
> any other program will use the second IP address. And I'm unable to
> achieve that, it looks like each run of any client program will choose
> randomly between the interfaces.

<disclaimer>
Just a few items from a generally clueless would-be sysadmin, used to
RTFM things to death, feel free not to bother reading the rest of this
email.
</disclaimer>

Two IPs on the *same* subnet is a bit weird, no? How are the routing
tables supposed to resolve the route to be used?

I know that traceroute has an option to specify the source address, but
that's rare in a client program.

Perhaps the answer in a little traffic redirection through iptables,
using the OUTPUT chain of the 'filter' table (for locally generated
packets) to redirect packets trying to leave through the undesired IP to
the desired IP.

> An older machine with Kernel 2.2 works fine with such a setup, the new
> machine is a Debian Woody with kernel 2.4.18 (patched with GRSecurity
> and several other patches).

Did you verify exhaustively that the network setup is *exactly* the same
on the two machines?

-- 
Carlos Sousa
http://vbc.dyndns.org/


-- 
To UNSUBSCRIBE, email to debian-user-request@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org



Reply to: