0

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?

Thanks

user1069528
  • 618
  • 1
  • 13
  • 29
  • 1
    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 01 '12 at 00: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. http://www.extremetech.com/mobile/127213-ipv6-now-deployed-across-entire-t-mobile-us-network – user1069528 Jul 01 '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 01 '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 01 '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 02 '12 at 14:20

3 Answers3

2

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.

Celada
  • 21,627
  • 4
  • 64
  • 78
1

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

Mark Hall
  • 53,938
  • 9
  • 94
  • 111
0

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.

Wyatt Barnett
  • 15,573
  • 3
  • 34
  • 53