How to Find Your Public IP Address
Published: June 24, 2024 | Last Modified: May 13, 2025
Tags: networking ip-address command-line powershell curl nslookup
Categories: Networking Shell PowerShell
Different methods of obtaining the public IP address of a computer.
Using nslookup
nslookup myip.opendns.com. resolver1.opendns.com
Using curl
curl ifconfig.me
Using PowerShell
(Invoke-WebRequest -Uri "http://ifconfig.me/ip").Content