From: Pascal Hambourg <pascal@plouf.fr.eu.org>
To: Mauricio Tavares <raubvogel@gmail.com>
Cc: netfilter list <netfilter@vger.kernel.org>
Subject: Re: Public IP to Private IP
Date: Sun, 02 Feb 2014 17:36:42 +0100 [thread overview]
Message-ID: <52EE741A.9030507@plouf.fr.eu.org> (raw)
In-Reply-To: <CAHEKYV7SoAsJ=u-8LP9AqXmKH6GmPf96HHjNfzyeLuKHqJU2vQ@mail.gmail.com>
Mauricio Tavares a écrit :
> On Sun, Feb 2, 2014 at 10:45 AM, Pascal Hambourg <pascal@plouf.fr.eu.org> wrote:
>>>>
>>>> Assuming that your inside interface is eth1, and your inside IP
>>>> network is 192.168.0.0/23:
>>>>
>>>> iptables -A POSTROUTING -s 192.168.0.0/23 -d 192.168.0.0/23 -o eth1 -j
>>>> MASQUERADE
>> Instead of masquerading I would suggest to 1:1 map the source addresses
>> to a different (unused) private subnet, so that the source address seen
>> by the final server can be mapped back to the real source address.
>>
>> E.g. :
>> iptables -A POSTROUTING -s 192.168.0.0/23 -d 192.168.0.0/23 -o eth1 \
>> -j NETMAP --to 192.168.8.0/23
>
> Assuming 0.1 is the gateway, how about adding to its firewall
> rules something like
>
> iptables -t nat -A POSTROUTING -d 192.168.0.2 -s 192.168.0.0/24 -j
> SNAT --to-source 192.168.0.1
The result (N:1 mapping) would be the same as the above MASQUERADE rule
and hide the real source address from the final server.
next prev parent reply other threads:[~2014-02-02 16:36 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-27 19:22 Public IP to Private IP Scott Mayo
2014-01-27 19:36 ` Robby Workman
2014-01-27 20:08 ` Mike Wright
2014-01-27 20:46 ` Bob Reiber
2014-01-27 20:48 ` Ray Soucy
2014-01-27 21:01 ` Scott Mayo
2014-01-27 21:30 ` Ray Soucy
2014-02-02 15:45 ` Pascal Hambourg
2014-02-02 16:09 ` Mauricio Tavares
2014-02-02 16:36 ` Pascal Hambourg [this message]
2014-01-28 7:32 ` Rob Sterenborg (lists)
2014-02-24 18:22 ` Scott Mayo
2014-02-24 19:13 ` Scott Mayo
2014-02-24 21:56 ` Scott Mayo
2014-02-25 18:06 ` Scott Mayo
2014-02-25 18:12 ` Scott Mayo
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=52EE741A.9030507@plouf.fr.eu.org \
--to=pascal@plouf.fr.eu.org \
--cc=netfilter@vger.kernel.org \
--cc=raubvogel@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 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.