From: Antony Stone <Antony@Soft-Solutions.co.uk>
To: netfilter@lists.netfilter.org
Subject: Re: DMZ to DMT through ROUTER problem !
Date: Thu, 20 May 2004 14:22:00 +0100 [thread overview]
Message-ID: <200405201422.00324.Antony@Soft-Solutions.co.uk> (raw)
In-Reply-To: <200405201454.50355.liste@zerozone.it>
On Thursday 20 May 2004 1:54 pm, O-Zone wrote:
> On Thursday 20 May 2004 14:30, Antony Stone wrote:
>
> > It's the reply packets which are the problem.
> >
> > http://www.netfilter.org/documentation/HOWTO/NAT-HOWTO-10.html
>
> i've read that manual but i't not so clear. It say to do a:
>
> # iptables -t nat -A POSTROUTING -d 192.168.1.1 -s 192.168.1.0/24 \
> -p tcp --dport 80 -j SNAT --to 192.168.1.250
>
> but can't understand what it say for 192.168.1.250. As in my config, i've
> write down that rule:
>
> $IPTABLES -t nat -A POSTROUTING -d 151.8.47.B -s 192.168.0.0/24 -p tcp -j
> SNAT - --to 192.168.0.1
>
> ...where 192.168.0.1 is the DMZ interface of ROUTER. It don't work. Where's
> the error ?
You need to make sure that the reply packets go back through the firewall, as
well as the forward packets. The easiest way to do this is by adding a SNAT
rule so that as far as the destination server is concerned, the packets came
from the firewall, not the real client, and therefore the server sends the
replies back to the firewall (which then reverse-NATs them and returns the
replies to the original client machine).
Therefore in your case something such as:
iptables -A POSTROUTING -t nat -s 192.168.0.0/24 -d 192.168.0.0/24 -j SNAT
--to 192.168.0.1
should do the trick.
The above rule matches packets coming from an internal client (-s
192.168.0.0/24) and going to an internal server (-d 192.168.0.0/24), and
forces the source address to be that of the firewall (192.168.0.1) so the
replies go back by the same route.
Regards,
Antony.
--
The difference between theory and practice is that in theory there is no
difference, whereas in practice there is.
Please reply to the list;
please don't CC me.
next prev parent reply other threads:[~2004-05-20 13:22 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-05-20 11:18 DMZ to DMT through ROUTER problem ! O-Zone
2004-05-20 12:30 ` Antony Stone
2004-05-20 12:54 ` O-Zone
2004-05-20 13:22 ` Antony Stone [this message]
2004-05-20 14:37 ` O-Zone
2004-05-20 14:45 ` Antony Stone
2004-05-20 14:58 ` O-Zone
2004-05-20 15:07 ` Antony Stone
2004-05-20 15:53 ` O-Zone
2004-05-20 16:07 ` Antony Stone
2004-05-20 16:32 ` O-Zone
2004-05-20 17:34 ` Antony Stone
2004-05-20 17:44 ` Antony Stone
2004-05-21 9:30 ` O-Zone
2004-05-21 10:19 ` Antony Stone
2004-05-21 14:08 ` O-Zone
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=200405201422.00324.Antony@Soft-Solutions.co.uk \
--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