Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I get a public IP address of a mobile phone?

I want to connect my phone to a server using the internet using the server's IP address. Mobile phone's IP address are normally private as far as I came to know.. To make my app work, I need a public Ip address of my phone. How do I achieve that??

Thanks

like image 830
Manish Basdeo Avatar asked Dec 08 '10 08:12

Manish Basdeo


People also ask

How do I find the public IP address of my phone?

Go to Settings >> Wireless & networks/WLAN, or Settings >> Network & Internet >> Wi-Fi. Tap on the Wi-Fi you are connected to, then it will show the network info including signal strength, security, MAC address and IP address.

Do mobile phones have public IP addresses?

In fact, there are two IP addresses, public and private, to identify every device including your phone: A public IP address (or global IP address) is how the rest of the internet sees any device on your network.

How do I find the IP address of someones phone?

Starting with the simplest way to find someone's IP address is to use one of the many IP lookup tools available online. Resources such as WhatIsMyIPAddress.com or WhatIsMyIP.com offer tools to enter an IP address and search for its free public registry results.


4 Answers

You'll have to wait for IPv6 ;) Now you get private address and the your service provider does some address translation (NAT): The router has one single public IP and uses ports to map incoming messages to IP addresses of the private network.

Your mobile's IP is invisible to the internet and the networks public IP is useless, because it is the router's address. Maybe with IPv6 we have public IPs for all mobiles, but for now you'll have to find a different solution for your problem - public IP doesn't work with mobiles as with all other clients in private networks (behind routers).

like image 92
Andreas Dolk Avatar answered Oct 25 '22 01:10

Andreas Dolk


Setup your own hosting server, make your app "goto" that server, fetch a simple txt page, in that simple txt you dynamically on the server set the address that was used to get the txt.

Example:

Server: yourexample.com url for /ip.php ip.php just respondes with mimetype text and the address of the requesting client.

J2ME: Request yourexample/ip.php in the repsonse is the address of your app.

like image 39
rapadura Avatar answered Oct 25 '22 01:10

rapadura


astonishingly - t-mobile 3g service seems to assign a public IP. I'm still looking into the details, but I've seen an internet-available website running on a tethered laptop

like image 36
david collier Avatar answered Oct 25 '22 02:10

david collier


You should get your i/p address. Open your browser and enter http://whatismyipaddress.com/ or wait till you have You'll have to wait for IPv6

like image 30
cleophus_p Avatar answered Oct 25 '22 01:10

cleophus_p