因爲種種緣由,公司內部使用的服務器須要和雲主機發生關係。。。web
因此就須要知道內網服務器的出口公網地址服務器
以前被這個事困擾過,前幾天想起來因而解決了下,簡單記錄下幾種方法curl
curl icanhazip.com curl ifconfig.me curl ipinfo.io/ip
cur是一個命令行工具,用來請求web服務器,是一個利用URL語法在命令行下工做的文件傳輸工具ide
DESCRIPTION curl is a tool to transfer data from or to a server, using one of the supported protocols (DICT, FILE, FTP, FTPS, GOPHER, HTTP, HTTPS, IMAP, IMAPS, LDAP, LDAPS, POP3, POP3S, RTMP, RTSP, SCP, SFTP, SMTP, SMTPS, TELNET and TFTP). The command is designed to work without user interaction.