Article is based on Ubuntu 16.04 built on ESXi 6.5

Linux Commands Used:

Create a Multi-NIC Virtual Machine

Configure all interfaces with Separate Networks

Set default route with a metric of 0 for the ‘WAN’ side NIC

Example Command:
sudo route add default gw metric 0

Set default route with metric of 1 point to the WAN NIC

Example Command:
sudo route add default gw metric 1

Set IPtable to NAT traffic to the WAN NIC IP (reference link

Example Command:
iptables -t nat -A POSTROUTING -o ens160 -j MASQUERADE

Set IPtables to allow forwarding

Example Command:

Set network to enable IP forwarding

Temporary command:
systctl -w net.ipv4.ip_forward=1

Permanent method:
– Go to /etc/sysctl.conf
– Uncomment the line for net.ipv4.ip_forward
– Change the value from 0 to 1
– then exit file and run command sysctl -p /etc/sysctl.conf
should show the change made

Test and make sure that a device behind one of the other Links is successfully going through the linux router, if need use tcpdump -i ens192 to look at all traffic flowing through the interface.