All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Shaun T. Erickson" <ste@smxy.org>
To: Jason Opperisano <Jopperisano@alphanumeric.com>
Cc: netfilter@lists.netfilter.org
Subject: Re: Need to replace a SonicWall firewall with an iptables firewall.
Date: Mon, 30 Aug 2004 17:11:29 -0400	[thread overview]
Message-ID: <41339801.2040200@smxy.org> (raw)
In-Reply-To: <D5C9032B2B09C64EA2409D6214E91AC9051307@asimail2.alphanumeric.com>

(btw, none of your responses wrap at all, and I have to edit them)

>>First, I've never done one-to-one NAT, but I'm sure I can look that up.
> 
> ok.  the basic premise is that you generate pairs of SNAT and DNAT rules 
 > for each private/public IP pair.

Alright.

>>Second, will I require any special rules to allow internal LAN hosts to
>>access the DMZ systems by their public IP addresses? I want to be sure
>>internal systems access them the same way as external systems. Third,
> 
> 
> by their public IP addresses?  yes.  by their names--no (two words for
 > you:  split dns--know it, use it, love it)

I need internal hosts, and external hosts, to be able to connect to the 
DMZ servers by their public DNS names. Connecting to 
http://www.somedomain.com from either the inside or the outside, should 
get you to the server in the DMZ. For testing purposes, we need to 
access everything the same way as our customers.

Not knowing what split-dns was, I googled it. If I understand it 
correctly it seems that this is only needed when you use a single, 
common domain for both internal and external systems. All our external 
systems (both between the firewall and the router, and in the DMZ) are 
in "domain.com" and all our internal systems are in "sub.domain.com", so 
we don't need split-dns, right?

> if you need the internal folks to access the DMZ hosts by public IP,
 > your best bet is probably to do DNATs like:
> 
>   iptables -t nat -A PREROUTING -i $INTERNAL_IF -o $DMZ_IF \
>     -d $DMZ_PUB_IP -j DNAT --to-detination $DMZ_PRIV_IP
> 
> for each host...you can cycle through these in the script that creates
 > the static one-to-one mappings from #1 above...  ;-)

I think I need to look closer at how packets travers netfilter, before 
I'll understand that one. It's been a long day. :)

>>when I write rules for what access is allowed to what systems in the DMZ
>>from either the Internet or the LANs, what do I write the rule against:
>>the real, public IP of the DMZ server, or it's private IP address?
> 
> private IP.  DNAT happens in the PREROUTING chain of the nat table; which
 > is prior to any chain of the filter table.  SNAT happens in the 
POSTROUTING
 > chain of the nat table; which is after any chain of the filter table.  so
 > the rule in the filter table should always (hmmm...) use the actual IP
 > assigned to the NIC of the host in question.

Hmm. Ok.

	-ste



  reply	other threads:[~2004-08-30 21:11 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-30 20:41 Need to replace a SonicWall firewall with an iptables firewall Jason Opperisano
2004-08-30 21:11 ` Shaun T. Erickson [this message]
  -- strict thread matches above, loose matches on Subject: below --
2004-08-31 14:11 Jason Opperisano
2004-08-30 22:25 Jason Opperisano
2004-08-31 13:47 ` Shaun T. Erickson
2004-08-30 22:23 Daniel Chemko
2004-08-31  0:02 ` Nick Drage
2004-08-30 20:45 Jason Opperisano
2004-08-30 19:30 Jason Opperisano
2004-08-30 20:23 ` Shaun T. Erickson
2004-08-30 16:01 Shaun T. Erickson
2004-08-30 18:41 ` Shaun T. Erickson

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=41339801.2040200@smxy.org \
    --to=ste@smxy.org \
    --cc=Jopperisano@alphanumeric.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.