I have just setup a machine which has two NICs, one for private network and the other one for public network which has a real IP assigned to it.
DEVICE=eth0 HWADDR=XXX TYPE=Ethernet UUID=XXX ONBOOT=yes NM_CONTROLLED=no BOOTPROTO=none IPADDR=172.26.111.131 NETMASK=255.255.255.128 GATEWAY=172.26.111.129
Configuration of eth1 for public network as follows;
DEVICE=eth1 HWADDR=XXX TYPE=Ethernet UUID=XXX ONBOOT=yes NM_CONTROLLED=no BOOTPROTO=none IPADDR=PUBLIC_IP NETMASK=255.255.255.248 GATEWAY=PUBLIC_GATEWAY Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface default PUBLIC_GATEWAY 0.0.0.0 UG 0 0 0 eth1 PUBLIC_NID * 255.255.255.248 U 0 0 0 eth1 link-local * 255.255.0.0 U 1002 0 0 eth0 link-local * 255.255.0.0 U 1004 0 0 eth1 172.26.111.128 * 255.255.255.128 U 0 0 0 eth0
I am sure this is quite easy to achieve. I have searched about this, but somehow could not get this working. The machine still tries to route private IPs via public gateway.
I would appreciate any ideas on this. Where I am wrong at?
I am just trying to be able to access 172.26.111.128/25 via eth0.