Take the 2-minute tour ×

I have an application where I want a device inside a network behind a NAT to make a call to the public network giving a server its local address, Later, say 10 or 20 minutes later, I'd like the server to be able to contact the device inside the network.

Is there any protocol generally supported by firewalls/routers etc. that would direct me to the local node if I provided its actual current local address?


share|improve this question
You're far better off spending the same (or less) amount of time and energy developing and implementing an IPv6-based solution, which will allow you to do the above. –  Jeremy Visser Jul 1 '12 at 0:20
Yes it would be much better to forget ipv4 but I haven't figured out how to do that. Devices are ipv6 enabled for the most part but not all networks. I see T-Mobile is fully ipv6 enabled. extremetech.com/mobile/… –  user1069528 Jul 1 '12 at 11:28
I might be best just to wait for ipv6. Good to be a bit ahead of the curve with a new application anyways. Thanks. –  user1069528 Jul 1 '12 at 11:30
@JeremyVisser With IPv6 the preponderance of pesky and troublesome NAT should be reduced, but people will most likely still use firewalls, so you're no further ahead on this issue: those firewalls will block arbitrary connections inbound from the Internet to hosts behind SOHO gateway devices, just like they do today. –  Celada Jul 1 '12 at 13:33
in practical terms my application is mostly interested in public mobile networks and in particular being able to do web service calls to a Mongoose server on a mobile device. So I expect once the major providers drop the NATs allocating public ipv4 addresses at the edge I should be ok. –  user1069528 Jul 2 '12 at 14:20

3 Answers 3

up vote 2 down vote accepted

No, there is no such protocol. Moreover, in the case of multiple NAT, the local node can only know its address behind the innermost NAT, and the server can only know the public address outside the outermost NAT, so you have no means of mapping through multiple NATs, or even knowing how many exist in the path.

The local node will have to initiate and maintain an open connection with the server if it wants to receive anything from the server.

share|improve this answer

No there is not a protocol for mapping the IP address, though you can use portmapping/port forwarding to map specific a port to an IP Address

share|improve this answer

This is the sort of thing UPNP is meant to solve. Note that there are still challenges -- the network equipment needs to support it and the feature needs to be enabled. Many network admins will not enable it for good reason.

share|improve this answer

Your Answer


