Getting external IP in app

34 views
Skip to first unread message

volo...@gmail.com

unread,
Oct 10, 2019, 9:49:43 AM10/10/19
to public-dns-discuss
Hello,

I develop app, which contains network diagnostics tools, this is commercial product. I am going to add function for displaying external ip, but i dont want up own server for realize this feature. 
My question: may i use "o-o.myaddr.l.google.com" request to google DNS for getting external IP address in my app or this will break terms of using the service?

Regards, Oleg

Alex Dupuy

unread,
Oct 10, 2019, 10:18:09 AM10/10/19
to public-dns-discuss
My question: may i use "o-o.myaddr.l.google.com" request to google DNS for getting external IP address in my app or this will break terms of using the service?


You shouldn't do this, because it will sometimes return incorrect results due to DNS caching. In any case, the addresses returned from that query are the full address of the DNS resolver at Google (not the user's external IP address) and the subnet (/24 for IPv4 or /56 for IPv6) of the client's external IP address. It does not report the full client IP address

You should use an external IP reporting service like https://icanhazip.com (which supports IPv6) or if you really want to use Google, use this: https://www.google.com/search?q=external+ip+lookup

volo...@gmail.com

unread,
Oct 10, 2019, 10:41:34 AM10/10/19
to public-dns-discuss
I will take note. Thank you for your response!

Regards

четверг, 10 октября 2019 г., 17:18:09 UTC+3 пользователь Alex Dupuy написал:
Reply all
Reply to author
Forward
0 new messages