All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mart Frauenlob <mart.frauenlob@chello.at>
To: Vigneswaran R <vignesh@atc.tcs.com>
Cc: Fabio Pedretti <fabio.pedretti@unibs.it>, netfilter@vger.kernel.org
Subject: Re: About using -i with MASQUERADE
Date: Fri, 29 Jan 2016 12:26:02 +0100	[thread overview]
Message-ID: <56AB4C4A.7020709@chello.at> (raw)
In-Reply-To: <56AB3AAC.9060907@atc.tcs.com>

On 29.01.2016 11:10, Vigneswaran R wrote:
[...]
>
> In the FORWARDING chain, you can mark the packets based on incoming
> Interface. Then use the mark to MASQUERADE the packets at the
> POSTROUTING chain. eg.,
>
> -t nat -A FORWARD -i eth3 -j MARK --set-mark 0xffff
> -t nat -A POSTROUTING -m mark --mark 0xffff  -j MASQUERADE
>
> (I hope this should work. However, I haven't tried this by myself.)
>
> Vignesh


Hello,

there is no FORWARD chain in the nat table. And marking in the nat table 
will only mark packets of conntrack state NEW.
Better do the marking in the mangle or filter table.

Best regards,

Mart


  reply	other threads:[~2016-01-29 11:26 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-22 11:53 About using -i with MASQUERADE Fabio Pedretti
2016-01-22 14:07 ` Bastian Bittorf
2016-01-29 10:10 ` Vigneswaran R
2016-01-29 11:26   ` Mart Frauenlob [this message]
2016-01-29 11:34     ` Vigneswaran R
2016-01-29 21:25     ` 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=56AB4C4A.7020709@chello.at \
    --to=mart.frauenlob@chello.at \
    --cc=fabio.pedretti@unibs.it \
    --cc=netfilter@vger.kernel.org \
    --cc=vignesh@atc.tcs.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.