Find Your External IP Address
September 13, 2023 —
Gregg Szumowski
It’s easy to find your internal IP address my using tools like ifconfig or ip a but to find your external IP address (the one that connects you to the outside world) you must use other means. Here are 3 simple commands that you can use to do just that:
$ curl ifcfg.me
72.76.yyy.xxx
$ curl icanhazip.com
72.76.yyy.xxx
$ nslookup myip.opendns.com. resolver1.opendns.com
Server: resolver1.opendns.com
Address: 208.67.222.222#53
Non-authoritative answer:
Name: myip.opendns.com
Address: 72.76.yyy.xxx