BlockHosts
Details
| Last Update: | 2008-01-15 17:01:09 |
| Version: | 2.3.1 |
| License/Program Type: | Public Domain |
| Publisher: | Avinash Chopde |
| Price: | $0.00 |
Description:
BlockHosts is a script to record how many times "sshd" or
"proftpd" is being attacked, and when a particular IP address
exceeds a configured number of failed login attempts, that IP
address is added to /etc/hosts.allow (or optionally to any other
file).
Requires python version 2.3 at a minimum, and runs on Unix-like
machines only.
The BlockHosts script is most suitable for home Linux users,
who need to keep ssh/ftp ports open.
Blocks IP addresses based on SSH or FTP incoming login
failures, by looking at SSHD and ProFTPD logs, and updating
hosts.allow as needed.
If you are a Linux user running SSH server, it is likely that
you have been probed by script kiddies, and your daily LogWatch
emails will show 100-150 login attempts in a short interval, before
they go away.
There is no option in OpenSSH to make it difficult to slow down
repeated login attempts coming from one IP address -- logins occur
at a pretty fast clip -- one attempt every few seconds.
For a home or small business linux user at least, it does not
make sense to keep the door open for logins for so long. Use this
script, and see the daily LogWatch email notifications now showing
only 7-9 login attempts, and remote hosts start getting "Refused
incoming connection" messages.
Then, reading the daily LogWatch emails is not terrifying at
all, in fact, it may be fun to see these script kiddies get
blocked!
- Be sure to acquaint yourself with material available on the
web, related to security, and denial-of-service. In particular, see
the discussion in the OpenSSH mailing list related to SSHD blocking
and FAIL_DELAY:
- Make your sshd/proftpd configurations as tight as possible.
For example, for sshd - turn off root logins (PermitRootLogin), use
the AllowUsers keyword to only allow one or a select usernames to
be accepted. As far as possible, try to avoid common usernames,
make even the user names hard to guess. For ProFTPD, use
/etc/ftpusers, which contains names of users that will not be
allowed to use FTP, root should be in there.
- Last, but not least - always use strong passwords! That is
the only real protection.
blockhosts.py scans system logs, and looks for failed login
attempts. It keeps a record of the number of times a particular IP
address had a failed login. When the count exceeds a configured
value, that IP address is added to /etc/hosts.allow with a deny
flag, so the next time that IP address attempts to connect to that
box, they will get a refused connection message.
Requirements:
· Python, version 2.3 or later.
· TCP_WRAPPERS should be enabled for all services, this
will allows use of /etc/hosts.deny and /etc/hosts.allow files.
· IPv4 addesses supported, IPv6 not supported at this
time.
· OpenSSH and proftpd logs can be scanned, other
implementations or services may require adding pattern matching
options to the default blockhosts.py configuration, see the
appropriate section in blockhosts.cfg configuration file.
What's New in This Release:
· The log match rules were updated to accept lines
without a colon (:) after the [pid].
· This is seen in some Debian and Ubuntu installs, at
least.
0 comments
Add to
BlockHosts Version History
Related Software
|
|
From category: System-Administration |
| Alba-Experiment 2006.04.06 is system administration software developed by Alba-Experiment Team. Alba-Experiment is an implementation of Gentoo over Solaris or Portage for Solaris. Alba-Expe... |
|
|
From category: Emulators |
| Yabause is a Sega Saturn emulator.... |
|
|
From category: Installer-Setup |
| CruxPorts4Slack 20061113 is installer/setup software developed by Henry Jensen. CruxPorts4Slack adapts the \"ports\" and \"pkgmk\" commands to allow the use of ports repositories for Crux with Slac... |
|
|
From category: System-Administration |
| DenyHosts 2.6 is system administration software developed by Phil Schwartz. DenyHosts is a script intended to be run by Linux system administrators to help thwart ssh server attacks. If you\... |
|
|
From category: Operating-Systems-Linux-Distri |
| College Linux 2.5 (Obi Wan) is operating systems linux distri software developed by CollegeLinux. The aim of this experimental Linux distribution is to provide to RKC students andto the student pop... |
|
|
From category: Shells |
| eltclsh 1.5 is shells software developed by Anthony Mallet. eltclsh (editline tcl shell) is an interactive shell for the TCL programming language. It provides command line editing, history browsing... |
|
|
From category: Archiving |
| Areca 4.1.5 is archiving software developed by Olivier PETRUCCI. Areca is an Open Source file backup software developped in Java. Here are some key features of \"Areca\": Archives Compre... |
|
|
From category: Shells |
| Apparix 06-314 is shells software developed by Stijn van Dongen. Apparix combines the properties of the cdargs utility and the CDPATH shell mechanism for fast navigation through the file system. \... |
|
|
From category: Operating-Systems-Linux-Distri |
| DeLi Linux 0.7.1 is operating systems linux distri software developed by DeLi Linux Team. DeLi Linux stands for \"Desktop Light\" Linux. It is a Linux Distribution for old computers, from 486 to Pe... |
|
|
From category: Operating-Systems |
| Parted Magic is a ~30mb LiveCD/USB with it\'s only purpose being partitioning hard drives.... |
|
|
From category: Benchmarks |
| coNCePTuaL 0.8.1 is benchmarks software developed by Scott Pakin. coNCePTuaL software is a tool designed to facilitate rapidly generating programs that measure the performance and/or test the corre... |
|
|
From category: Networking |
| comserv 1.4.3 is networking software developed by Brian S. Dean. COMSERV is a program that allows you to talk to a network terminal server such as a Xyplex MAXserver 1600. The handy thing ab... |
|
|
From category: Diagnostics |
| Dstat 0.6.4 is diagnostics software developed by dag. Dstat project is a versatile replacement for iostat, vmstat and ifstat. Dstat overcomes some of the limitations and adds some extra features.... |
|
|
From category: Networking |
| WinShares is a Linux program that scans the network and mounts all Windows and Samba shares available.... |
|
|
From category: Filesystems |
| compFUSEd 200623912 is filesystems software developed by Johan Parent. Since there are none right now for Linux [well there still is ext2comp, but ext2 is getting a bit old and the patches are NOT... |
Leave a comment