現(xiàn)在很多云主機(jī)都是使用 nat,,沒有在機(jī)器上直接添加外網(wǎng) IP 了,。這時候要獲取到外網(wǎng) IP 就需要一些服務(wù)的支持。那么有哪些網(wǎng)站可以獲取到呢,?
以下的一些站點(diǎn)都可以獲取到機(jī)器上訪問的外網(wǎng)IP地址,。
IPIP.NET
IPCN
搜狐
IP138
Ping, mtr, dig and TCP port check from multiple locations
icanhazip.com
Comprehensive IP address data, IP geolocation API and database - IPinfo.io
在服務(wù)器終端下通過以下命令查看的
curl https://ip.cn
curl http://pv.sohu.com/cityjson 2>> /dev/null | awk -F '"' '{print $4}'
curl icanhazip.com
curl ipv4.icanhazip.com
curl ipinfo.io/ip
curl ip.sb