#TIL : Getting your external IP

Nov 24, 2017 4 mins read 8d4302659

Getting your external IP

We can get our external IP address by following ways :

  1. Call http request : curl http://wtfismyip.com/text or curl http://ifconfig.me/ip
  2. Lookup A record for hostname nslookup myip.opendns.com resolver1.opendns.com (this only works when you use resolver of OpenDNS)

Bonus : curl https://v6.ident.me/ for IPv6

comments powered by Disqus