No, same NICs.
However, it dawned on me a few minutes after writing this that I could accomplish this using source-nat and IP tables.
Here is the rule I'm using:
Quote:
|
iptables -t nat -D POSTROUTING -p tcp --dport 25 -j SNAT --to-source 216.27.19.204
|
Here is a cron script I wrote that runs every minute, it's pretty self explanatory. I don't know why I didn't think of doing it this way before. Since we use heartbeat, and /opt is only mounted on the "active" server, I check to see if /opt is mounted and then check the rule status.
Code:
volume="/opt"
rule="to:216.27.19.204"
if mount | grep "on ${volume} type" > /dev/null
then
if iptables -L -v -t nat | grep -v grep | grep "${rule}" > /dev/null
then
echo "IPTables rule already exists!"
else
echo "IPTables rule doesn't exist, we need to add it!"
iptables -t nat -A POSTROUTING -p tcp --dport 25 -j SNAT --to-source 216.27.19.204
fi
else
echo "Zimbra isn't running here"
if iptables -L -v -t nat | grep -v grep | grep "${rule}" > /dev/null
then
echo "IPTables rule exists, we need to remove it!"
iptables -t nat -D POSTROUTING -p tcp --dport 25 -j SNAT --to-source 216.27.19.204
else
echo "IPTables rule doesn't exist, we don't do anything!"
fi
fi Does anyone know of a reason not to do it this way?