Sysadmin: block these pesky recursive DNS queries with iptables rate limiting rules

dns-reflectIf you are managing Linux server you have probably heard about recent DNS amplification attacks that were using misconfigured DNS servers.
Read more »

Centos: How to run additional apache instance on different port

In some situations you might need to configure and run additional apache httpd instance listening on different port. It is really easy to accomplish using minimal modifications to the standard CentOS apache httpd configuration and init script.
Read more »

sysadmin: Brute Force Detection – first line of defense

Most of the hosting servers nowadays are plagued by brute force attacks – too many computers running some or other botnet, too many “no brainer” scan tools are available for the interested.
There are always somebody who doesn’t bother to select good password to secure his account on the server and that could potentially bring a lot of problems not only to him but to the whole hosting company as well – imagine brute-forced password used for SMTP AUTH to send massive amounts of SPAM from the compromised server?
Now there is lot of countermeasures invented for that and here I will explain which one I prefer and why.
Read more »

Rant: Keep your critical data local

I think it’s about time I’ll add some personal rant to this blog to add some personal touch to it. Just few words about critical data storage at modern times.

I had a customer server disk failure the other day. Nothing extraordinary about that – old server circa 2006 or 2008 happily humming on old IDE western digital’s 160Gb softraid mirror.
Read more »

Sysadmin: correcting file permissions recursively from the shell

In a way of troubleshooting web application there is the step when all known reasons why it doesn’t work exhausted so they just change permissions on everything to 0777 and hope that this drastic step would fix the problem. Most likely it does not but leaves the permissions broken and and the whole site wide open.
Usually nobody cares until first break-in, then everybody start looking for the responsible parties, and host is first and most likely last to blame.
In order to avoid this problem permissions (and possibly ownership) of the web content should be corrected.
Read more »

Centos: Quick’n’easy howto install node.js

Unfortunately I could not find proper node.js RPM available, so I had to resort to building it from source. Completely against RH ideology but what else you can do?
Read more »

sysadmin: LVM expand volume by adding disk

Problem: You have LVM logical volume configured to hold a lot of data but at some point you ran out of space – you want to expand the logical volume space by adding more disks to the system.
Read more »

Sysadmin : remove all virtualmin domains in one shot

virtualminIf you need to clean up the hosting server and clean install is not an option and you know that all domains on servers were created with virtualmin you can remove all virtualmin domains in one shot using command line API:
virtualmin list-domains --name-only | xargs -n1  virtualmin delete-domain --domain
Wait a while and you are done. There are tons of useful options for command line virtualmin that you might want to explore if you are using virtualmin for your hosting domain management.

phpMyAdmin import.php Missing parameter problem solved

Very annoying phpMyadmin error. As you can see it points to the item in the phpMyAdmin FAQ page where there are list of possible causes which could lead to this kind of error. Let me give you a tip.
Read more »

Adaptec RAID arcconf – creating array from Linux command line

adaptecOne of our customers decided to add 2 more disks to his Adaptec 5085 SATA RAID controller and asked me to create RAID1 array. Of course not at the time when I could easily do it from the controller BIOS so I had to resort to Adaptec arcconf command line tool.
Read more »