Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

New Member

double NAT

Hello, everybody.

I have the following situation(pls look in the attachment)

Users from network 192.168.1.0/24 need to comunicate with server 172.30.1.2. But they should not know about it's ip address, it must be hidden with NAT.

So, here we come with:

#ip nat inside source static 172.30.1.2 192.168.1.200

So, packets are being NATed. We can ping 192.168.1.200 from network 192.168.1.0/24 and get a reply from 172.30.1.2. NAT is working.

The problem is, the server 172.30.1.2 accepts telnet connections only from it's local network, 172.30.1.0/30

Is it possible to do a "Double NAT"?

Now packets travelling from 192.168.1.0/24 with dest address of 192.168.1.200 are being NATed(dest addr translated 192.168.1.200->172.30.1.2) and are getting to the server with the source address from 192.168.1.0/24.

I need to change the source address of this packets to 172.30.1.1 so that telnet connections were accepted.

Thx

8 REPLIES
Silver

Re: double NAT

Don't you think an access list to allow tcp from 192.168.1.0 network can also be a asolution to your problem.

New Member

Re: double NAT

Well, in fact there are no access-lists on the router that block 192.168.1.0 connection to the server.

The server itself does not accept the connections elsewhere other than 172.30.1.0 network. And I have no access to this server.

So, the access-list will not solve this issue.

New Member

Re: double NAT

Instead of using 192.168.1.200 for nating the server 172.30.1.2 , use another IP address in a different network address.

ip nat source static 172.31.1.2 10.10.10.10 and use 10.10.10.10 IP address to access the server.

New Member

Re: double NAT

I can not get the difference)

Ok, let's use 10.10.10.10

So, packets from 192.168.1.0 are trying to access the server 10.10.10.10. They enter the router with the source address 192.168.1.x and dest address 10.10.10.10.

NAT translates dest 10.10.10.10 to 172.30.1.2, that's ok, but the source address stays the same(192.168.1.x)

The server rejects this connection because of this source address.

New Member

Re: double NAT

Hi

It is quite unfamiliar to do NATing because the connections are rejected by the server from another network.Check at server side and allow connections from another network.It can be a problem with the Anti virus that prevents the connections happening form another network.

New Member

Re: double NAT

Pity, but i have no access to this server. And it is not possible to reconfigure it...

I need a solution which will affect only router's configuration...

Re: double NAT

Hi Dmitry,

You need to change the source address of packets originating from the outside interface (192.168.1.0/24 network).

This is possible with ip nat outside (translates source address of packets going from outside to inside) statement.

However ip nat outside requires a network matched via an access-list (192.168.1.0/24) to be mapped to a pool rather than an interface

eg:

access list 102 permit ip 192.168.1.0 0.0.0.255 any

ip nat pool poolout 172.30.1.3 172.30.1.254 netmask 255.255.255.0

ip nat outside source list 102 pool poolout add-route

But since you have only two inside local (172.30.1.2 and 172.30.2.2, /30 mask) address to which these outside global address must be mapped, this will not work.

Another solution is to use another router in between and map all 192.168.1.0/24 network to single address (X.X.X.X) with NAT overload keyword ofcourse.

then on your router

add

ip nat outside source static X.X.X.X 172.30.1.3 add-route

As you can see all the solutions of changing the source address of the 192.168.1.0/24 network requires you to have a prefix length greater than /30 for the ip nat inside interfaces to support more than 2 address for (172.30.1.0/30 subnet). If these solutions need to be implemented, you'll obviously need to make modifications on the server (changing it's subnet mask) .

The point, it's easier to make changes on server to access packets from the source address from the network 192.168.1.0/24.

HTH

Lejoe

New Member

Re: double NAT

Thanks to everybody for your help!

Great thanks to lejoe.thomas!

364
Views
9
Helpful
8
Replies
CreatePlease login to create content