PART IV: BETTER THAN NOTHING SECURITY

Shamlessly grep’d from the http://www.hackerfactor.com/blog/ There be good stuff here… In my last three entries about minimal web server security, I covered security by obscurity methods to deter a blind attacker and very basic methods to prevent unintentional information disclosure by blocking open directory browsing. The best solution to prevent open directory browsing is simply…


Delete Files Older Than x Days on Linux

The find utility on linux allows you to pass in a bunch of interesting arguments, including one to execute another command on each file. We’ll use this in order to figure out what files are older than a certain number of days, and then use the rm command to delete them. Command Syntax find /path/to/files*…


Access MySQL remotely via SSH

From Yahoo answers So you’ve got MySQL on your web server, but it’s only opened to local ports by default for security reasons. If you want to access your database from a client tool like the MySQL Query Browser, normally you’d have to open up access from your local IP address… but that’s not nearly…


WHM Email Relayers issue

When you check the email relayers option within WHM then it shows empty. You can try the following change on your server. Using pico or vim pico /etc/passwd and search for the following entry. mailnull:x:47:47::/var/spool/mqueue:/sbin/nologin Change it to mailnull:x:47:12::/var/spool/mqueue:/sbin/nologin Restart the eximstats on the server, /scripts/restartsrv_eximstats The email relayers should now be visible within WHM.


Password protect a directory

If you would like to password protect a directory, create a .htaccess file in a directory which you wish to protect and insert the following parameters: AuthUserFile /home/username/.htpasswd AuthGroupFile /dev/null AuthName “Private Area” AuthType Basic require valid-user > replace the “username” with the actual username. Create a .htpasswd file and place the username/password in the…


SSH: POSSIBLE BREAK-IN ATTEMPT!

What is “SSH: POSSIBLE BREAK-IN ATTEMPT!”? You may receive such a warning message when you SSH to a remote host. It is not as threatening as it sounds. When you SSH to a host, a series of checks are made to make sure you are connecting to the host you are expecting to connect to….


Kernel Support for 4GB+ RAM

If you have 4 GB or more RAM on a Linux server, it may not show up the in the server. In this case you need to install PAE kernel package. This kernel package will support upto 64GB of memory. The non-PAE kernel can only address up to 4GB of memory. You can install the…


Apache: No space left on device

You may receive an error such as the one above while restarting Apache. Most people tend to believe that they are running out of disk space, but that is not the case. The apache error logs will show errors similar to the ones below and you may be surprised to know that this is not…


Using dpkg for new install

After every new OS install, you usually will need to download all the necessary packages that were in the previous installation to maintain the continuity of your old system build. This is definitely time consuming and also trying to remember all of the packages used on the previous system can be difficult, to say the…


Enabling Berkeley DB support in Apache

From eapps.com In order to compile the subversion module for Apache, Apache has to have been built with Berkeley DB support enabled. Because of debates over license conflicts, this option is now disabled by default. Therefore, it’s likely not enabled in your Apache server. You can check whether the Berkeley DB support was enabled in…