After helping a frustrated yet patient Elvar I thought I better post about the situation we came across incase anybody else finds themselves in the same situation.
Elvar started with all the correct elements to setup a functioning multrouting gateway. Two connections from two different providers, eth1, eth2. Running on an Ubuntu box with eth0 as internal. Both internet connections working on their own.
But alas. Whenever both eth1 and eth2 were active on the host, outgoing packets just would not go out. I don’t know if incoming packets were being replied to as we were unable to check that.
If just eth1 or eth2 was active than everything traversed ok. But we wanted it to work with both connections.
After a LONG time of diagnosing we noticed there were two default routes in iproute2 (ip’s fudged, but you get the idea):
firewall# ip route show ... default via 1.1.2.1 dev eth2 metric 100 default via 1.1.3.1 dev eth1 metric 100
My firewall often has two default routes listed on the main table (ppp0, and ppp1) until the cleanup script fixes it. Without any negative side effect. I may just be lucky though.
Upon removing the eth2 line from table main, everything started working correctly. Incoming, outgoing, forwarding, balancing.
I also noticed the output of ifconfig eth2 looked a bit screwed too, but there was not much we could do about that as it was assigned by dhcp.
eth2 Link encap:Ethernet HWaddr 00:11:22:33:44:55 inet addr:1.1.2.1 Bcast:255.255.255.255 Mask:255.255.255.0
See it? No not the MAC address. The broadcast address. A quick ipcalc 1.1.2.1/24 gives me a broadcast of 1.1.2.255. But once we removed the eth2 default route line, it all started working again and didn’t get to dig into it to see if the broadcast actually affected it.
So that’s all. Just remember there are a lot more things to go wrong in a multigateway setup, including things outside of iptables.