Route eth0 to internet traffic and eth1 to local traffic
- by Romain Caire
How can I route all my internet traffic on eth0 (everything except 192.168.1.0/24) and route my local traffic through eth1 (192.168.1.0)?
Here is my attempt :
# Flush ALL THE THINGS.
ip route flush table main
# Restore the main table. I flushed it because OpenVPN does weird things to it.
ip route add 127.0.0.0/8 via 127.0.0.1 dev lo
ip route add 0.0.0.0/0 via 164.67.195.1
ip route add 192.168.1.0/24 via 192.168.1.1
ip route flush cache