一台Linux这两天不停往外发包,造成外部无法访问。
[root@ct-nat ~]# watch ifconfig-------------查看数据包新增情况
Every 2.0s: ifconfig Thu Jun 5 14:24:14 2014
eth0 Link encap:Ethernet HWaddr 00:18:FE:FA:C3:42
inet addr:124.14.10.68 Bcast:124.14.10.71 Mask:255.255.255.248
inet6 addr: fe80::218:feff:fefa:c342/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1665533 errors:0 dropped:0 overruns:0 frame:0
TX packets:73298941 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1547042409 (1.4 GiB) TX bytes:803948852 (766.7 MiB)
Interrupt:169 Memory:dc200000-dc210000
eth1 Link encap:Ethernet HWaddr 00:18:FE:FA:C3:43
inet addr:118.26.96.1 Bcast:118.26.96.255 Mask:255.255.255.0
inet6 addr: fe80::218:feff:fefa:c343/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1568748 errors:0 dropped:0 overruns:0 frame:0
TX packets:1634074 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1067734779 (1018.2 MiB) TX bytes:1544805241 (1.4 GiB)
Interrupt:82 Memory:dc300000-dc310000
[root@ct-nat ~]# ifstat----查看网卡流量
eth0 eth1
KB/s in KB/s out KB/s in KB/s out
407.34 154.99 134.96 324.29
274.08 191.48 210.72 248.32
240.20 192.91 257.22 179.06
136.48 236.72 203.89 179.84
243.03 198.90 221.65 241.85
198.83 281.42 271.65 195.79
820.90 247.96 254.28 791.47
109.24 226.05 208.80 94.16
311.23 190.03 190.82 523.41
394.65 216.71 215.69 284.40
651.62 232.83 196.13 599.50
147.94 162.41 199.19 102.64
119.03 222.98 210.04 135.29
214.74 132.68 80.85 227.86
286.41 75.55 88.74 386.44
321.54 91.63 120.95 228.31
146.83 221.96 407.25 124.37
[root@ct-nat ~]# nload-------以流量图显示
Device eth0 [124.14.10.68] (1/4):
==================================================================================================
Incoming:
||
##
##
##
##
##|| ##
#### | ## ..
#### # ## ##
## |##### ## # ## .. ## Curr: 439.54 kBit/s
## .. ###### ## #. ##.. ## ####|| ## Avg: 1.88 MBit/s
## ..## ## ######|| ##### #### ##.. ###### ## Min: 0.00 Bit/s
## #### ||## ######## #####..#### ..#### ######||..||## Max: 8.05 MBit/s
########## ######.. #########################||######||||##############... Ttl: 1.65 GByte
Outgoing:
........||
.. ############
## ..############
## ################
||##..################ Curr: 1.00 MBit/s
| ###################### Avg: 2.16 MBit/s
.. ........ .... # ######################.. || Min: 0.00 Bit/s
....##||########||## ################| ########################||##..####. Max: 5.48 MBit/s
############################################################################ Ttl: 898.95 MByte
[root@ct-nat ~]# iptraf ------------很直观的工具
IPTraf
+---------------------------------+
| IP traffic monitor |
| General interface statistics |
| Detailed interface statistics |
| Statistical breakdowns... |
| LAN station monitor |
|---------------------------------|
| Filters... |
|---------------------------------|
| Configure... |
|---------------------------------|
| Exit |
+-----------------------------
可以用 sar -n DEV 1 4 查看发包数量:
[root@ct-nat ~]# sar -n DEV 1 4
Linux 2.6.18-164.el5PAE (ct-nat) 06/05/2014
02:20:38 PM IFACE rxpck/s txpck/s rxbyt/s txbyt/s rxcmp/s txcmp/s rxmcst/s
02:20:39 PM lo 0.00 0.00 0.00 0.00 0.00 0.00 0.00
02:20:39 PM eth0 855.10 290.82 832319.39 140028.57 0.00 0.00 0.00
02:20:39 PM eth1 244.90 856.12 100502.04 884775.51 0.00 0.00 0.00
02:20:39 PM sit0 0.00 0.00 0.00 0.00 0.00 0.00 0.00
02:20:39 PM IFACE rxpck/s txpck/s rxbyt/s txbyt/s rxcmp/s txcmp/s rxmcst/s
02:20:40 PM lo 0.00 0.00 0.00 0.00 0.00 0.00 0.00
02:20:40 PM eth0 1010.20 251.02 1059435.71 79747.96 0.00 0.00 0.00
02:20:40 PM eth1 287.76 1108.16 76557.14 1143078.57 0.00 0.00 0.00
02:20:40 PM sit0 0.00 0.00 0.00 0.00 0.00 0.00 0.00
用这个查看发包的端口:netstat -tu -c
[root@ct-nat ~]# netstat -tu -c
Active Internet connections (w/o servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 124.1.1.68:49995 218.66.170.184:10991 ESTABLISHED
tcp 0 0 ::ffff:118.26.96.1:ssh ::ffff:118.26.96.248:41077 ESTABLISHED
tcp 0 0 ::ffff:118.26.96.1:ssh ::ffff:118.26.96.248:42562 ESTABLISHED
Active Internet connections (w/o servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 124.1.1.68:49995 218.66.170.184:10991 ESTABLISHED
tcp 0 0 ::ffff:118.26.96.1:ssh ::ffff:118.26.96.248:41077 ESTABLISHED
tcp 0 0 ::ffff:118.26.96.1:ssh ::ffff:118.26.96.248:42562 ESTABLISHED
用 lsof -i :39733 查看端口的进程,Kill就可以了
- 几种在Linux下查询外网IP的办法。
几种在Linux下查询外网IP的办法. Curl 纯文本格式输出: curl icanhazip.com curl ifconfig.me curl curlmyip.com curl ip.ap ...
- 闲置安卓设备搭建Linux服务器实现外网访问
title: 闲置安卓设备搭建Linux服务器实现外网访问 这是我搭过的第一个博客系统,写贴纪念一下 待博主整理好思路,将今天所用到的全部分享! 好吧,我就是穷.富人靠科技,穷人靠变异.我这种穷人是真 ...
- Linux服务器大量向外发包问题排查
最近Linux redhat 6.5 APP 业务系统,向外大量发送流量,不断建立tcp连接,目标地址是美国的一个IP,估计被当成肉鸡了,比较悲惨,直接飞向IDC机房,防火墙显示这个APP服务器tcp ...
- linux下的外网木马前期要的工具
这周看了demon哥的博客弄msf外网马,自己试了一下 首先去ngrok官网下载对应的系统版本,如果对应下载那个标签是绿色的(这里不支持windows) 下载好后在linux提取出来 让我们来看看他的 ...
- vm虚拟机中linux无法连接外网?
问题出现的环境? vm虚拟机中安装了linux系统,vm设置了NAT方式共享主机ip,但还是没法访问外网?在linux系统中查询ip地址,没有ipv4地址,就是配置了自动获取,但是还是没有获取? 问题 ...
- Linux配置Redis外网访问
下载:redis-3.2.5.tar.gz 拷贝到指定目录解压:tar -xzvf redis-3.2.5.tar.gz 进入到解压目录redis-3.2.5下安装: makemake install ...
- Linux ping不通外网
在linux中ping www.baidu.com 无法ping通,可能原因是DNS没配置好 方法一: 修改vi /etc/resolv.conf 增加如下内容: nameserver 114.11 ...
- linux内核构造skb发包-----raw、tcp网络编程
1. 内核raw发包 #include <linux/init.h>#include <linux/module.h> #include <linux/kernel.h& ...
- 重新整理 .net core 实践篇 ———— linux 上线篇 [外篇]
前言 简单整理一个linux 简单上线. 这个是该系列的外篇,该系列继续更新.献给刚学的人. 正文 安装实例 dotnet new webapp -n AspNetCoreDemo -o firstw ...
随机推荐
- 在普通网页中如何调用html5+的plus对象
<script> //用法: HTML5+的plus对象,必须由click事件触发后,才能在普通网页中使用.所以在没有click的情况下,调用本文件可以解决问题! //在代码中使用: pl ...
- [note]fhq_treap
fhq_treap 这东西据说是某个叫范浩强的神仙搞出来的, 他的这种treap可以不用旋转并且资磁很多平衡树操作, 复杂度通过随机的键值来保证(树大致平衡,期望一次操作复杂度\(logn\)) 依靠 ...
- mysql索引学习----2----创建索引、修改索引、删除索引的命令语句
查看表中已经存在 index:show index from table_name; 创建和删除索引索引的创建可以在CREATE TABLE语句中进行,也可以单独用CREATE INDEX或ALTER ...
- sql查询报错:Every derived table must have its own alias
执行sql语句出现语法错误 Every derived table must have its own alias 翻译:每个派生表都有自己的别名
- ZOJ - 1505 Solitaire 【双向BFS】
题目链接 http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=1505 题意 一个8 * 8 的棋盘上面有四个棋子 棋子可以上下左 ...
- Docker alpine 设置东八时区
FROM alpine:3.8 RUN echo 'http://mirrors.ustc.edu.cn/alpine/v3.5/main' > /etc/apk/repositories &a ...
- python详细目录
python第一篇 第二篇.初识列表字典元祖循环 第三篇.内置方法 第四篇.编码解码 列表.元祖 第五篇.数据类型 第六篇 函数 第七篇.函数二 第八篇.递归.装饰器 第九篇 正则表达式 第十篇.模块 ...
- _CRT_SECURE_NO_WARNINGS
在新版编程器的编译过程中我们常常会遇到一些过时或者不安全的函数 举一个简单的例子: 很多带"_s"后缀的函数是为了让原版函数更安全,传入一个和参数有关的大小值,避免引用到不存在的元 ...
- JsonSchema使用详解
JSON Schema是一个用于验证JSON数据结构的强大工具, 我查看并学习了JSON Schema的官方文档, 做了详细的记录, 分享一下. 我们可以使用JSON Schema在后续做接口测试中做 ...
- 更改ubuntu主机名称
vim /etc/hostname 将root更改为admin vim /etc/passwd