Linux Netfilter discussions
 help / color / mirror / Atom feed
From: Mart Frauenlob <mart.frauenlob@chello.at>
To: netfilter@vger.kernel.org
Subject: Re: Forwarding packets over the same LAN
Date: Tue, 14 Jul 2009 14:40:59 +0200	[thread overview]
Message-ID: <4A5C7CDB.7000405@chello.at> (raw)
In-Reply-To: <1247574025.7214.36.camel@TestField.intranet.bem.md>

Simion Onea wrote:
> On Tue, 2009-07-14 at 11:25 +0200, Mart Frauenlob wrote:
>   
>> Remember for the POSTROUTING rule, the previously redirected packets 
>> come from the host:port, NOT go to the host again.
>> You need `-s xxx.xxx.xxx.xxx --sport xx' -j SNAT ....
>>     
>
> Hi Mart!
>
> But this rule is for the packets leaving host 172.20.1.245 not for the
> packets coming back from 172.20.1.254.
> The first rule changes packets' destination address and port (DNAT) so
> that they go to the other host. And the second rule changes packets'
> source address (SNAT) so that the other host returns the packets back to
> this host (172.20.1.245) not to the originating host from the LAN
> (172.20.1.xxx).
> When the packets return back from 172.20.1.254 to 172.20.1.245 the
> kernel it is supposed to recognize that these packets were previously
> DNAT-ed and SNAT-ed and to reverse back their source and destination
> addresses and send them back to the originating host from the LAN
> (172.20.1.xxx).
> This is the way I understand the process.
>
> Regards,
> Simion.
>   
oops, sorry my bad :/

  reply	other threads:[~2009-07-14 12:40 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-13 14:00 Forwarding packets over the same LAN Simion Onea
2009-07-13 14:14 ` Thomas Jacob
2009-07-14  7:58   ` Simion Onea
2009-07-14  9:25     ` Mart Frauenlob
2009-07-14 12:20       ` Simion Onea
2009-07-14 12:40         ` Mart Frauenlob [this message]
2009-07-14 12:30       ` Thomas Jacob
2009-07-14 12:27     ` Thomas Jacob
2009-07-14 13:06       ` Simion Onea
2009-07-15  7:38       ` Simion Onea
2009-07-14 15:33     ` Pascal Hambourg
2009-07-14 18:50       ` Simion Onea
2009-07-14 15:34     ` Thomas Jacob
2009-07-14 19:01       ` Simion Onea
2009-07-14 20:36         ` Vincent Bernat
2009-07-15  7:32         ` Pascal Hambourg
2009-07-15  7:40           ` Simion Onea
2009-07-15 20:12             ` Mike Williams
2009-07-16  5:59               ` Simion Onea

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=4A5C7CDB.7000405@chello.at \
    --to=mart.frauenlob@chello.at \
    --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