Best way to get your public IP address is to use ifconfig.me which only returns the IP simple and efficient.
$ curl http://ifconfig.me
The only problem is the responsiveness (few seconds).Another cool way is to query the opendns servers :
This method is pretty fast but requires the dig command (part of the bind-utils package).$ dig+shortmyip.opendns.com @resolver1.opendns.com
0 comments:
Post a Comment