Dealing with dos and brute force attacks can be a daunting challenge. You can manually adjust your firewall to block particular ip addresses, but why not automate the process? What if a program can monitor your authentication, and other log files for suspicious activity? In these log files is a tremendous amount of info about failed login attempts, and how many times an ip address connects to your web server. Using this information a program can automatically adjust your firewall to block the offending ip addresses.
Fail2ban does just this. The program automatically monitors the log files of many programs. Most important is apache, and ssh.
http://www.fail2ban.org/wiki/index.php/Main_Page
Share, Enjoy, and Support:
To install type:
sudo apt-get install libapache2-mod-cband
Then add the following to your apache2.conf file:
LoadModule cband_module /usr/lib/apache2/modules/mod_cband.so
On Fedora there is modules folder link in the /etc/httpd configuration folder.
This blog post details configuring a virtualhost with cband throttling:
http://www.bgevolution.com/blog/index.php/apache-mod-cband/
Share, Enjoy, and Support:
Checking what ports are open on your system to make sure everything is closed is important. This quick Mcafee utility will tell you if your Apache default port 80 is open or not. For instance this is useful to determine if Apache is properly configure and listening on the intended port 80.
http://www.hackerwatch.org/probe/
Click “simple probe” and it will do a basic port scan of your system
Share, Enjoy, and Support:
Debian is great to minimize software on the hard drive. With a minimal Debian installation, and the following apt commands, you will have a completely setup LAMP system in about 5-10 minutes. Simply run the following commands to install the appropriate software.
This will install apache with php support:
apt-get install apache2 php5 libapache2-mod-php5
This will install mysql with php support:
apt-get install mysql-server mysql-client php5-mysql
These two apt installation lines will take care of everything, and your Debian system will work just as a Ubuntu LAMP installation.
Share, Enjoy, and Support:
Don’t scramble over what software you need to setup a webserver. The Ubuntu Server edition, during installation, offers the LAMP software package option. Installing this will automatically have a complete Apache system up and running in no time. The server will be complete with Mysql database support, and PHP dynamic website capabilities
What to use for a complete server package is really a no brainer; Ubuntu Server Edition. You can also try Debian Eth for some fun. Since Ubuntu is based on Debian you will not find much distinction, and they will both do the same thing, you will notice they just put slightly different finishing touches to create a respective brand.
Share, Enjoy, and Support:
There is a kick ass program called sshfs. It uses the fuse module to mount a remote directory, via ssh, on the local computer. To begin simply create a folder, on your local computer, that you will use as the mount point of your external directory. Then install sshfs. Debian distributions have it in the repositories:
sudo apt-get install sshfs
The command is used basically the same way as ssh, and scp. To mount an external directory you can do the following:
sshfs user@othermachineip:/directory /home/user/remotedirectory
The apache configuration option “documentroot” only can take a local directory as a value. To compensate, you can create a locally mounted remote partition, via sshfs, for use as an apache document root. In this way you will be using one computer as the web server, and a completely separate computer for file storage.
Personally, I think this is useful if a web service you offer allows uploads, and you want to have an external location to store them as to not clutter the server hard drive
Share, Enjoy, and Support: