All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Dharmendra T." <dharmu@nsecure.net>
To: Sudhakar Chandra <thaths@openscroll.org>
Cc: netfilter@lists.netfilter.org
Subject: Re: Routing between two firewalls
Date: 23 Jun 2004 15:34:05 +0530	[thread overview]
Message-ID: <1087985129.7945.64.camel@dharmu.nsecure.net> (raw)
In-Reply-To: <40D94B3D.8050308@openscroll.org>

On Wed, 2004-06-23 at 14:49, Sudhakar Chandra wrote:
> Hi,
> 
> I am having some trouble routing some packets between two dual-homed 
> machines both running iptables.
> 
> I have a setup that I assume should be pretty common.  I have a LAN 
> (192.168.100.0/24) which has two gateways / firewalls on it.  Both the 
> gateways are dual-homed.
> 
> My setup is something like so:
> 
> LAN ---> (192.168.100.1) Gateway 1 (isp1.global.ip) --->
> LAN ---> (192.168.100.2) Gateway 2 (isp2.global.ip) --->
> 
> Gateway 1 routes through ISP1 and Gateway 2 through ISP2.  Some machines 
> in my LAN have .1 set as the gateway and some have .2 as the gateway.
> 
> I have my mail server connected to one of the global IPs that ISP2 has 
> given me.  Or in other words, mail server is on the same subnet as the 
> external interface of Gateway 2.
> 
> As things are today, packets originating on machines having Gateway 1 as 
> their default gateway traverse out through ISP1, the global internet, 
> back through ISP2 into my global ISP2 subnet.  This is a waste of 
> bandwidth as well as slow.
> 
> I want to set up a rule on Gateway 1 such that all packets destined to 
> my mail server (actually, my entire ISP2 subnet) should be sent to 
> Gateway 2 for routing.
> 
> I tried adding a static route on Gateway 1 to route all packets destined 
> to the mail server to Gateway 2 like so:
> 
> route add -host mail.server.ip gw 192.168.100.2
> 
> After I set this up, I am able to traceroute to mail server (packets 
> flow through Gateway 2).  But when I try connecting to port 25, nothing 
> happens.
> 
> 1. What is the fastest and easiest way to do what I want?
> 2. Should I be doing DNAT?
> 3. Should I be doing something using iptables AND routing?
> 
> Your help would be much appreciated.
> 
> Thaths
> -- 
>    "Trying is the first step towards failure." -- Homer J. Simpson
> Slacker Without Borders                        http://openscroll.org/
> Key fingerprint = 8A 84 2E 67 10 9A 64 03  24 38 B6 AB 1B 6E 8C E4
> 

Does both the LANs are in the same physical network? Could you send us
the network diagram? 
-- 
Dharmendra T.
Linux Security and Admin,
www.nsecure.net

This message is intended for the addressee only. It may contain
privileged or confidential information. If you have received
 this message in error, please notify the sender and destroy the message
immediately. Unauthorised use or reproduction of 
this message is strictly prohibited.



  parent reply	other threads:[~2004-06-23 10:04 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-06-23  9:19 Routing between two firewalls Sudhakar Chandra
2004-06-23  9:34 ` Antony Stone
2004-06-23 13:18   ` Sudhakar Chandra
2004-06-23 10:04 ` Dharmendra T. [this message]
2004-06-23 10:00   ` Antony Stone
2004-06-23 12:00 ` John A. Sullivan III

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=1087985129.7945.64.camel@dharmu.nsecure.net \
    --to=dharmu@nsecure.net \
    --cc=netfilter@lists.netfilter.org \
    --cc=thaths@openscroll.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.