Code Monkey home page Code Monkey logo

fail2ban's Introduction

Fail2ban

这是一个利用iptables和开源程序fail2ban来进行服务器简单防爆破的脚本。默认自带SSH防御规则。

功能

  • 自助修改SSH端口
  • 自定义最高封禁IP的时间(以小时为单位)
  • 自定义SSH尝试连接次数
  • 一键完成SSH防止暴力破解

支持系统

  • Centos 6/7 (x86/x64)
  • Ubuntu 14.04 (x86/x64)
  • Ubuntu 16.10 (x86/x64)
  • Debian 7 (x86/x64)
  • Debian 8 (x86/x64)

安装

wget https://raw.githubusercontent.com/FunctionClub/Fail2ban/master/fail2ban.sh && bash fail2ban.sh 2>&1 | tee fail2ban.log
  1. 第一步选择是否修改SSH端口。
  2. 第二部输入最多尝试输入SSH连接密码的次数
  3. 第三部输入每个恶意IP的封禁时间(单位:小时)

卸载

wget https://raw.githubusercontent.com/FunctionClub/Fail2ban/master/uninstall.sh && bash uninstall.sh

注意事项

  1. 安装完成后请会重启SSH服务,请重新连接SSH会话
  2. 若出现SSH无法连接的情况,请检查是否修改过SSH端口,请填写写改后的正确端口进行连接

更新日志

2016.11.15 第一次提交,初步完成。

关于

Made by FunctionClub QQ群:277717865

鸣谢

fail2ban's People

Contributors

kiritomiao avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.