Reach arduino on a router local network without port forwarding

Hello guys,

I have an Arduino one R3 with a Wifi Shield. I tried to send messages to the Arduino via UDP and it works fine if the source of the message is a client connected to the local net generated by the router (so every client has an IP address like 192.168.1.X). But if I try to send a message from a client connected to a different net (for example from my mobile connected via UMTS) it doesn’t work: in this case I have to use the IP address of the router where the Arduino is connected but of course this message is discarded by the router because it doesn’t know how to redirect it inside the local net.

I know the problem can be solved by enabling port forwarding but I don’t want to use it. I would like to use a general method (so it will work on every router).

Can anyone tell me some advice about that ?? So, How can I reach a client connected on a local net (generated by a router) from the internet without using port forwarding?? I know two IP address ( the IP address of the router, the IP address of the Arduino in the local net of the router ) and the PORT where the Arduino is listening for UDP packets …

thanks a lot

Without port forwarding, you can't access devices on the localnet from the internet.

Thanks SurferTim .... but when I say "without port forwarding" I mean that I would like to avoid accessing the current router and "set the router to redirect any request coming on port XXX to the local IP of the Arduino".

So, really there is not a way to avoid that?

thanks a lot

cascodato:
Thanks SurferTim .... but when I say "without port forwarding" I mean that I would like to avoid accessing the current router and "set the router to redirect any request coming on port XXX to the local IP of the Arduino".

So, really there is not a way to avoid that?

thanks a lot

You can't avoid that.

How would your mobile device know the difference between the 192.168.1.x network on your router and the 192.168.1.x network on my router?

of course I will always use the IP address of the router that is the only one device directly reacheable from internet and not the IP address of the client on the local NET ....

My idea is to reproduce the same behaviour of skype for example .. you can connect your skype client via any router and without setting anything on the router, you can receive calls from other clients .. In this case, the call from the other client is performed toward the IP address of the router but how it knows that the specific call must be redirected toward a specific client on the local network ? I don't know how it does but it works ..

Is there a way to reproduce the same behaviour with the Arduino ?

thanks a lot

Skype uses a server as the initial "relay" between clients. Once the connection is established, connection tracking will maintain the connection, but the connection must be maintained on both ends, or connection tracking will timeout the connection. edit: This timeout is normally a matter of a few seconds. Connection tracking is a very temporary form of automatic port forwarding.

UDP uses this same type connection tracking. Both DNS and NTP use connection tracking to allow UDP packets through the firewall/NAT to receive the packets from the "server" on the localnet.