Centos使用firewall封攻击IP IP段
1.查攻击的IP
命令:netstat -an | grep tcp
2.使用firewall 封IP
示例:要封的192.191.171.0/24范围
命令:
firewall-cmd --permanent --add-rich-rule='rule family=ipv4 source address="192.191.171.0/24" drop'
3.重载防火墙规则
命令:firewall-cmd --reload
示例:
建议阅读
- xfs_repair命令详解(查看: 3012)
- 释放硬件保留内存(查看: 286)
- Centos7 安装Nginx的步骤(查看: 911)
- Linux下查怎么查看端口进程(查看: 1267)
- centos7破解root密码(查看: 7589)