1. NTOPNG
ntopng (de Network Top) es una herramienta que permite monitorizar en tiempo real una red. Es útil para controlar los usuarios y aplicaciones que están consumiendo recursos de red en un instante concreto y para ayudarnos a detectar malas configuraciones de algún equipo, (facilitando la tarea ya que, justo al nombre del equipo, aparece sale un banderín amarillo o rojo, dependiendo si es un error leve o grave), o a nivel de servicio.
Posee un microservidor web desde el que cualquier usuario con acceso puede ver las estadísticas del monitorizaje.
2. SERVICIOS
3. SISTEMA OPERATIVO
La presente instalación, se la hará en un Sistema Operativo Linux, Distribución Debian, Versión 7 (Wheezy).
4. PAQUETES INSTALADOS
ntopng
webmin
libpcap-dev
libglib2.0-dev
libgeoip-dev
redis-server
wget
libxml2-dev
build-essential
subversion
5. INSTALACIÓN DE NTOPNG
Previo a la instalación de ntopng, se deben instalar las siguientes dependencias:
# apt-get install libpcap-dev libglib2.0-dev libgeoip-dev redis-server wget libxml2-dev build-essential subversion
5.1. DESCARGA Y COMPILACIÓN DEL CÓDIGO
Primeramente crear un director en /usr/src ya que será en este sitio donde se descargará el código fuente para luego compilarlo:
# mkdir /usr/scr/ntopng
Una vez creado el directorio, se procede a bajar las últimas fuentes del sitio oficial, para ello, en un navegador de internet ir al sitio http://sourceforge.net/projects/ntop/files/ntopng/:
# wget http://sourceforge.net/projects/ntop/files/ntopng/ntopng-data-1.1_6932.tgz/download
Luego copiar el segundo link y hacer lo mismo:
# wget http://sourceforge.net/projects/ntop/files/ntopng/ntopng-1.1_6932.tgz/download
Después se procede a desempaquetar las fuentes:
# cd /usr/local/src
# tar -xvf *.tar.gz
# cd ntopng-data-1.1_6932
# tar -xvf *.tar.gz
# cd ntopng-data-1.1_6932
Entonces configurarlo:
# ./configure
Luego se hace un clean up:
# make clean
# cd third-party/json-c
# make clean
# cd ..
# cd third-party/LuaJIT-2.0.2
# make clean
# cd ..
# cd third-party/rrdtool-1.4.7
# make clean
# cd ..
# cd third-party/zeromq-3.2.3
# make clean
# cd ..
# cd third-party/credis-0.2.3
# make clean
# cd ..
# cd third-party/json-c
# make clean
# cd ..
# cd third-party/LuaJIT-2.0.2
# make clean
# cd ..
# cd third-party/rrdtool-1.4.7
# make clean
# cd ..
# cd third-party/zeromq-3.2.3
# make clean
# cd ..
# cd third-party/credis-0.2.3
# make clean
# cd ..
Y se compila:
# make
E instalar los módulos:
# make install
5.2. CONFIGURACIÓN DE NTOPNG
Primeramente crear el directorio requerido para:
# mkdir -p /etc/ntopng
Aquí se necesitan 2 archivos, el primero es /etc/ntopng/ntopng.start, para ello:
# nano /etc/ntopng/ntopng.start
Y agregar las líneas:
--local-networks "172.20.16.0/24"
--interface 1
--interface 1
Para ver las interfaces disponibles y opciones, se debe usar ntopng -h:
# ntopng -h
Available interfaces (-i <interface index>):
1. eth0
2. vmbr0
3. venet0
[...]
14. any
15. lo
1. eth0
2. vmbr0
3. venet0
[...]
14. any
15. lo
Entonces crear el segundo archivo /etc/ntopng/ntopng.conf y agregar la línea:
-G=/var/run/ntopng.pid
Antes de iniciar el primer inicio de ntopng, hay que asegurarse que redis server esté levantado.
# /etc/init.d/redis-server restart
Finalmente ejecutar ntopng
# ntopng /etc/ntopng/ntopng.conf
Para ver el monitor, se lo puede hacer desde cualquier navegador web, ingresando la dirección http://ip_ntopng:3000. Por default, ntopng inicia el servicio web en el puerto 3000. Luego el usuario y password por default es, user=admin, password=admin.

5.3. PERSONALIZACION DE NTOPNG
Este es un simple script de inicio el cual puede ser usado para iniciar, detener y reiniciar ntopng. Colocarlo al final del archivo /etc/init/ntopng.conf:
# nano /etc/init.d/ntopng.conf
# ntopng network flow analyzer
# by https://raymii.org
description "ntopng network flow analyzer"
start on virtual-filesystems
stop on runlevel [06]
respawn
respawn limit 5 30
limit nofile 65550 65550
setuid root
setgid root
console log
script
exec /usr/local/bin/ntopng /etc/ntopng/ntopng.conf
end script
# by https://raymii.org
description "ntopng network flow analyzer"
start on virtual-filesystems
stop on runlevel [06]
respawn
respawn limit 5 30
limit nofile 65550 65550
setuid root
setgid root
console log
script
exec /usr/local/bin/ntopng /etc/ntopng/ntopng.conf
end script
6. RECOMENDACIONES