From: "John A. Sullivan III" <john.sullivan@nexusmgmt.com>
To: Bryan Martin <mailinglist@myplaceinspace.com>
Cc: netfilter@lists.netfilter.org
Subject: Re: Internal NAT Translation:
Date: Wed, 30 Jun 2004 23:18:42 -0400 [thread overview]
Message-ID: <1088651922.2078.11.camel@localhost> (raw)
In-Reply-To: <003701c45f0d$15467890$0c02a8c0@bryanhome>
On Wed, 2004-06-30 at 21:45, Bryan Martin wrote:
> Setup looks like this
>
> Internet
> ^
> Redhat 9 iptables nat/masq (200.200.200.200 public address = eth1;
> 192.168.2.1 private address = eth0)
> ^
> windows web server (192.168.2.254) | windows clients. (all 192.168.2.X)
>
>
> Now the rh box is masquerading for the private boxes. Only thing not
> standard is that any inbound http connections to the public address
> 200.200.200.200 is being dnatted to 192.168.2.254 which is the address of
> the windows server. This is working as expected. The problem arises when a
> internal client tries to connect to the public website.
>
> For instance client request www.mycompany.com and DNS says go here
> 200.200.200.200 which would be correct if I was sitting on the outside
> looking in. I need iptables to basically say if any http request comes from
> the internal network addressed to my public address dnat the public
> 200.200.200.200 to the private address. I have tried the following without
> success. Only other thing I know is to setup a internal DNS just so the
> internal clients get the internal address. That would however be an extreme
> waste of resources.
>
> -A PREROUTING -i eth1 -d 200.200.200.200 -p tcp --dport 80 -j
> DNAT --to-destination 192.168.2.254
>
> Can someone help?
>
> Bryan
I see a couple of potential problems here. The simple solution is to
add SNAT rules, one that says all traffic coming from 192.168.2.254 and
going out eth1 is translated to 200.200.200.200 and the other which says
that any traffic from your internal network destined for 192.168.2.254
is translated to 200.200.200.200. I would imagine that the PREROUTING
rule you created is working but when the web server gets the packets, it
sees the original source address, identifies the packets as belonging to
the local network and sends them directly back with it own internal
source address. The reply packets will not be recognized since the
local workstations sent to packets to 200.200.200.200 and not
192.168.2.254.
However, I have some concerns about this architecture. Are you allowing
public traffic into your web server and placing that web server directly
on the internal network? If so and if anyone every compromises it, they
may have free reign on your internal network. If that server is exposed
to the Internet, I would very much recommend placing it on DMZ behind a
third NIC in your firewall. I believe that will also take care of the
NAT problems.
Regarding split DNS, that is the approach I usually take. Are you using
an internal DNS? If so, I assume it is not being used by the world to
locate the web server as that would create another major exposure. You
could thus simply set it to distribute the private address of the web
server.
Hope this helps - John
--
John A. Sullivan III
Chief Technology Officer
Nexus Management
+1 207-985-7880
john.sullivan@nexusmgmt.com
---
If you are interested in helping to develop a GPL enterprise class
VPN/Firewall/Security device management console, please visit
http://iscs.sourceforge.net
next prev parent reply other threads:[~2004-07-01 3:18 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-07-01 1:45 Internal NAT Translation: Bryan Martin
2004-07-01 3:18 ` John A. Sullivan III [this message]
-- strict thread matches above, loose matches on Subject: below --
2004-07-01 1:43 Bryan Martin
2004-07-04 13:04 ` Antony Stone
2004-07-05 12:05 ` ro0ot
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=1088651922.2078.11.camel@localhost \
--to=john.sullivan@nexusmgmt.com \
--cc=mailinglist@myplaceinspace.com \
--cc=netfilter@lists.netfilter.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.