Centos7安全之异常流量紧急处理 Linux

mowen 2019-07-25 1937

【现场还原】

1、凌晨时间发现服务器巨慢,ping几乎无响应

2、netstat -ltnp,无异常连接

3、只好祭出nethogs了。。。

     nethogs 网卡名1 网卡名2 网卡名N -d 刷新间隔(秒),e.g: nethogs eth0 -d 3

[mimi@instance ~]$ nethogs -h
usage: nethogs [-V] [-h] [-b] [-d seconds] [-v mode] [-c count] [-t] [-p] [-s] [device [device [device ...]]]
                -V : prints version.
                -h : prints this help.
                -b : bughunt mode - implies tracemode.
                -d : delay for update refresh rate in seconds. default is 1.
                -v : view mode (0 = KB/s, 1 = total KB, 2 = total B, 3 = total MB). default is 0.
                -c : number of updates. default is 0 (unlimited).
                -t : tracemode.
                -p : sniff in promiscious mode (not recommended).
                -s : sort output by sent column.
   -a : monitor all devices, even loopback/stopped ones.
                device : device(s) to monitor. default is all interfaces up and running excluding loopback
When nethogs is running, press:
 q: quit
 s: sort by SENT traffic
 r: sort by RECEIVE traffic
 m: switch between total (KB, B, MB) and KB/s mode


用nethogs发现nginx上传/下载流量非常巨大,关闭nginx流量即刻恢复正常,检查配置发现做了正向代理的处理,注释后一切正常。


PS:不要用nginx做正向代理服务器!现在脚本很多,外面太不安全,非常容易被外网自动扫到-_-!!

最新回复 (0)
返回
发新帖
X