I have two network adapters that use the same ip range, but are different networks.
I tried this but it didn't work:
iptables -t nat -A OUTPUT -p all -d 1.2.3.0/8 -j DNAT --to-destination 192.168.0.0/8 -o eth0
iptables -t nat -A OUTPUT -p all -d 3.2.1.0/8 -j DNAT --to-destination 192.168.0.0/8 -o eth1
Example:
eth0 has the ip of 192.168.0.1 on a network with the range 192.168.0.*
eth1 has the ip of 192.168.0.8 on a separate network with the range 192.168.0.*
1.2.3.* = 192.168.0.* through eth1
3.2.1.* = 192.168.0.* through eth0
Is this something I can do with iptables?