installation (Python needs to be installed ) :
Tar XF fail2ban-0.8.14.tar.gz
CD fail2ban-0.8.14
./setup.py Install
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/6F/F2/wKiom1Wt_7yhLFHcAADsk0dPvV0547.jpg "title=" Picture 1.png "alt=" Wkiom1wt_7yhlfhcaadsk0dpvv0547.jpg "/>
CP Files/redhat-initd/etc/init.d/fail2ban
Chkconfig--add Fail2ban
The Service configuration directory is: /etc/fail2ban
/ETC/FAIL2BAN/ACTION.D # Action folder with default files included. iptables and Mail and other action configuration
/etc/fail2ban/fail2ban.conf # defines the fail2ban log level, log location, and sock file location
/ETC/FAIL2BAN/FILTER.D # Conditional folder containing default files. Filtering log key content Settings
/etc/fail2ban/jail.conf # Main configuration file, modular. Main settings enable ban Action Service and action threshold
/etc/rc.d/init.d/fail2ban # Startup script file
Post-installation configuration:
cat/etc/fail2ban/fail2ban.conf |grep-v ^#
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/6F/EF/wKioL1WuAbzCqcpvAADzACBiKwA969.jpg "title=" Picture 2.png "alt=" Wkiol1wuabzcqcpvaadzacbikwa969.jpg "/>
cat/etc/fail2ban/jail.conf |grep-v ^#|more
[DEFAULT] # Global Settings
Ignoreip = 127.0.0.1 /8 # Ignore IP list , not restricted by set (whitelist)
IGNOREIP = 192.168.200.157
Bantime = # shield time, unit: seconds
Findtime = # # More than the specified number of times in this time period will be banned
Max attempts
backend = auto # Log modification detection mechanism (gamin,polling , and auto these three kinds)
check configuration for each service, such as setting bantime findtime maxretry Span style= "font-family: ' The song Body '; > and global conflicts, service priority is greater than global settings  
whether this item is activated (
Filter = sshd # filter 's name, corresponding to the SS in the filter.d directory Hd.conf
Action = Iptables[name=ssh, Port=ssh, protocol=tcp] # related parameters of the action
sendmail-whois[name=ssh,dest=***@***.com,sender=root, sendername= "Fail2ban"] # The recipient that triggered the alarm
LogPath =/var/log/secure # login log file for detected system
Maxretry = 5 # Maximum number of attempts
Start:
Service Fail2ban Start # starts services (as defined in the default master configuration file)
Service iptables start #fail2ban dependent on pre- iptables
View Status:
Fail2ban-client status
to view blocked IPs :
Iptables-l
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/6F/F2/wKiom1Wt__TRGGBxAABDo5bMEpA557.jpg "title=" Picture 3.png "alt=" wkiom1wt__trggbxaabdo5bmepa557.jpg "/>
Fail2ban anti-Violence hack