linux预防网络攻击脚本
linux预防网络攻击脚本
概览:
- 环境ubuntu20.04 centos7
- 脚本
- 效果
命令实现概览:
- 截取第六列分析
Peer Address:Port - 文件形式:cat 1.log |awk -F ‘[ :]+’ ‘NR>1{print $6}’ |sort -rn |uniq -c
- 命令形式(筛选特定行):ss -ant |awk -F ‘[ :]+’ ‘/^ESTAB|^FIN-WAIT-1/{print $6}’ |sort -rn |uniq -c
一. 脚本
1 | #!/bin/bash |
二. 效果
结语fighting!
All articles in this blog are licensed under CC BY-NC-SA 4.0 unless stating additionally.
Comment




