vnStat is a console-based network traffic monitor for Linux and BSD that keeps a log of network traffic for the selected interface(s). It uses the network interface statistics provided by the kernel as information source. This means that vnStat won’t actually be sniffing any traffic and also ensures light use of system resources.

Step 1. Installation:

apt-get install vnstat

Step 2. Select the interface you wish to monitor:

for eth0 :

vnstat -u -i eth0

Repeat this changing eth0 for each interface you wish to monitor.

NOTE: Once the text database have been initialised you’re ready to monitor your bandwidth usage. The package installs a cronjob which will update the database every five minutes.

Continue Reading…

Lm-sensors is a hardware health monitoring package for Linux. It allows you to access information from temperature, voltage, and fan speed sensors. It works with most newer systems.

Step 1.  Install lm-sensors using apt-get.

Run the following command:

apt-get install lm-sensors

Step 2. Detect your sensors using the following command:

sensors-detect Continue Reading…

The following steps can be used to ssh from one system to another without specifying a password.

Step 1. On the client run the following commands:

ssh-keygen -t rsa

The output will look like this:

root@client:~# ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /root/.ssh/id_rsa.
Your public key has been saved in /root/.ssh/id_rsa.pub.
The key fingerprint is:
cd:1c:6b:4e:01:1d:8c:02:40:24:24:95:02:dc:12:7f root@CSG

Continue Reading…

You can use rbash (restricted bash shell).

If bash is started with the name rbash, or the -r option is supplied at invocation, the shell becomes restricted. A restricted shell is used to set up an environment more controlled than the standard shell. It behaves identically to bash with the exception that the following are disallowed or not performed:

* changing directories with cd
* setting or unsetting the values of SHELL, PATH, ENV, or BASH_ENV
* specifying command names containing /
* specifying a file name containing a / as an argument to the . builtin command
* Specifying a filename containing a slash as an argument to the -p option to the hash builtin command
* importing function definitions from the shell environment at startup
* parsing the value of SHELLOPTS from the shell environment at startup
* redirecting output using the >, >|, <>, >&, &>, and >> redirection operators
* using the exec builtin command to replace the shell with another command
* adding or deleting builtin commands with the -f and -d options to the enable builtin command
* Using the enable builtin command to enable disabled shell builtins
* specifying the -p option to the command builtin command
* turning off restricted mode with set +r or set +o restricted.

How to restrict user ? Continue Reading…

mod_slotlimit is an Apache module that using dynamic slot allocation algorithm and static rules, can manage resources used for each running site.

Step 1. Preparing Your system

In order to compile mod_slotlimit, you will need to have apxs2 (APache eXtension tool) installed and configured with Apache.

Use the following command to install

apt-get install apache2-prefork-dev build-essential

Step 2. Download the source package from here

wget http://kent.dl.sourceforge.net/sourceforge/mod-slotlimit/mod_slotlimit.tar.gz

Step 3. Open archive, compile and install module with those commands:
Continue Reading…