首页 > 系统 > Linux > 正文

linux shell查看当前外网IP

2019-10-26 18:46:58
字体:
来源:转载
供稿:网友

功能飞铲更简单,只是获取外网IP。部分网站针对curl 的ua进行处理。

满足了一下自己的搜集癖,搜集了不少可以用来查询外网IP的网址和方法。

#国内某网站的接口,只返回IPcurl ip.6655.com/ip.aspxcurl whatismyip.akamai.com#更多用法访问ifconfig.cowget -qO - ifconfig.co curl icanhazip.comdig +short myip.opendns.com @resolver1.opendns.com curl ident.mecurl v4.ident.mecurl v6.ident.me#慢curl curlmyip.com curl ifconfig.mecurl inet-ip.info  #返回IP和地区curl ip.6655.com/ip.aspx?area=1curl 1111.ip138.com/ic.aspcurl ip.cncurl cip.cc  #需要翻x墙,只返回IPcurl 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-benchmarkchmod a+x externalip-benchmark./externalip-benchmark

发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表