I'm encountering a strange little foyble of Ubuntu/Debian/*nix.
Goal: To use an IP address that is used to access one of two servers internally via our load balancer and add it to the loopback adapter so that exim runs listening on that address instead of 127.0.0.1 and sending out on the server's address.
Current Setup: Traffic to 10.0.9.33 hits our loadbalance and get's directed to 10.0.11.33 or 10.0.12.33.
Exim on those servers is set up to listen on 127.0.0.1 but when it makes an SMTP connection to other SMTP servers it goes out on the 10.0.x.33 address is NAT'ed through out FW/Router.
As such I've been trying to add 10.0.9.33 to the loopback adapter. What I'm finding is the following.
If I add the ip address to the loopback adapter using ifconfig command all works fine but the change is not persistent between boots of course.
If I add the configuration to /etc/network/interfaces whilst the config is read ok by ifup and implemented all traffic to all interfaces is dropped. My interfaces file contains the following for the loopback adapter:
ifconfig lo:0 10.0.9.33/8
Then I use to bring up the interfaces from the /etc/network/interfaces file.
iface lo inet loopback
iface lo:0 inet static
I'd be grateful for any feedback on why one method does work and the other doesn't and also some proposed solution for keeping this ip address persisten.