Ron Allison wrote:
I am running qmailtoaster on a hosted Centos server that has 5 IP addressed bound to the same NIC. I would like to run the qmailtoaster with the 2nd IP address configured in the alias eth0:0, call it 192.168.1.2 (not the real addresss). Call the first IP address configured in eth0 192.168.1.1. I have DNS entries for the main IP address as the web server, so www.mydomain.com, and an MX entry for the second IP address for the mailserver at maildomain.com. That all seems to be working and I can send and receive emails.

The part I don't understand is that when an email is sent through this server the connection shows it coming from the first IP Address, 192.168.1.1, and the name is reconciled to www.mydomain.com. So when I look at the header information I do not see my mail server name and my SPF record configured in the mail server DNS is not recognized. What can I do to have it send from the second IP Address with the correct name resolution?

Thanks.

Ron Allison

---------------------------------------------------------------------
    QmailToaster hosted by: VR Hosted <http://www.vr.org>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


I am not sure whether or not Jake's answer would work, but he is on the right track. You will need to use IPTables, iproute2, or some other tool. I have research similiar situtations running an ip based apache virtual host server. The problem being that I wanted to monitor traffic individually over each IP.

What I have found to be the case is in linux, no matter how many nics you have all traffic is sent out over the default route. In just about every install of linux, this is eth0. So all trafffic is sent out over eth0 since it is the default route, if there an explicit route for the given IP. (You can verify this via the route command).

So now what to do ... I have tested any of these, so you might want to only do this if you have a local connection as you could cause your network to fail :). But you could use iptables, there are several ways you might be able to go about this, but I believe the best / easiest would be to use connection marking, and mark all incoming traffic based on the nic it come in on, and then create the rules to send it back out the same nic (FYI, I am using nic, it should be the same for virtual ones also).

Another possible answer might be to mess with your routing table, not sure how to go about this, but it might be a possibility.

The last thing I could think of, and this is a completely ugly hack, but it actually the easiest, and that is just to set the default route to use eth0:0 instead of eth0, I am not sure how this would effect other services, but it shouldn't matter, it is all going out the same nic anyways:)

---------------------------------------------------------------------
    QmailToaster hosted by: VR Hosted <http://www.vr.org>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to