netfilter.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Edmundo Carmona <eantoranz@gmail.com>
To: netfilter@lists.netfilter.org
Subject: Forward specific port to another ip
Date: Tue, 27 Dec 2005 16:55:00 -0400	[thread overview]
Message-ID: <65aa6af90512271255g1d90b33eg50a61f08ca16ce3b@mail.gmail.com> (raw)
In-Reply-To: <65aa6af90512271254rb572182o3309a5f415b1256d@mail.gmail.com>

Remember I said "for starters". You have to consider more things in
order to make it work... depending on your networking environment. :-)

On 12/27/05, Richard Pickett <Richard.Pickett@csrtechnologies.com> wrote:
> Here's something to keep in mind on NAT, it only works if the NAT box is
> in-between both systems or you can double-NAT.
>
> Take this example:
>
>
>     NAT BOX
>        |
> -----------------
> |               |
> SYS A          SYS B
>
>
> A connects to NAT A's connection looks like this:
>
> From: A:Portx
> To:   NAT:Porty
>
> NAT NATs the packet to send it to B, the packet now looks like this:
>
> From: A:Portx
> To:   B:Porty
>
> When B replies to the connection his packet looks like this:
>
> From: B:Porty
> To:   A:Portx
>
> When this packet arrives at SYS A it doesn't recognize the connection,
> it's expecting all return packets to look like this:
>
> From: NAT:Porty
> To:   A:Portx
>
> To make it work you have to double-NAT the packets. You have to NAT the
> PREROUTING to change the "TO", and the POSTROUTING to change the "FROM".
>
>
>


  parent reply	other threads:[~2005-12-27 20:55 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-12-25 18:43 Forward specific port to another ip Andy Lego
     [not found] ` <65aa6af90512251916p6e15b2c5pe044142c92ae0797@mail.gmail.com>
2005-12-27 18:36   ` Andy Lego
2005-12-27 18:51     ` Andy Lego
2005-12-27 19:11     ` Richard Pickett
     [not found]       ` <65aa6af90512271254rb572182o3309a5f415b1256d@mail.gmail.com>
2005-12-27 20:55         ` Edmundo Carmona [this message]
2005-12-28  5:13           ` Richard Pickett
2005-12-28 13:20             ` Edmundo Carmona

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=65aa6af90512271255g1d90b33eg50a61f08ca16ce3b@mail.gmail.com \
    --to=eantoranz@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).