Getting your public IP Address from the command line

Written by James McDonald

October 14, 2023

Note: If you are filtering DNS for Proxy & Filter Avoidance or have configured you network to only allow connection to trusted DNS Servers the first two will fail so use the Web Request options

linux / wsl DNS Query

dig +short

Windows DNS QUery


Linux using Web Request

echo $(curl -s
# or
curl -s; echo 

Powershell WEB rEQUEST



Submit a Comment

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

The reCAPTCHA verification period has expired. Please reload the page.

You May Also Like…