Differences

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

Link to this comparison view

Next revision
Previous revision
user:william:getting_external_ip [2018/03/28 23:38]
william created
user:william:getting_external_ip [2022/05/24 10:24] (current)
198.52.186.162
Line 1: Line 1:
 +===== Getting External IP =====
 +
 Here are some ways to get your external IP using command-line. Here are some ways to get your external IP using command-line.
  
   * **IP returned as text:**   * **IP returned as text:**
- 
-  curl -sS http://​myexternalip.com/​raw 
  
   curl -sS http://​icanhazip.com/​   curl -sS http://​icanhazip.com/​
- 
   curl -sS http://​checkip.amazonaws.com/​   curl -sS http://​checkip.amazonaws.com/​
- 
-  curl -sS http://​ipinfo.io/​ip/​ 
- 
-  curl -sS http://​ipecho.net/​plain 
- 
-  curl -sS http://​bot.whatismyipaddress.com/​ 
- 
   curl -sS http://​whatismyip.akamai.com/​   curl -sS http://​whatismyip.akamai.com/​
- +  ​curl -sS -k https://​diagnostic.opendns.com/​myip 
-  ​curl -sS http://​diagnostic.opendns.com/​myip +  curl -sS http://​ifconfig.me/ip
- +
-  curl -sS http://​ifconfig.ca/ +
   curl -sS http://​ident.me/​   curl -sS http://​ident.me/​
- 
   curl -sS http://​myip.dnsomatic.com/​   curl -sS http://​myip.dnsomatic.com/​
 +  curl -sS http://​ip4.me/​api/​ | cut -d, -f2
  
   * **IP buried in webpage:**   * **IP buried in webpage:**
  
   lynx -dump http://​ip4.me/​ | sed -ne '/You are connecting with an IPv4 Address of/ {n;p}'   lynx -dump http://​ip4.me/​ | sed -ne '/You are connecting with an IPv4 Address of/ {n;p}'
- +  ​lynx -dump http://​checkip.dyndns.org/​ | awk '/​Current IP Address:/ {print $NF}' 
-  ​lynx -dump http://​checkip.dyndns.org/​ | awk '/​Current IP Address:/ {print $4}' +  lynx -dump http://​ipchicken.com/​ | awk '/Name Address:/ {print $NF}' 
- +  lynx -dump http://​monip.org/​ | awk '/IP :/ {print $NF}'
-  lynx -dump http://​ipchicken.com/​ | awk '/Name Address:/ {print $4}' +
- +
-  lynx -dump http://​ipchickenhawk.com/​ | sed -ne '/​Current IP Address/​{n;​p}'​ +
- +
-  lynx -dump http://​whatismyip.host/​ | sed -ne '/Your IP v4 address:/ {n;​n;​p}'​ +
- +
-  lynx -dump http://​checkmyip.com/​ | awk '​$1=="​Host"​ {print $2}' +
- +
-  lynx -dump "​http://​www.google.ca/​search?​q=what+is+my+ip"​ | sed -ne '/Your public IP address/​{x;​p;​x}'​ -e '​h'​ +
- +
-  lynx -dump http://​monip.org/​ | awk '/IP :/ {print $3}' +
   lynx -dump http://​www.myipaddress.com/​ | sed -ne "/Your computer'​s IP address is:/ {n;​n;​p}"​   lynx -dump http://​www.myipaddress.com/​ | sed -ne "/Your computer'​s IP address is:/ {n;​n;​p}"​
  
Line 49: Line 26:
   dig @resolver1.opendns.com myip.opendns.com +short   dig @resolver1.opendns.com myip.opendns.com +short
  
-  dig @kwvoip.ca my.ip +short 
  • user/william/getting_external_ip.1522294720.txt.gz
  • Last modified: 6 years ago
  • by william