RWSecure 0.2 reviewDownload
RWSecure application parses the /var/log/secure file for invalid usernames or failed passwords to help protect against brute force an
RWSecure application parses the /var/log/secure file for invalid usernames or failed passwords to help protect against brute force and similar attacks.
If there are more than three invalid or failed attempts by one IP, it will add that IP to your /etc/hosts.deny file.
Put this file in any directory of your choice and use the cron to run this program every
few minutes, hours, or days... adding this entry to your crontab will have it run every 5 minutes:
*/5 * * * * root /yourdirectory/rwsecure
This is just an example of a way to run it without user intervention.
Suggest you stop logging info level messages from auth, or log them in a seperate file, if you run this program every few minutes as misc cron messages can start to fill your logs.
Program will append to /etc/hosts.deny (however, this file can be changed by changing the variable in rwsecure, just vi rwsecure and make change the HostsDenypath to whatever you want)
Sample program output:
ALL: 18.104.22.168 # Added by rwsecure on Sep 17 18:18:01 2005
ALL: 22.214.171.124 # Added by rwsecure on Sep 18 04:42:01 2005
ALL: 126.96.36.199 # Added by rwsecure on Sep 18 06:22:01 2005
ALL: 188.8.131.52 # Added by rwsecure on Sep 19 04:26:01 2005
ALL: 184.108.40.206 # Added by rwsecure on Sep 21 09:26:01 2005
What's New in This Release:
The following three variables were added to make the script more customizable: "attempts", the number of attempts before blocking; "secureLogPath", the securelog path; and "HostsDenypath", the location of hosts.deny.
RWSecure 0.2 search tags