I'm using a Raspberry Pi with Raspbian GNU/Linux 9.6 (stretch) as a firewall.

I would like to:

  1. route all traffic to through eth0 (, where is the router that connects to the internet
  2. route all traffic to the rest of the home network through eth1 (
  3. route all traffic coming from the various access points (dd-wrt routers,, and respectively) to
  4. and from there to and out to the internet via

How should I set this up?

These two questions seem to give conflicting answers, at least to networking-rookie-me:


  • Does your RaspPi do NAT (network access translation)? Do you have any actual firewall rules (iptables or packages using iptables)? If no to both questions, it's a pure routing problem, and you can solve it with policy routing (google) for the "route traffic from ..." cases. A bunch of routing rules should suffice. – dirkt Jan 23 at 6:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.