linux ip address - yaokun123/php-wiki GitHub Wiki

Linux查看公网ip地址

一、curl cip.cc

[root@shuidi-pxy-002 conf.d]# curl cip.cc
IP	: 47.103.199.97
地址	: 中国  上海
运营商	: 阿里云/电信/联通/移动/铁通/教育网

数据二	: 上海市 | 阿里云

数据三	: 中国上海上海 | 阿里云

URL	: http://www.cip.cc/47.103.199.97

二、curl -s icanhazip.com

[root@shuidi-pxy-002 conf.d]# curl  -s  icanhazip.com
47.103.199.97

三、更多方法

1、curl ifconfig.me
2、curl cip.cc
3、curl icanhazip.com
4、curl ident.me
5、curl ipecho.net/plain
6、curl whatismyip.akamai.com
7、curl tnx.nl/ip
8、curl myip.dnsomatic.com
9、curl ip.appspot.com
10、curl -s checkip.dyndns.org | sed 's/.*IP Address: [0−9\.]∗[0−9\.]∗.*/\1/g