I want to test my android app coming in via my routers external static ip address but using wifi. The app accesses a web server (running on lan machine address in debug) and a ms sql server. The router has protocol/port forwarding set for these. When I use the lan address in the android app all is well, when i use the external address I get timed out exception for ms sql and connection refused for the web server.
I wonder if one or other of these may have something to do with a NAT (Network Address Translation) Loopback issue or constraint. There are no relevant logging events in the router at the time. Does any one have any thoughts on this?
From my own experience trying to connect to my apache server, the answer is yes; it does have to do with NAT.
If you want to test your connectivity from outside I recommend you to get off LAN from your client. The way I achieved this with my apache server (which was hosted on my desktop) was by trying to connect to it from my phone via the data connection after disabling WIFI. If this works, then your system works.
I believe this has to do with NAT only working from connections incoming from the outside.