1

Why do I get a different ip using:

Getting the IP address of the android device when connected to 3G mobile network

That I do by going to whatismyip.com and is there a way to get the "real ip".

The difference that I have seen between the two ips is that sending UDP packages to the whatismyip.com ip get through much faster than the ip provided by android.

I also saw in logcat that the ip address that whatismyip.com is being found by someother service:

I/pppd ( 3178): local IP address 107.52.xxx.xxx
I/pppd ( 3178): remote IP address 66.1.xxx.xxx

So there must be a way... or some other service is getting the ip from some web service

Community
  • 1
  • 1
Totic
  • 1,281
  • 1
  • 10
  • 21

1 Answers1

3

Probably your ISP NAT your connection, so with whatismyip.com you see the public IP, with that Android code you see the private (local) IP

Giuseppe
  • 2,093
  • 1
  • 21
  • 26