Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Ok, so here is my scenario. eth0 and eth3 point to 2 different ISPs, eth1 is an internal network say on and eth2 is on another network say

I want each network to be on their own internet connection.

I'm using IPtables to route eth1 to eth0 and eth2 to eth3 so each network has a physical connection to their own internet. The problem is routing. I can't assign 2 default gateways.. one to eth0 and one to eth3. Right now I only have a default gateway on eth0. My network has internet access, eth1 talks to eth0 which has a default gateway to the internet. My network does not have internet, eth2 is either talking to eth3 which has no default gateway OR eth2 is trying to talk to eth0 which is forbidden by my iptables. How can I go about adding 2 default gateways or go about solving this problem?

share|improve this question
I am having a hard time understanding your question. you have 4 ethernet ports on a box. and your wish is to have each connect through a different gw ?? – kmassada Sep 26 '12 at 18:47
You might find this useful:… – Elder Geek Apr 20 '15 at 15:40

Sounds like he wants to route lan1 via wan1 and lan2 via wan2.

Get a cisco router <- much easier to implement.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.