Linux Netfilter discussions
 help / color / mirror / Atom feed
From: Grant Taylor <gtaylor@riverviewtech.net>
To: Mail List - Netfilter <netfilter@vger.kernel.org>
Subject: Re: Redirect back to internal network
Date: Fri, 07 Nov 2008 14:51:46 -0600	[thread overview]
Message-ID: <4914AA62.30000@riverviewtech.net> (raw)
In-Reply-To: <ebccda510811071202n32907e65r296ad9a281aa3b3d@mail.gmail.com>

On 11/07/08 14:02, Henrique Netfilter wrote:
> It actually worked, but only when I also added my PREROUTING DNAT 
> rule. So the final solution is like this:

*nod*

You have to have both the PREROUTING rule to DNAT the traffic to the new 
destination /and/ the POSTROUTING rule to cause the destination to send 
the reply traffic back through your router.

> iptables -t nat -I PREROUTING -i <internal_network_interface> -d 
> <Internet_Address> -j DNAT --to <Internal_Server_Address>
> 
> iptables -t nat -I POSTROUTING -o <internal_network_interface> -s 
> <LAN_address> -d <Internal_Server_Address> -j SNAT --to 
> <internal_network_IP>
> 
> Thanks once again.

You are welcome.

I'm glad that it worked the way that you needed it to.  :)



Grant. . . .

  reply	other threads:[~2008-11-07 20:51 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-07 17:06 Redirect back to internal network Henrique Netfilter
2008-11-07 19:02 ` Grant Taylor
2008-11-07 20:02   ` Henrique Netfilter
2008-11-07 20:51     ` Grant Taylor [this message]
2008-11-07 21:12 ` Grant Taylor

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=4914AA62.30000@riverviewtech.net \
    --to=gtaylor@riverviewtech.net \
    --cc=netfilter@vger.kernel.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