From: Thorsten Scherf <tscherf@web.de>
To: Peter Marshall <peter.marshall@caris.com>
Cc: netfilter@lists.netfilter.org
Subject: Re: Nat with a dynamic IP
Date: Fri, 5 Sep 2003 16:05:36 +0200 [thread overview]
Message-ID: <200309051605.36015.tscherf@web.de> (raw)
In-Reply-To: <032001c373b2$5daabf70$49caa8c0@caris.priv>
>Hi. I was wondering if someone could tell me what a good way is to set up
>DNAT and SNAT on a firewall if the external IP is not static ....
Do not use SNAT, use Maquerading. You don't have to know your external IP
here:
iptables -t nat -A POSTROUTING -s $INT_NET -o $EXT_DEV -j MASQ
DNAT is also very simple, don't specify your external IP in DNAT Rule, just
the Destination Port:
iptables -t nat -A PREROUTING -p tcp --dport 25 -i $EXT_DEV -j DNAT
--to-destination $SMTP_SERVER
Greetings,
Thorsten Scherf,
RHCE, RHCX
next prev parent reply other threads:[~2003-09-05 14:05 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-09-05 13:34 Nat with a dynamic IP Peter Marshall
2003-09-05 14:05 ` Thorsten Scherf [this message]
2003-09-05 14:36 ` Peter Marshall
2003-09-05 17:11 ` Ramin Dousti
-- strict thread matches above, loose matches on Subject: below --
2003-09-05 17:16 Daniel Chemko
2003-09-05 17:47 ` Peter Marshall
2003-09-05 19:17 ` Ramin Dousti
2003-09-06 0:34 ` Jim Carter
2003-09-05 19:13 ` Ramin Dousti
2003-09-05 19:23 Daniel Chemko
2003-09-05 19:28 ` Peter Marshall
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=200309051605.36015.tscherf@web.de \
--to=tscherf@web.de \
--cc=netfilter@lists.netfilter.org \
--cc=peter.marshall@caris.com \
/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