How can I do an nslookup or a dig command for a specific address?

Hi Team,

I am working on a design to execute nslookup/dig to get my current ip address using the command "dig +short myip.opendns.com @208.67.222.222". Ideally the result should have my public ip which i will use it to fire another api for ddns. Tried using terminal aia but ping works not the other linux commands. Is there any extensions we can use to run it on the android. I cannot make any we requests as the dns resolution would fail on my network, hence first trying to get the public ip via dig/nslookup and update the ddns settings to access internet.

Thanks

Using a web component (not the webviewer!), will this work?

https://api.ipify.org/?format=json

If you have curl installed on your device then you can use curl in the terminal extension:

curl 'https://api.ipify.org?format=json'

Or just look it up via Cloudflare:

Get_IP.aia (3.5 KB)

Hi Chris,

Thanks, it worked, just the way i asked for. Just replaced the domain name with IP-Address since i had to do bypass the DNS resolution.

Thanks.
Arun

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.