[CentOS] Outbound connections not using primary eth0 IP

Mon Aug 4 18:43:56 UTC 2008
Bill Campbell <centos at celestial.com>

On Mon, Aug 04, 2008, nate wrote:
>Neil Aggarwal wrote:
>
>> Any ideas why this is happening?
>
>Try looking at this?
>http://www.clintoneast.com/articles/multihomed.php
>
>In general I try to make sure my systems only have 1 default
>gateway, makes life a lot easier. Leave the multi homing to
>the routers(or my preference layer 3 switches).

It's worth noting that some software allows one to specify the outgoing IP
(e.g. using inet_interfaces in postfix or sourceaddress with innd).

This can be very useful if one has a role IP, say news.example.com, and
wants to be sure that outgoing connections originate with a specific IP
address so your news partners don't have to mess with their incoming
configuration files.  

I did see some ``interesting'' issues on an private LAN where a server had
multiple IP addresses on the private interface.  NFS mounts were failing to
the primary IP, and after doing some tcp sniffing, I found that the return
UDP packets were originating from one of the aliased IP addresses (this was
SuSE 9.0 Pro).  I fixed the problem by forcing NFS to use tcp conneections
rather than beat my head against the wall trying to figure out why this was
happening.

Bill
-- 
INTERNET:   bill at celestial.com  Bill Campbell; Celestial Software LLC
URL: http://www.celestial.com/  PO Box 820; 6641 E. Mercer Way
Voice:          (206) 236-1676  Mercer Island, WA 98040-0820
Fax:            (206) 232-9186

Liberty don't work as good in practice as it does in speeches.
    Will Rogers