Hans du Plooy <[EMAIL PROTECTED]> wrote:
[...]
>Will this work with private two network cards, two private IPs, and two
>gateways in the same IP range? eth0 192.168.1.18 with gw 192.168.1.6
>and eth1 192.168.1.17 with gw 192.168.1.1. The two gateways are NAT-ing
>firewalls, will this make a difference?
I don't know if the NAT business will make a difference, but
I've set up multiple-network multiple-gateway configurations more or
less like this (substituting your own network values):
Configure with policy routes such that responses to inbound
traffic for the respective interfaces is routed back out over the same
interface. For example:
ip rule add from 10.176.13/24 table 50
ip rule add from 10.176.14/24 table 60
For your purposes, "ip rule add iif ethX" may work better (since
the network match won't necessarily segregate anything, as both of your
interfaces are on the same network).
ip route add table 50 10.176.13/24 dev ethX src 10.176.13.x
ip route add table 50 default dev ethX src 10.176.13.x via 10.176.13.1
Where 10.176.13.1 is the gateway for that particular network (or
interface, in your case), and 10.176.13.x is the host's IP address on
that network. The other network, 10.176.14/24 on table 60 in this
example, is configured similarly, but with the appropriate .14 network
values.
A global default route can be left in the main routing table for
traffic not originating inbound from 10.176.13 or 10.176.14 (or via the
appropriate iif, depending on how you set it up).
I think you'd need to test a bit to check for the proper
configuration, which may be hard via only remote access.
-J
---
-Jay Vosburgh, IBM Linux Technology Center, [EMAIL PROTECTED]
_______________________________________________
LARTC mailing list
[email protected]
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc