NetWiki

I can make net work

User Tools

Site Tools


leftovers:find_my_public_ip

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
leftovers:find_my_public_ip [2023-08-26 03:21] – created daveleftovers:find_my_public_ip [2024-08-22 19:50] (current) – [PowerShell] dave
Line 1: Line 1:
 ====== Find My Public IP ====== ====== Find My Public IP ======
 +
 +===== Web Sites =====
 +
 +  * https://www.google.com/search?q=my+ip
 +    * "Go to google and search for "my ip".
 +  * http://icanhazip.com/
 +  * http://api.ipify.org/
 +  * https://www.ipchicken.com/ - easy to remember
 +
 +===== CLI =====
 CLI commands to find your public IP address. CLI commands to find your public IP address.
  
-===== Curl =====+==== Curl ====
 <code> <code>
 > curl icanhazip.com > curl icanhazip.com
Line 12: Line 22:
 </code> </code>
  
-===== Dig =====+==== Dig ====
 <code> <code>
 +# via OpenDNS
 > dig +short myip.opendns.com @resolver1.opendns.com > dig +short myip.opendns.com @resolver1.opendns.com
 11.22.33.44 11.22.33.44
  
 +# via Google
 > dig TXT +short o-o.myaddr.l.google.com @ns1.google.com > dig TXT +short o-o.myaddr.l.google.com @ns1.google.com
 "11.22.33.44" "11.22.33.44"
 +
 +# via Akamai
 +> dig @ns1-1.akamaitech.net ANY whoami.akamai.net +short
 +11.22.33.44
 </code> </code>
 +Install the [[Software:isc_dig_host|ISC dig and host]] tools.
  
-===== nslookup =====+ 
 +==== nslookup ====
 <code> <code>
 # same as above, but nslookup for Windoze # same as above, but nslookup for Windoze
Line 33: Line 51:
 </code> </code>
  
-===== PowerShell =====+==== PowerShell ====
 <code> <code>
   (Invoke-WebRequest 'http://icanhazip.com/').Content   (Invoke-WebRequest 'http://icanhazip.com/').Content
Line 42: Line 60:
 </code> </code>
  
 +Invoke-WebRequest is also aliased as curl so this is another way to get the same result.
 +
 +<code>
 +curl icanhazip.com | Select-Object -ExpandProperty Content
 +</code>
 +
 +You could sub http://api.ipify.org/ to get the same results.
leftovers/find_my_public_ip.1693020090.txt.gz · Last modified: by dave

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki