From: Leonardo Rodrigues <leolistas@solutti.com.br>
To: Shirley Ong <soap6gal@gmail.com>
Cc: netfilter@vger.kernel.org
Subject: Re: SNAT - matching original and natted IP addresses
Date: Fri, 15 Jan 2010 14:19:43 -0200 [thread overview]
Message-ID: <4B50959F.4040207@solutti.com.br> (raw)
In-Reply-To: <1ef54a181001150733r5b688d27x3feaf7d4cc25128d@mail.gmail.com>
Shirley Ong escreveu:
> Hi,
>
> I'm trying to map a range of private IP addresses to a range of public
> IP addresses. For this, I'm using SNAT:
>
> # iptables -t nat -A POSTROUTING -s <private range> -d ! <private
> range> -j SNAT --to-source <public range>
>
> The public range is higher than private range. I can see from
> conntrack that the last 2 octets of original and natted IP addresses
> are always the same. Can I be sure that the mapping is always correct
> without parsing conntrack from time to time because it's heavy
> processing? Or is there any other way that I can make sure the mapping
> is always correct?
>
it's seems to me that using NETMAP target will be more interesting
to you than using SNAT. AFAIK, SNAT does not guarantees you that.
--
Atenciosamente / Sincerily,
Leonardo Rodrigues
Solutti Tecnologia
http://www.solutti.com.br
Minha armadilha de SPAM, NÃO mandem email
gertrudes@solutti.com.br
My SPAMTRAP, do not email it
next prev parent reply other threads:[~2010-01-15 16:19 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-15 15:33 SNAT - matching original and natted IP addresses Shirley Ong
2010-01-15 16:19 ` Leonardo Rodrigues [this message]
2010-07-29 19:37 ` SNAT - on bridge only addressing some packets? Timothy Hayes
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=4B50959F.4040207@solutti.com.br \
--to=leolistas@solutti.com.br \
--cc=netfilter@vger.kernel.org \
--cc=soap6gal@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox