Difference between revisions of "Fail2ban"

From Nuclear Physics Group Documentation Pages
Jump to navigationJump to search
Line 18: Line 18:
 
#Run iptables -L and find the ip address you want to unban. Note: the chain listed in iptables is not the jail the ip is contained. Check the fail2ban config if you don't know the jail name.
 
#Run iptables -L and find the ip address you want to unban. Note: the chain listed in iptables is not the jail the ip is contained. Check the fail2ban config if you don't know the jail name.
 
#Run the following commands as root.
 
#Run the following commands as root.
fail2ban-client get <jailname> actionunban <ip address>
+
#*fail2ban-client get <jailname> actionunban <ip address>
fail2ban-client reload
+
#*fail2ban-client reload

Revision as of 15:25, 19 January 2012

This article contains instructions on installing and configuring fail2ban and also some useful tips for administering it.

Installing

  1. The fail2ban RPM is available from the EPEL package repository. Use the following instructions to make this package available to yum.
    • Download the EPEL repository install RPM:
      RHEL 5
      RHEL 6
    • Install the rpm:
      rpm -ivh epel-release-<version>.noarch.rpm
  2. Install fail2ban via yum:
    yum install fail2ban

Configuring

  1. Start the fail2ban service.
    • service fail2ban start
  2. Set fail2ban to start at boot time.
    • chkconfig fail2ban on

Unbanning

  1. Run iptables -L and find the ip address you want to unban. Note: the chain listed in iptables is not the jail the ip is contained. Check the fail2ban config if you don't know the jail name.
  2. Run the following commands as root.
    • fail2ban-client get <jailname> actionunban <ip address>
    • fail2ban-client reload