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

Re: forcing client source ip on multi-ip system



I'm not subscribed to the list, thus the reply to myself.

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

It's a gateway machine with one IP having rdns entry and the other not.
The rdns entry is for the internal mail server to send mail through so
no site will block it. The second non-rdns ip is for our regular traffic
so the company will not be listed in google some million times for
showing in web logs.

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

Sendmail has this option which is what we need.

| David Maze wrote:
| What I've found is that the source address isn't selected until the
| packet leaves the machine; in this case, the source address is the
| source address of the interface the outgoing packet is routed over.
| So in emergencies, I can change my local machine's default gateway
| from the tunnel gateway to 192.168.1.1, and packets go through the NAT
| gateway instead (with a source address of 192.168.1.2, the address of
| eth0:1 on the local machine).

Thanks! That was the answer.

Apparently I gave in /etc/network/interfaces both the eth0 and eth0:1 a
gateway, this caused the packets to be routed possibly randomly over the
two interfaces in a simple load balancing way.

Removing the gateway from the eth0:1 interface forced everything to go
over the eth0 routing entry and thus get the eth0 IP. sendmail was
directed to use the eth0:1 IP and now everything is working.

Baruch



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



Reply to: