You're going oldskool! Install shorewall and let it take care of all that stuff.
I've done it your way as well some time ago, until i saw the light .. Shorewall Firewall!
It's pretty straight forward. Define your "providers" (outgoing gateways) and set a priority to them, reload shorewall, done.