一、

[root@movie ~]# curl ifconfig.me
124.193.193.25

 

[root@movie ~]# curl ifconfig.me/all
ip_addr: 124.193.193.25
remote_host: 
user_agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.16.1 Basic ECC zlib/1.2.3 libidn/1.18 libssh2/1.4.2
port: 46231
lang: 
connection: 
keep_alive: 
encoding: 
mime: */*
charset: 
via: 
forwarded:

 

二、

 

[root@movie ~]# curl ipinfo.io
{
  "ip": "114.243.166.107",
  "hostname": "No Hostname",
  "city": "Beijing",
  "region": "Beijing",
  "country": "CN",
  "loc": "39.9289,116.3883",
  "org": "AS17816 China Unicom  IP network China169 Guangdong province"
}