Archive for November, 2008

Install and configure ntop for network stats, monitoring

ntop is one of the most powerful and easy to use tool for network traffic statistics viewing and analysis.

Here are quick steps to install it on CentOS 5.2 box (upgraded from 5.0 release).

Try to install in easy way:
# yum install ntop

Most probably yum get failed for missing dependencies such as rrdtool package. If this is the case, download and install this package manually:

# cd /usr/src
# wget http://dag.wieers.com/rpm/packages/rrdtool/rrdtool-1.2.23-1.el5.rf.i386.rpm
# rpm -ivh rrdtool-1.2.23-1.el5.rf.i386.rpm --nodeps

I’ve used –nodeps option in rpm command to ignore any dependencies. Yum will take care of that, we just need rrdtool as of now.

Block IP Address in FreeBSD

The simple method is to add the offensive IP in your /etc/hosts.allow file and deny any access to that:

# ee /etc/hosts.allow (and add following line in it)
all: :deny

You can also use one quick and dirty hack:

# route add 127.0.0.1

All ACKs to specified IP address would be headed to 127.0.0.1, means going nowhere and no TCP connections could be established this way. No UDP or ICMP packets would reach the blocked IP address. You can also block a whole subnet this way. Though, it’ll not stop the traffic from that IP.

Change TimeZone in your Linux Server quickly:

In any Red Hat based (RHEL/CentOS/Fedora) Server, change time zone to PST/PDT quickly:

# mv /etc/localtime /etc/localtime.old && ln -s /usr/share/zoneinfo/PST8PDT /etc/localtime

or set zone to IST:
# mv /etc/localtime /etc/localtime.old && ln -s /usr/share/zoneinfo/Calcutta /etc/localtime

or Set the TZ environment variable for quick display time according to preferred Time Zone:
# export TZ=America/Los_Angeles
and then view the output of date command.

or If you have the utility rdate, update the current system time by executing
# rdate -s pool.ntp.org

or You can execute ‘system-config-date’ for setting up date/time and time zone:
# system-config-date

Get Adobe Flash playerPlugin by wpburn.com wordpress themes