im gonna briefly describe what im attempting, and then move on to what has failed.
my machine has 5 network interface cards in it (four 3com 509s, one intel eepro100), each 3com card has a cable modem connected to it (actually only two right now, but if i can get two working then four would be easy). each interface correctly recieves a DHCP address from my ISP and they all have the same default gateway (my isps gateway) but out that interface. id like to configure certain internal addresses (10.0.0.x on eth0 eepro100 card) to be masqueraded out specific external interfaces. for example, 10.0.0.1 thru 10.0.0.9 should be masqed out eth1, while 10.0.0.10-19 out eth2).
after running dhcpcd ethx for all my interfaces, enable ip forwarding (echo 1 > /proc/sys/net/ipv4/ip_forward), i attempt a generic masq rule (iptables -t nat -A POSTROUTING -s 10.0.0.1 -o eth1 -j MASQUERADE) which is accepted. however, it will only work if i masq out the last interface i enabled (dhcpcd eth4). now i believe this is because the last default gateway entry in my routing tables is taking over (route -e). for clarification this is whats happening, if i attempt to masq out eth1 thru eth3, i wont be successful however eth4 will work. if i run dhcpcd eth1 last, then i can masq out eth1 ONLY.
is my problem related to linux's routing table like i suspect? can i make the routing table behave without the last default route taking priority over the others?
is there another solution that could work, such as equal cost multipath routing?
any information or links or ANYTHING would be greatly appreciated.
my machine has 5 network interface cards in it (four 3com 509s, one intel eepro100), each 3com card has a cable modem connected to it (actually only two right now, but if i can get two working then four would be easy). each interface correctly recieves a DHCP address from my ISP and they all have the same default gateway (my isps gateway) but out that interface. id like to configure certain internal addresses (10.0.0.x on eth0 eepro100 card) to be masqueraded out specific external interfaces. for example, 10.0.0.1 thru 10.0.0.9 should be masqed out eth1, while 10.0.0.10-19 out eth2).
after running dhcpcd ethx for all my interfaces, enable ip forwarding (echo 1 > /proc/sys/net/ipv4/ip_forward), i attempt a generic masq rule (iptables -t nat -A POSTROUTING -s 10.0.0.1 -o eth1 -j MASQUERADE) which is accepted. however, it will only work if i masq out the last interface i enabled (dhcpcd eth4). now i believe this is because the last default gateway entry in my routing tables is taking over (route -e). for clarification this is whats happening, if i attempt to masq out eth1 thru eth3, i wont be successful however eth4 will work. if i run dhcpcd eth1 last, then i can masq out eth1 ONLY.
is my problem related to linux's routing table like i suspect? can i make the routing table behave without the last default route taking priority over the others?
is there another solution that could work, such as equal cost multipath routing?
any information or links or ANYTHING would be greatly appreciated.