一台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不停往外发包的更多相关文章

  1. 几种在Linux下查询外网IP的办法。

    几种在Linux下查询外网IP的办法.   Curl 纯文本格式输出: curl icanhazip.com curl ifconfig.me curl curlmyip.com curl ip.ap ...

  2. 闲置安卓设备搭建Linux服务器实现外网访问

    title: 闲置安卓设备搭建Linux服务器实现外网访问 这是我搭过的第一个博客系统,写贴纪念一下 待博主整理好思路,将今天所用到的全部分享! 好吧,我就是穷.富人靠科技,穷人靠变异.我这种穷人是真 ...

  3. Linux服务器大量向外发包问题排查

    最近Linux redhat 6.5 APP 业务系统,向外大量发送流量,不断建立tcp连接,目标地址是美国的一个IP,估计被当成肉鸡了,比较悲惨,直接飞向IDC机房,防火墙显示这个APP服务器tcp ...

  4. linux下的外网木马前期要的工具

    这周看了demon哥的博客弄msf外网马,自己试了一下 首先去ngrok官网下载对应的系统版本,如果对应下载那个标签是绿色的(这里不支持windows) 下载好后在linux提取出来 让我们来看看他的 ...

  5. vm虚拟机中linux无法连接外网?

    问题出现的环境? vm虚拟机中安装了linux系统,vm设置了NAT方式共享主机ip,但还是没法访问外网?在linux系统中查询ip地址,没有ipv4地址,就是配置了自动获取,但是还是没有获取? 问题 ...

  6. Linux配置Redis外网访问

    下载:redis-3.2.5.tar.gz 拷贝到指定目录解压:tar -xzvf redis-3.2.5.tar.gz 进入到解压目录redis-3.2.5下安装: makemake install ...

  7. Linux ping不通外网

    在linux中ping www.baidu.com 无法ping通,可能原因是DNS没配置好 方法一: 修改vi /etc/resolv.conf  增加如下内容: nameserver 114.11 ...

  8. linux内核构造skb发包-----raw、tcp网络编程

    1. 内核raw发包 #include <linux/init.h>#include <linux/module.h> #include <linux/kernel.h& ...

  9. 重新整理 .net core 实践篇 ———— linux 上线篇 [外篇]

    前言 简单整理一个linux 简单上线. 这个是该系列的外篇,该系列继续更新.献给刚学的人. 正文 安装实例 dotnet new webapp -n AspNetCoreDemo -o firstw ...

随机推荐

  1. linux下查找指定时间内修改过的或新建的文件

    1.简单命令 # find -type f \( -newermt '2017-04-19 00:00' -a -not -newermt '2017-04-27 23:59' \) 2.简单实现(参 ...

  2. ElasticSearch(十七)初识倒排索引

    现在有两条document: doc1:I really liked my small dogs, and I think my mom also liked them. doc2:He never ...

  3. 打广告:B站广告

    https://www.bilibili.com/video/av52230444/ https://www.bilibili.com/video/av52230444/ https://www.bi ...

  4. python初学者总结

    学习python首先配置好工作环境,因为不同版本之间的python是不兼容了 原创:01coding.com win7安装环境过程: 1:下载python 建议下载两个不同版本官方已给出 https: ...

  5. hdu 3718 Different Division

    Different Division Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Other ...

  6. python基础14 ---函数模块5(模块和包)

    模块与包 一.模块 1.模块是怎么诞生的. 在计算机程序的开发过程中,随着程序代码越写越多,在一个文件里代码就会越来越长,越来越不容易维护.为了编写可维护的代码,我们把很多函数分组,分别放到 不同的文 ...

  7. 关于python2中的unicode和str以及python3中的str和bytes

    python3有两种表示字符序列的类型:bytes和str.前者的实例包含原始的8位值:后者的实例包含Unicode字符. python2中也有两种表示字符序列的类型,分别叫做str和unicode. ...

  8. 通过代码设置资源名字,为打包AssetBundle做准备,以及新打包系统

    核心代码就是  importer.assetBundleName = name;  但是在这之前,我们需要超找到具体的资源,我们当然是不希望一个一个手动去查找.如果我选择一个文件夹,就可以查找到里边所 ...

  9. python-字典和json

    Python的字典和JSON在表现形式上非常相似 #这是Python中的一个字典 dic = { 'str': 'this is a string', 'list': [1, 2, 'a', 'b'] ...

  10. mfc设置鼠标状态OnSetCursor响应函数

    参考文章:1.https://bbs.csdn.net/topics/70084486 2.https://blog.csdn.net/wang15061955806/article/details/ ...