curl myip.ipip.net curl ip.cn curl cip.cc
[命令行] curl查询公网出口IP
不管是在家里还是办公室,或者是公司的主机,很多时候都是在内网中,也就是说很多都是通过 NAT上网的,有时候需要查询下出口的公网IP,如果有浏览器,可以用百度, google搜
ip这个关键词得到公网IP,那要是在命令行下呢? 下面是运维开发群的大神们分享的几个接口,整理了下分享给大家。
liuzhizhi@lzz-rmbp|logs # curl ipinfo.io
{
"ip": "114.110.1.38",
"hostname": "No Hostname",
"city": "Beijing",
"region": "Beijing Shi",
"country": "CN",
"loc": "39.9289,116.3883",
"org": "AS4808 CNCGROUP IP network China169 Beijing Province Network"
}%
liuzhizhi@lzz-rmbp|logs # curl ip.cn
当前 IP:114.110.1.38 来自:北京市 广东恒敦通信技术北京分公司
liuzhizhi@lzz-rmbp|~ # curl cip.cc
IP : 114.110.1.38
地址 : 中国 北京市
数据二 : 北京市 | 广东恒敦通信技术北京分公司
URL : http://www.cip.cc/114.110.1.38
liuzhizhi@lzz-rmbp|~ # curl myip.ipip.net
当前 IP:114.110.1.38 来自于:中国 北京 北京 联通/电信
liuzhizhi@lzz-rmbp|~ # curl ifconfig.me
114.110.1.38
liuzhizhi@lzz-rmbp|logs # curl http://members.3322.org/dyndns/getip
114.110.1.38
几个网址也非常好记忆
- ip.cn
- ipinfo.io
- cip.cc
- ifconfig.me
- myip.ipip.net
curl myip.ipip.net curl ip.cn curl cip.cc的更多相关文章
- Linux查看本机IP:curl cip.cc
curl http://members.3322.org/dyndns/getip curl ip.6655.com/ip.aspx curl ifconfig.me curl icanhazip.c ...
- 【Linux】阿里云ECS提示RHSA-2017:3263: curl security update(CentOS 7 更新 curl 为最新版本)
1.前言 由于 CentOS 7 内置的 curl 和 libcurl 源为较旧的 7.29.0,不支持一些新特性且有安全性问题,所以需要更新一下. 2.开始 1.更新ca-bundle · 首先备份 ...
- curl 模拟 GET\POST 请求,以及 curl post 上传文件
curl GET 请求 curl命令 + 请求接口的地址. curl localhost:9999/api/daizhige/article 如上,我们就可以请求到我们的数据了,如果想看到详细的请求信 ...
- python 利用cip.cc查询IP归属地
def ipinfocip(ip): # 获得 输入框中的信息 url = "http://www.cip.cc/%s" % ip # 模拟浏览器请求网络 headers={'Us ...
- Curl之获取外网IP
获取外网IP:curl -s ifconfig.me
- Shell curl 和 wget 使用代理IP
Linux Shell 提供两个非常实用的命令来爬取网页,它们分别是 curl 和 wget curl 和 wget 使用代理 curl 支持 http.https.socks4.socks5 wge ...
- 如何在nginx容器中使用ping、nslookup、ip、curl 等工具?
Nginx镜像太精简了,启动一个容器进行测试时,常用的网络工具都没有,可以使用下面的命令进行安装.也可以直接起一个busybox容器进行测试. apt update #ping apt install ...
- [Linux]curl 获取本服务器公网IP
curl ifconfig.me curl icanhazip.com curl curlmyip.com curl ip.appspot.com curl ipinfo.io/ip curl ipe ...
- 开启CURL扩展,让服务器支持PHP curl函数(远程采集)
关于开启Curl的方法模板天下小编在此给大家简单说一下 curl().file_get_contents().snoopy.class.php这三个远程页面抓取或采集中用到的工具,默迹还是侵向于用sn ...
随机推荐
- [转]php中实现事件驱动
原文: https://blog.csdn.net/yhl27/article/details/8705313 -------------------------------------------- ...
- How to make an executable jar file?
https://stackoverflow.com/questions/5258159/how-to-make-an-executable-jar-file 文件的路径如下: package com. ...
- 解决ping 127.0.0.1不通的问题
用树莓派放在家里当pt下载器,一直挺惬意的,因为没有公网ip用vps和frp配置代理,偶尔ssh上去看看,一段时间也用得好好的. 可是最近这几天,在办公室ssh上去死活连不上. 于是回去后开始折腾,局 ...
- Short与Integer互转
int 是4字节, short 是2字节的, 如果将int(Integer)转成short(Short), 那么必须强制转换,否则会报编译异常. 但是, 当int(Integer)是一个final时, ...
- .Net Framemwork 之 值类型和引用类型的存储
C#把数据类型分为两种:值类型 和 引用类型.值类型存储在堆栈中,而引用类型存储在托管堆上. 一.值类型和引用类型变量的存储 首先,变量是存储信息的基本单元,而对于计算机内部来说,变量就相当于一块内存 ...
- [转]bing壁纸天天换 初识shell魅力
原文链接:http://www.cnblogs.com/atskyline/p/3679522.html 原文的程序跑在window上,curl的使用不太一样,想要获取的图片也不太一样.修改后的代码如 ...
- vue -model
1. v-model:监听表单(input,textarea,selector)value. 2. label不知道你有没有这样的体验,我明明没有点用户名输入框,而仅仅是点了“用户名”三个字,然后就直 ...
- JS动画公式
// 效果: // Linear:无缓动效果 // Quadratic:二次方的缓动(t^2) // Cubic:三次方的缓动(t^3) // Quartic:四次方的缓动(t^4) // Quint ...
- onWindowFocusChanged重要作用(得到/失去焦点call) 、
onWindowFocusChanged重要作用 Activity生命周期中,onStart, onResume, onCreate都不是真正visible的时间点,真正的visible时间点是onW ...
- 08-session详解
如何获取session对象? 1,openSession 2,getCurrentSession 如果使用getCurrentSession需要在hibernate.cfg.xml文件中进行配置: 如 ...