Linux Shell view the current Internet IP

Time:2021-12-5

The function of the flying shovel is simpler, just to obtain the external network IP. Some websites deal with curl’s UA.

I met my collection addiction and collected a lot of URLs and methods that can be used to query Internet IP.

#The interface of a domestic website only returns IP
curl ip.6655.com/ip.aspx
curl whatismyip.akamai.com
#Visit ifconfig.co for more usage
wget -qO - ifconfig.co
 
curl icanhazip.com
dig +short myip.opendns.com @resolver1.opendns.com
 
curl ident.me
curl v4.ident.me
curl v6.ident.me
#Slow
curl curlmyip.com 
curl ifconfig.me
curl inet-ip.info
 
 
#Return to IP and region
curl ip.6655.com/ip.aspx?area=1
curl 1111.ip138.com/ic.asp
curl ip.cn
curl cip.cc
 
 
#If you need to turn over the X wall, only IP is returned
curl ip.appspot.com
 
#Reference http://unix.stackexchange.com/questions/22615/how-can-i-get-my-external-ip-address-in-bash
#Someone gave the following test method
 
wget https://raw.githubusercontent.com/rsp/scripts/master/externalip-benchmark
chmod a+x externalip-benchmark
./externalip-benchmark