Category Archives: Sysadmin - Page 5

Sysadmin: Why CentOS?

centos_icon Why CentOS as our main server farm Linux distribution? I really want this article to be pure technical, but there are some emotions attached to the question so please forgive me if I might break into rant somewhere down the road.

There were so many times when I was asked by young men with bright eyes and too much free time on their hands “Why do you use Centos for your server farm? Why not (debian,ubuntu, gentoo, insert your favorite distribution here)?” And I am so tired of explaining this decision over and over so I decided to put it together in this article and get it over with once and for all.
Read more »

Sysadmin: How to protect WordPress against “POST /wp-login.php” attacks

Wordpress attackDuring last few weeks I’ve witnessed repeated semi-successful attacks against WordPress sites. This attack is easy to recognize – server response is extremely slow and if you take a look at apache ‘server-status’ page you will see multiple ‘POST /wp-login.php’ requests from different IPs.
Read more »

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 »

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 »