Ntop

From aldeid
Jump to navigation Jump to search
DRAFT
This page is still a draft. Thank you for your understanding.

Description

Ntop is a network traffic probe that shows the network usage through a web interface.

This tutorial, heavily inspired from this source, explains how to install and configure Ntop.

Installation

Prerequisites

First install following packages:

# aptitude install libpcap-dev libgdbm-dev build-essential libtool \
  automake autoconf subversion zlib1g-dev autopoint libxml2-dev \
  libpango1.0-dev  python-dev libgeoip-dev

Install RRDTool:

# cd /usr/local/src/
# wget http://oss.oetiker.ch/rrdtool/pub/rrdtool.tar.gz
# tar xvzf rrdtool.tar.gz
# cd rrdtool-1.4.5/
# ./configure
# make
# make install

Installation of Ntop

First download and compile Ntop:

# cd /usr/local/src/
# wget http://mesh.dl.sourceforge.net/project/ntop/ntop/Stable/ntop-4.0.3.tgz
# tar xvzf ntop-4.0.3.tgz
# cd ntop-4.0.3/
# ./autogen.sh
# ./configure --prefix=/opt/ntop --localstatedir=/data \
  --with-rrd-home=/opt/rrdtool-1.4.5/ --sysconfdir=/etc
# make
# make install

Then update ldconfig:

# echo "/usr/local/lib" > /etc/ld.so.conf.d/ntop
# ldconfig

Add the ntop user and grant appropriate privileges:

# useradd -M -s /bin/false -r ntop
# chown -R ntop:root /usr/local/share/ntop
# chown -R ntop /usr/local/var/ntop/
# chown -R ntop /data/ntop

Start ntop

Before you start ntop for the first time, you must setup the administrator password for the web interface:

# /opt/ntop/bin/ntop --set-admin-password=P4ssw0rd

Then start ntop (following example shows how to start ntop to listen on port 3001/tcp and as a daemon):

# /opt/ntop/bin/ntop -w 3001 -d