捕获fail2ban截获的Ip写入拒绝主机列表
2015-05-29 11:02
429 查看
#!/bin/bash service iptables status |awk '{print $5}' |grep -v s|grep -v 224.0.0.1 |grep -v 218.79.203.91|grep -v ^0 |grep -v 127|grep -v ^$ |grep -v 10.1 >/root/test.txt sed -i '1,$s/^/all:/g' /root/test.txt sort /etc/hosts.deny |uniq >> /root/test.txt cat /root/test.txt > /etc/hosts.deny service fail2ban restart
相关文章推荐
- Patrol 7 架构下?的处理方法
- show engine innodb status显示信息不全如何解决
- Ajax xmlHttpRequest的status的值的含义
- AJAX(XMLHttpRequest.status)状态码
- centos下fail2ban安装与配置详解
- BlueHost Windows主机控制面板介绍
- Putty实现自动登陆远程Linux主机的方法
- Apache中启用Server Status配置示例
- shell脚本实现批量测试局域网主机是否在线
- 各类Http请求状态(status)及其含义详细解析
- VPS主机快速搬家方法:边打包边传输边解压适合大中型论坛网站
- nginx status状态页配置方法和中文说明
- boot2docker(Mac) NAT 容器PORT 给 主机,外部访问
- 如何选择 VPS 主机
- 买香港主机的站长注意:香港主机也许要跟国内IDC同步
- 服务器1M带宽同时能承受多少人在线
- 测试网站访问速度的5个方法
- 如何选择美国主机