one of my servers (Debian 5.0.6) has two public ip-address on the same interface. This used to work well for months but suddenly it is using "the wrong" ip addresses for outgoing connections. This is a problem because the reverse lookup will not match and emails therefore get spam points.
eth0 Link encap:Ethernet Hardware Adresse 00:1b:21:14:8e:9c inet Adresse:22.214.171.124 Bcast:126.96.36.199 Maske:255.255.255.255 inet6-Adresse: fe80::21b:21ff:fe14:8e9c/64 Gültigkeitsbereich:Verbindung eth0:0 Link encap:Ethernet Hardware Adresse 00:1b:21:14:8e:9c inet Adresse:188.8.131.52 Bcast:184.108.40.206 Maske:255.255.255.255 Kernel-IP-Routentabelle Destination Router Genmask Flags Metric Ref Use Iface 220.127.116.11 0.0.0.0 255.255.255.255 UH 0 0 0 eth0 0.0.0.0 18.104.22.168 0.0.0.0 UG 0 0 0 eth0
Currently it is using 22.214.171.124 for outbound connections. How do I get it to use 126.96.36.199?
Edit: The netmask of 255.255.255.255 is consistent with both documentation and DHCP response of the hosting company. Calling /etc/init.d/networking restart multiple times will eventually end up with the correct ip-address for outbount connections. But that is obviously not a stable solution. /Edit
Edit 2: To make sure that the host route is not related to my issue, I setup a local test network:
eth0 inet Adresse:192.168.0.2 Bcast:192.168.0.255 Maske:255.255.255.0 eth0:0 inet Adresse:192.168.0.3 Bcast:192.168.0.255 Maske:255.255.255.0 192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 0.0.0.0 192.168.0.1 0.0.0.0 UG 0 0 0 eth0
If anyone has an idea how to make sure that source ip-address 192.168.0.2 is used on outbound tcp connections, I'd be thankful. /Edit 2