Several times working I had to identify the ip of the connection from where I was. Generally used the support of the meuip.com.br or whatismyip.com to get the answer. However, as usually this need occurred when using the computer via terminal, there was always that pause of opening the browser etc… solved my problem by creating a script for IP query via CURL. The service works via ip.dock.inf.br address, both via browser and also terminal, and in each with there is a different screen result, do the test.
For consultation via terminal you will need to have Curl installed, for this follow the commands:
Debian/Ubuntu ~#apt install curl
RedHat/CentOS ~#yum install curl
And to consult type:
~#curl ip.dock.inf.br
Like? Use and Share! Need various services in the area of information technology, consult us, we also have the best prices on the items we have in our online store.