I have ether1, ether2, and ether3. they all sit on the same network, lets say 10.0.0.1, 10.0.0.2, and 10.0.0.3, respectively.
The default gateway is 10.0.0.254, which it defaults to sending the traffic out ether1.
I would like for traffic destined for 192.168.2.0/24 to go out of ether2, and traffic destined for 192.168.3.0/24 to go out of ether3.
Is this possible?
I read about marking the routes, but you can only manipulate the next hop, not the interface the traffic goes out on.
Any ideas?
Thanks
Why not just do:
Eth0 - 10.0.0.1
Eth1 192.168.2.x
eth2 - 192.168.3.0
???
setting the preferred source in the routing table will do it.
Will you NAT the 192.168.xxx.0/24 nets?
This is what I do on my firewall to redirect all the traffic out from 192.168.64.4 through 2.3.226.2
The rest of the traffic from 192.168.64.0/24 goes out 2.3.226.1 on the WAN interface:
0 ;;; NAT traffic out from LAN’s IP of mx1.wrs.no to 2.3.226.2 for correct reverse DNS.
src-address=192.168.64.4/32 out-interface=WAN action=nat to-src-address=2.3.226.2
1 ;;; NAT outgoing traffic from 192.168.64.0/24 - LAN
src-address=192.168.64.0/24 out-interface=WAN action=masquerade