linux内网机器如何查看本地外网ip
非常简单,下面一条命令搞定
curl ifconfig.me
完成!
更多命令以及返回结果如下:
Command Line Interface
| $ curl ifconfig.me | ⇒ | 221.7.252.66 |
| $ curl ifconfig.me/ip | ⇒ | 221.7.252.66 |
| $ curl ifconfig.me/host | ⇒ | |
| $ curl ifconfig.me/ua | ⇒ | Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.79 Safari/535.11 QIHU THEWORLD |
| $ curl ifconfig.me/port | ⇒ | 31255 |
| $ curl ifconfig.me/lang | ⇒ | zh-CN,zh;q=0.8 |
| $ curl ifconfig.me/keepalive | ⇒ | |
| $ curl ifconfig.me/connection | ⇒ | keep-alive |
| $ curl ifconfig.me/encoding | ⇒ | gzip,deflate,sdch |
| $ curl ifconfig.me/mime | ⇒ | text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 |
| $ curl ifconfig.me/charset | ⇒ | GBK,utf-8;q=0.7,*;q=0.3 |
| $ curl ifconfig.me/via | ⇒ | |
| $ curl ifconfig.me/forwarded | ⇒ | |
| $ curl ifconfig.me/all | ⇒ |
ip_addr: 221.7.252.66 remote_host: user_agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.79 Safari/535.11 QIHU THEWORLD port: 31255 lang: zh-CN,zh;q=0.8 connection: keep-alive keep_alive: encoding: gzip,deflate,sdch mime: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 charset: GBK,utf-8;q=0.7,*;q=0.3 via: forwarded: |
| $ curl ifconfig.me/all.xml | ⇒ |
<info> <charset>GBK,utf-8;q=0.7,*;q=0.3</charset> <connection>keep-alive</connection> <encoding>gzip,deflate,sdch</encoding> <forwarded></forwarded> <ip_addr>221.7.252.66</ip_addr> <keep_alive></keep_alive> <lang>zh-CN,zh;q=0.8</lang> <mime>text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8</mime> <port>31255</port> <remote_host></remote_host> <user_agent>Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.79 Safari/535.11 QIHU THEWORLD</user_agent> <via></via> </info> |
| $ curl ifconfig.me/all.json | ⇒ | {"connection":"keep-alive","ip_addr":"221.7.252.66","lang":"zh-CN,zh;q=0.8","remote_host":"","user_agent":"Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.79 Safari/535.11 QIHU THEWORLD","charset":"GBK,utf-8;q=0.7,*;q=0.3","port":"31255","via":"","forwarded":"","mime":"text/html,application/x |
linux内网机器如何查看本地外网ip的更多相关文章
- Android 获取本地外网IP、内网IP、计算机名等信息
一.获取本地外网IP public static String GetNetIp() { URL infoUrl = null; InputStream inStream = null; try { ...
- windows,linux,cmd查看公网/外网IP
1.linux(centos)查看公网/外网ip: curl ifconfig.me #inconfig.me是一个网站来的#或者,如果上面的无法访问curl icanhazip.com 2.Wi ...
- 读取本地外网IP地址
读取本地外网IP地址. 根据启动并运行的网卡名称,找到本机实际的IP地址(已知当前运行的无线网卡名包含某一个字符) import java.net.InterfaceAddress; import j ...
- Linux CentOS7 开启80,443端口外网访问权限
一.查看系统防火墙状态(如果返回 running 代表防火墙启动正常) firewall-cmd --state 二.开启端口外网访问 1.添加端口 返回 success 代表成功(--permane ...
- vmware中linux虚拟机使用NAT模式不能连接外网解决
linux虚拟机一直配置的桥接模式,今天改成NAT模式发现不能上外网 环境:VMware12,CentOS 6.8,NAT模式 ①电脑实际ip:192.168.1.100 ②NAT使用虚拟网卡网关: ...
- 阿里云VPC网络内网实例通过SNAT连接外网
场景: 1.有多个ECS实例,其中A实例有公网IP,可以上外网 其它实例没有公网IP,不能上外网 2.所有实例在一个交换机,也就是一个网络(172.16.0.0/16) 实例 内网IP 外网IP A ...
- linux 能访问内网,但不能访问外网?解决方案
用iptables就可以了 iptables -F iptables -t nat -F iptables -A INPUT -s -d -j ACCEPT iptables -A INPUT -d ...
- vmware能够ping通内网,上不了外网的解决方法
一般这是由于里面的路由域名服务器没有配置好. issta@ubuntu:~$ ping www.baidu.com ping: unknown host www.baidu.com 先看一下地址解析器 ...
- linux操作系统运行一个java程序并外网访问
(一)安装jdk 1.新建文档java : mkdir java 2.进入java并且下载jdk 下载jdk : wget --no-check-certificate --no-cooki ...
随机推荐
- Asp.net之数组应用
string[] abc=new string[8]{"1","2","3","4","1",&qu ...
- Jquery复选框
Jquery复选框 1.checkbox list选择 代码: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//E ...
- C语言文件进阶操作
Description文件a.dic.b.dic.c.dic中分别存有张三的三科成绩,每个文件都是16字节:前8个字节存储其英文名字zhangsan,后面是一个空格,其后的2个字节存储其年龄(文本方式 ...
- “今日校园” App 用户体验分析
一.背景 为进一步提升信息化应用水平,更好的服务师生,南通大学智慧校园移动端APP“今日校园”定于11月5日正式上线运行.登陆APP可浏览学校新闻.校园生活.各部门微信公众号等内容,查看校内通知.校内 ...
- 再学习Webform页面生命周期
参考文章: 在vs2010,新建一个aspx页面,页面头部有一行代码: <%@ Page Language="C#" AutoEventWireup="true&q ...
- TCP系列06—连接管理—5、TCP fastopen(TFO)
一.TFO背景 当前web和web-like应用中一般都是在三次握手后开始数据传输,相比于UDP,多了一个RTT的时延,即使当前很多应用使用长连接来处理这种情况,但是仍然由一定比例的短连接,这额外多出 ...
- Web服务器性能压力测试工具
一.http_load 程序非常小,解压后也不到100K http_load以并行复用的方式运行,用以测试web服务器的吞吐量与负载. 但是它不同于大多数压力测试工具,它可以以一个单一的进程运行,一般 ...
- 在线api查询网站
1.包含各种常用的语言 http://tool.oschina.net/apidocs
- ICE checkbox 用法
Hello everybody, I have a datable which contain multiple lines gotten from database, in the header o ...
- MATLAB中mat2gray的用法【转】
函数简介 函数功能:实现图像矩阵的归一化操作.所谓"归一化"就是使矩阵的每个元素的值都在0和1之间.该函数在数字图像处理中经常用到. 调用格式: I = mat2gray(A, [ ...