zoukankan      html  css  js  c++  java
  • Debian安装fail2ban来防止扫描

    vps的root密码不要设置的太简单,这样很容易被攻破,你可以安装如下软件来降低vps被攻破的机会。

    输入如下命令:

    apt-get install fail2ban

    提示如下表示安装完成:

    root@241541:/# ~# apt-get install fail2ban
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    The following extra packages will be installed:
      python-pyinotify
    Suggested packages:
      python-gamin python-pyinotify-doc
    The following NEW packages will be installed:
      fail2ban python-pyinotify
    0 upgraded, 2 newly installed, 0 to remove and 62 not upgraded.
    Need to get 154 kB of archives.
    After this operation, 763 kB of additional disk space will be used.
    Do you want to continue? [Y/n] y
    Get:1 http://archive.ubuntu.com/ubuntu/ trusty/universe fail2ban all 0.8.11-1 [129 kB]
    Get:2 http://archive.ubuntu.com/ubuntu/ trusty/main python-pyinotify all 0.9.4-1build1 [24.5 kB]
    Fetched 154 kB in 0s (213 kB/s)
    Selecting previously unselected package fail2ban.
    (Reading database ... 28959 files and directories currently installed.)
    Preparing to unpack .../fail2ban_0.8.11-1_all.deb ...
    Unpacking fail2ban (0.8.11-1) ...
    Selecting previously unselected package python-pyinotify.
    Preparing to unpack .../python-pyinotify_0.9.4-1build1_all.deb ...
    Unpacking python-pyinotify (0.9.4-1build1) ...
    Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
    fopen: Permission denied
    Setting up fail2ban (0.8.11-1) ...
     * Starting authentication failure monitor fail2ban                                                                                                                       [ OK ]
    Setting up python-pyinotify (0.9.4-1build1) ...

    这样如果用户5次密码输入错误,将会自动将其IP加到黑名单,禁止登录10分钟,10分钟后才可以再登录。

    转载于:https://www.cnblogs.com/wangchuanyang/p/6281869.html

  • 相关阅读:
    PCB电路板元器件布局的一般原则*(转)
    PCB Layout初学者必会知识总结(转)
    数字器件和模拟器件?
    同一原理图中怎么区分数字电路和模拟电路
    oracle 11g R2执行INSERT语句,数据库把一个汉字看做3个汉字
    SQL存储过程与函数的区别
    用户自定义函数——Oracle 11g R2
    提高使用SQL Developer进行PL/SQL编程的效率——Oracle 11g R2
    Oracle查看用户使用的表
    JAVA-Eclipse快捷键
  • 原文地址:https://www.cnblogs.com/twodog/p/12141401.html
Copyright © 2011-2022 走看看