Translating an IP Address again

2

I have a question about NAT(Network Address Translation). is it possible to translate an already translated IP address? would you please guide me why it is possible or impossible?

Roshio

Posted 2011-06-23T06:22:47.253

Reputation: 147

If you have something in English, is it possible to translate it to Spanish? Then, once it's translated into Spanish, it is possible to translate it to French? Of course. Translation adds complexity, so it is often desirable to minimize the number of translations. For instance, figure out what each translation would do, and then if you can skip steps (like translating straight from English to French), then that helps to minimize translations. – TOOGAM – 2016-09-23T06:50:05.033

It is possible to have multiple layers of NAT, yes. But what do you want us to guide you with? This isn't a very useful question. – Flimzy – 2011-06-23T06:41:12.667

So, you mean it possible to translate an IP address that has been translated before, don't you? – Roshio – 2011-06-23T06:46:22.273

I'm not really sure what that question means. – Flimzy – 2011-06-23T06:46:44.207

Answers

3

You seem to be referring to Double-NAT (extract below).
Here is more local reading from ServerFault: Why is it a bad idea to use multiple NAT layers or is it?

When you have a situation where you have two subnets 
that are the same addressing that wish to communicate, it's a useful hack 
because it allows you to de-couple them into separate address space.

    ASCII Art 3: Attempt 2

            Network 1
            192.168.150.0 (Corp)
                             |
            Network 2        |
            192.168.180.0 (Intermediate)
                                    |
                    NAT BOX 1       |
                    eth0 192.168.180.180
                    eth1 10.15.15.1
                                |
                    NAT BOX 2   |
                    eth0 10.15.15.2
                    eth1 192.168.150.252
                                    |
            Newtwork 3              |
            192.168.150.0 (Untrusted Network)

That netfilter Double-NAT HOWTO goes on to discuss iptables the configuration,
Rusty's Really Quick Guide To Packet Filtering Copied.

nik

Posted 2011-06-23T06:22:47.253

Reputation: 50 788

4

Yes, it is possible to have multiple NAT layers. As long as each router points to the one "above" it as the gateway, there shouldn't be much problem for clients inside the layers to reach servers outside the layers.

Shannon Nelson

Posted 2011-06-23T06:22:47.253

Reputation: 1 287