linux shell查看當前外網IP
更新時間:2015年09月28日 08:54:26 投稿:hebedich
這篇文章主要介紹了如何在LINUX操作系統(tǒng)下查看本地IP地址(在SHELL下)的相關資料,需要的朋友可以參考下
功能飛鏟更簡單,只是獲取外網IP。部分網站針對curl 的ua進行處理。
滿足了一下自己的搜集癖,搜集了不少可以用來查詢外網IP的網址和方法。
#國內某網站的接口,只返回IP curl ip.6655.com/ip.aspx curl whatismyip.akamai.com #更多用法訪問ifconfig.co wget -qO - ifconfig.co curl icanhazip.com dig +short myip.opendns.com @resolver1.opendns.com curl ident.me curl v4.ident.me curl v6.ident.me #慢 curl curlmyip.com curl ifconfig.me curl inet-ip.info #返回IP和地區(qū) curl ip.6655.com/ip.aspx?area=1 curl 1111.ip138.com/ic.asp curl ip.cn curl cip.cc #需要翻x墻,只返回IP curl ip.appspot.com #參考 http://unix.stackexchange.com/questions/22615/how-can-i-get-my-external-ip-address-in-bash #有人給了以下測試方法 wget https://raw.githubusercontent.com/rsp/scripts/master/externalip-benchmark chmod a+x externalip-benchmark ./externalip-benchmark