All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Bryan Goodgion" <bgoodgion@cognitivesolutions.com>
To: lartc@vger.kernel.org
Subject: [LARTC] Simple Mulitple Link Scenario
Date: Thu, 27 Mar 2003 01:22:37 +0000	[thread overview]
Message-ID: <marc-lartc-104872847432750@msgid-missing> (raw)

[-- Attachment #1: Type: text/plain, Size: 3393 bytes --]

 
I am trying to set up a network that can accept tcp connections over two
different isp connection.  The ultimate goal is to facilitate the
migration from one ISP to another ISP.  I decided to delve into the
world of Linux Advanced Routing, so I poured over all of the
documentation on the internet.  I have it set up in what I believe to be
the case where it should work, but I can't understand why it doesn't.
Here is the drawing:
 
------------------------                --------------------------
| WAN Router 1 |               |   WAN Router 2 |
------------------------                --------------------------
                    \                  /
                      \              /
                        \          /
                   ---------------------
                  | WAN Switch |
                  ----------------------
                     /               \
                    /                  \
-----------------------              ------------------------
|  Firewall 1      |             |   Firewall 2       |
-----------------------              ------------------------
               \                        /
                 \                     /
                   \                  /
                  -----------------------
                  |  DMZ Switch  |
                  -----------------------
                            |
                            |
                  *---*---*---*---*---*---*
                  |    Linux Router   |
                  *---*---*---*---*---*---*
                            |
                            |
                  ------------------------
                  | Linux Server    |
                  ------------------------
 
 
Here is what I have going.  The router has a single interface that I
have given an IP address on the network space assigned by each ISP.  It
is performing NAT using two DNAT iptables rules for the Linux Server
that is sitting behind it.  The linux router takes $WAN1_IP ->
10.0.2.205 and takes $WAN2_IP -> 10.0.2.206.  I then set up a second
routing table so that I can have two default gateways depending on which
IP I want to take out.  Here are the exact commands I have issued:
 
iptables -t nat -A PREROUTING -j DNAT -dst $WAN1_IP to 10.0.2.205
iptables -t nat -A PREROUTING -j DNAT -dst $WAN2_IP to 10.0.2.205
ip route show table main | grep -Ev ^default \
>     | while read ROUTE ; do
>       ip route add table 4 $ROUTE
> done
ip route add default via $FIREWALL2_IP
ip route add default via $FIREWALL1_IP table 4
ip rule add from $WAN1_SUBNET table 4
 
After completing this setup,  I am able to traceroute -s $WAN1_IP and
see it go out the WAN1 side and traceroute -s $WAN2_IP and see it go out
WAN2.  I am also able to use the ip route get command and everything
works as I expect it to work.  My first failure occurred when I tried to
create a tcp connection from the internet.  It works coming in on
$WAN2_IP and fails using $WAN1_IP.  The problem is that when I watch a
dump of the outgoing packets while trying to bring up a tcp connection
to $WAN1_IP, I see the packets coming in and then I see the reply going
out to the MAC address of $FIREWALL2 instead of the MAC address of
$FIREWALL1 as it should and thus the connection fails.  Any ideas?
Thanks in advance.
 
Bryan 
 
 
 
 
 
Bryan Goodgion
Cognitive Solutions, Inc.
813.286.4000 ext 103
 

[-- Attachment #2: Type: text/html, Size: 23165 bytes --]

             reply	other threads:[~2003-03-27  1:22 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-03-27  1:22 Bryan Goodgion [this message]
2003-03-27  1:55 ` [LARTC] Simple Mulitple Link Scenario Martin A. Brown
2003-03-27 21:14 ` Bryan Goodgion
2003-03-27 21:18 ` 'Martin A. Brown'

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=marc-lartc-104872847432750@msgid-missing \
    --to=bgoodgion@cognitivesolutions.com \
    --cc=lartc@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.