Problem in short: I need to figure out how to load balance between two
default gateways on a RH9 box configured for routing. I then need to
figure out how to make sure incoming connections from gateway "A" gets
replies routed back to gateway A, and the same for gateway B.
Background: I have a RH9 box set to do simple IP4 forwarding between
two of my subnets and my firewalls (on another subnet). No iptables,
just IP4 forwarding enabled (I have zebra installed but not configured
at ALL or even running) and everything configured via the route
command from console. The two internal networks are 172.26.1/24 &
172.26.3/24. My two firewalls (which are NAT'ing) are on 172.26.2.0 -
172.26.2.2 & 172.26.2.3 specifically. The subject RH9 box in question
has IP's 172.26.1.1, 2.1, & 3.1. Both firewalls 172.26.2.2 & .3 are
added in my routing tables as the default gateway.
Further, I have various TCP & UDP ports forwarded from the firewalls
to multiple internal hosts spread across both subnets, however, the
reason I'm here today, is that only the first default gateway is read
from the routing table, causing ALL traffic for 0/0 to be routed
through gateway A, even if the traffic originated from gateway B.
What I'm looking for in an answer: I need my router to know what
gateway traffic originated through, and then accordingly forward
return traffic trough the correct gateway. If I can do this with IP4
forwarding and the "route" command, tell me how to do this. If I need
Zebra, I will require the exact commands for doing this. If I need
something else, same as Zebra.
For an added tip, it would be nice to load balance/round robin
OUTGOING traffic across both gateways as well.
If this question is hard to understand, please ask for a clarification
and I will do my best. |