0

I have a gateway box with two internet connections, eth0 and eth1, and a LAN connection eth2.

Currently eth1 is unused and eth2 LAN traffic is forwarded/masqueraded and sent to the internet via eth0.

What is the most straightforward way to send the eth2 LAN traffic to the internet via eth1? I want local traffic to still go via eth0.

(I am aware that I can tag packets in iptables, then route on the tag, but I was wondering whether I had missed a simpler solution.)

1 Answer 1

1

set the gateway for the local network to the interface eth1 and for localhost to eth0 in the routing table in your box.

1
  • Could you give an example? I thought a box could only have one default gateway, unless you use multiple routing tables and packet marking.
    – fadedbee
    Commented Sep 24, 2018 at 10:16

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .