From: Antony Stone <Antony@Soft-Solutions.co.uk>
To: netfilter@lists.netfilter.org
Subject: Re: IPTables design question (nat)
Date: Sat, 2 Nov 2002 13:00:06 +0000 [thread overview]
Message-ID: <20021102130007.DYNJ292.mta03-svc.ntlworld.com@there> (raw)
In-Reply-To: <1036179693.23663.10.camel@localhost.localdomain>
On Friday 01 November 2002 7:41 pm, Aki Karjalainen wrote:
> Hi.
>
> I've got a question about IPTables.
>
> Let's say I want to "hide" a public IP pool (e.g. 144.50.50.0/24) behing
> NAT. Easy.
>
> Let's say I want to provide SMTP port from LAN to the outside world. I'd
> say "-t nat -A PREROUTING -p tcp -d FWexternalIP --dport smtp -j DNAT
> --to 144.50.50.12:smtp".
Looks good. You might want to add a "-i FWextIF" so you only catch packets
from the outside, not the inside, but it's not too important...
> Ok, I'd still have to allow the connection in the BAD-GOOD chain for
> this to work.
Yes, you need to forward the packets and the replies.
> The result is that the outside world sees the smtp port from the
> firewall external IP _as well as_ directly from 144.50.50.12.
I don't understand this bit. The fact that you are translating the address
means that to people on the outside, it is only the FW ext address which is
visible, let alone offering any services. In order for the internal address
144.50.50.12 to be visible to the outside world, you would have to be
forwarding those through your firewall without any NAT (and this address
would need to be routed to you by your ISP too)
> The question is how to hide 144.50.50.12:smtp but still allow firewall
> external ip:smtp (DNATted port)?
Does my explanation above answer your question ?
Antony.
--
Perfection in design is achieved not when there is nothing left to add,
but rather when there is nothing left to take away.
- Antoine de Saint-Exupery
prev parent reply other threads:[~2002-11-02 13:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-11-01 19:41 IPTables design question (nat) Aki Karjalainen
2002-11-02 13:00 ` Antony Stone [this message]
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=20021102130007.DYNJ292.mta03-svc.ntlworld.com@there \
--to=antony@soft-solutions.co.uk \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox