I'm fiddling around on a vmware os and setup 4 nics in on system. 2 of them being connected to the same ISP and 1 going to one network segment and the other going to another network segment.
Basically want to have 2 WANs going to different segments. That I have working using firewall rules (iptables) but since the default gateway is set to one of the external eithernet adapters all internal traffic goes out the same adapter.
Basic scenario:
eth0 > 24.x.x.x
eth1 > 24.x.x.x
eth2 > 192.168.1.x (internal segment #1 - physical segment)
eth3 > 172.16.x.x (internal segment #2 - vmware host only)
default gateway is eth1
I've taken a look at mangle using mark in iptable but not exactly sure how to configure iproute2 to push traffic marked out the eth# adapter that I want. ...if at all possible.
So all external traffic goes where I want it since I know internal destination IPs but for internal out I would like try and do this:
eth2 out eth0
eth3 out eth1
Thanks!