Incoming TCPIP connections through NAT connection.

I have a simple Arduino based system that is connected via Ethernet to a normal domestic Internet connection - ie a dynamic IP for the ADSL connection ,and the Arduino sitting behind a DHCP allocated internal IP address. The Arduino logs a sensor value to a remote cloud database by making HTTP calls every x seconds, or when an event(e.g. button push) happens locally.

I now need the remote server to (randomly / non periodically / not in response to an Arduino HTTP call) 'call' the Arduino and tell it to take action (turn on a motor). Can this be accomplished, baring in mind the DHCP internal IP and potentially varying external IP. It should be assumed that there is no access to the local ADSL router, so port forwarding is not possible.

Clearly 'proper' PCs do this - for example the beep when someone posts on Facebook when the webpage is open, or an incoming Skype call. Surely the PC client isn't polling every second? Is this a 'too big for Arduino' issue, or have I missed something obvious?

Thanks in advance - have searched and got nowhere!

Hey warwickwater,
I have almost the exact same problem. I am going to connect an arduino to an external server via a wifi-shield and then push current sensor values onto that web server. This web server will also have user input, which I would then send to the arduino to control a local motor. I would give the arduino a static ip address, but I need the ability to move to different wireless routers and therefore do not have the option to port forward either.

From my research into the matter thus far, it seems that the arduino is going to need to cycle through http calls so that the connection is open to receive data from the server. If this is the case, the server will have to wait until it hears from the arduino before it can push its data onto the arduino. However, I hope that a better solution than this can be found. As I am using the wifi-shield, our solutions may be slightly different, but I think the gist of the problem is the same.

I will ask my networking professor tomorrow about the matter and will keep researching the subject. If you happen to find any solutions, please let me know! I will inform you of any progress I make into the matter.

Hey warwickwater,
I think I have found a solution. I found a library that a user wrote that will allow a websocket to be set up so that you can push messages to an arduino from a web server. I have just discovered it and am not sure of all the details, but here is the link to the code and info:

I found it through this code/project, which lists other dependencies other than just the arduino library for the system to work. I'm not sure if I need it yet, but I'll link it so you can look it over as well:

Good luck, and I hope this helps!