1,使用curl命令 查看本机公网IP地理位置
curl cip.cc
curl ipinfo.io
$ curl ipinfo.io
{
"ip": "34.80.248.126",
"hostname": "126.248.80.34.bc.googleusercontent.com",
"city": "New York City",
"region": "New York",
"country": "US",
"loc": "40.7143,-74.0060",
"org": "AS15169 Google LLC",
"postal": "10004",
"timezone": "America/New_York",
"readme": "https://ipinfo.io/missingauth"
curl cip.cc
$ curl cip.cc
IP : 34.80.248.126
地址 : 美国 美国
数据二 : 台湾省 | 彰化县Google云计算数据中心
数据三 : 美国德克萨斯休斯顿
URL : http://www.cip.cc/34.80.248.126
curl ip.gs
$ curl ip.gs
Current IP / 当前 IP: 34.80.248.126
ISP / 运营商: cloud.google.com
City / 城市: Changhua County Taiwan
Country / 国家: China
2,查询指定公网IP地理位置信息
curl cip.cc/ip
─➤ curl cip.cc/8.8.8.8
IP : 8.8.8.8
地址 : GOOGLE.COM GOOGLE.COM
运营商 : level3.com
数据二 : 美国 | 加利福尼亚州圣克拉拉县山景市谷歌公司DNS服务器
数据三 : 美国 | Level3
URL : http://www.cip.cc/8.8.8.8
curl freeapi.ipip.net/ip
╰─➤ curl freeapi.ipip.net/35.194.24.24
["美国","爱荷华州","康瑟尔布拉夫斯","","cloud.google.com"]
3,返回公网IP
curl ip.gs
curl ip.sb
curl whatismyip.akamai.com
curl icanhazip.com
curl ifconfig.cat
4,ipinfo.io
curl ipinfo.io/<IP>
5,ip.tool.lu
curl -L ip.tool.lu
参考: