netfilter.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pascal Hambourg <pascal@plouf.fr.eu.org>
To: Kamal Kumar <malkarikamalkumar@gmail.com>
Cc: netfilter@vger.kernel.org
Subject: Re: Sub: nat issue in netfilter
Date: Wed, 25 Jun 2014 16:37:54 +0200	[thread overview]
Message-ID: <53AADEC2.70701@plouf.fr.eu.org> (raw)
In-Reply-To: <CAJQ3KZWTUWAZ4VHq-tt86FY=cZnC1qhUBn5AqccaqQaE98BVhw@mail.gmail.com>

Hello,

Kamal Kumar a écrit :
>                      I have an issue regarding nat in netfilter. When
> I configure the following rule "iptables -t nat -A POSTROUTING -s
> 0.0.0.0/0 -d 0.0.0.0/0  -i eth0 -o eth1 -j SNAT --to A.B.C.D"

This command will fail with an error. The -i option is invalid in the
POSTROUTING chain.

> and run
> some ip traffic from eth0 to eth1 found packets from eth1 with
> translated source ip A.B.C.D, its fine but when I flush the nat
> entries with traffic running from eth0 to eth1, I found packets on
> eth1 with translated source ip A.B.C.D . Is this a problem if it is

It is the expected default behaviour. The traffic creates new entries in
the conntrack table.

> then how to overcome it (when I flush the entries I should not see
> packets from eth1 with translated source ip ).

What exact behaviour do you want ? No translation or no packets ?
For what kind of traffic (TCP, UDP...) ?
May I ask what is your goal by doing this ?

  reply	other threads:[~2014-06-25 14:37 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-25 13:32 Sub: nat issue in netfilter Kamal Kumar
2014-06-25 14:37 ` Pascal Hambourg [this message]
  -- strict thread matches above, loose matches on Subject: below --
2014-06-26  9:44 Sub: NAT " Kamal Kumar
2014-06-26 15:44 ` Neal Murphy
2014-06-27  9:50 ` Pascal Hambourg

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=53AADEC2.70701@plouf.fr.eu.org \
    --to=pascal@plouf.fr.eu.org \
    --cc=malkarikamalkumar@gmail.com \
    --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;
as well as URLs for NNTP newsgroup(s).