double NAT

Unanswered Question
Dec 23rd, 2008
User Badges:

Hello, everybody.

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

Users from network need to comunicate with server 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

So, packets are being NATed. We can ping from network and get a reply from NAT is working.

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

Is it possible to do a "Double NAT"?

Now packets travelling from with dest address of are being NATed(dest addr translated> and are getting to the server with the source address from

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


  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 4.5 (2 ratings)
viyuan700 Tue, 12/23/2008 - 22:42
User Badges:
  • Silver, 250 points or more

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

DPodtikhov Tue, 12/23/2008 - 23:18
User Badges:

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

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

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

passioncas Tue, 12/23/2008 - 23:39
User Badges:

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

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

DPodtikhov Wed, 12/24/2008 - 00:49
User Badges:

I can not get the difference)

Ok, let's use

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

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

The server rejects this connection because of this source address.

passioncas Wed, 12/24/2008 - 00:55
User Badges:


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.

DPodtikhov Wed, 12/24/2008 - 01:17
User Badges:

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...

lejoe.thomas Wed, 12/24/2008 - 02:18
User Badges:
  • Silver, 250 points or more

Hi Dmitry,

You need to change the source address of packets originating from the outside interface ( 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 ( to be mapped to a pool rather than an interface


access list 102 permit ip any

ip nat pool poolout netmask

ip nat outside source list 102 pool poolout add-route

But since you have only two inside local ( and, /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 network to single address (X.X.X.X) with NAT overload keyword ofcourse.

then on your router


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

As you can see all the solutions of changing the source address of the network requires you to have a prefix length greater than /30 for the ip nat inside interfaces to support more than 2 address for ( 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



DPodtikhov Wed, 12/24/2008 - 19:38
User Badges:

Thanks to everybody for your help!

Great thanks to lejoe.thomas!


This Discussion