GNU/Linux >> Tutoriales Linux >  >> Ubuntu

Cómo instalar Ntopng en Ubuntu 18.04 LTS

En este tutorial, le mostraremos cómo instalar Ntopng en Ubuntu 18.04 LTS. Para aquellos de ustedes que no sabían, Ntopng es una herramienta relativamente útil si está buscando monitorear diferentes protocolos de red en sus servidores. Proporciona un montón de herramientas para monitorear varios protocolos, variantes de tráfico y sí, ancho de banda en múltiples marcos de tiempo. Ntopng se basa en libpcap y se ha escrito de manera portátil para ejecutarse virtualmente en cada Plataforma Unix, Mac OS y también en Win32.

Este artículo asume que tiene al menos conocimientos básicos de Linux, sabe cómo usar el shell y, lo que es más importante, aloja su sitio en su propio VPS. La instalación es bastante simple y asume que se están ejecutando en la cuenta raíz, si no, es posible que deba agregar 'sudo ' a los comandos para obtener privilegios de root. Le mostraré la instalación paso a paso de Ntopng en un servidor Ubuntu 18.04 LTS (Bionic Beaver).

Requisitos previos

  • Un servidor que ejecuta uno de los siguientes sistemas operativos:Ubuntu 18.04 y cualquier otra distribución basada en Debian como Linux Mint.
  • Se recomienda que utilice una instalación de sistema operativo nueva para evitar posibles problemas.
  • Acceso SSH al servidor (o simplemente abra Terminal si está en una computadora de escritorio).
  • Un non-root sudo user o acceder al root user . Recomendamos actuar como un non-root sudo user , sin embargo, puede dañar su sistema si no tiene cuidado al actuar como root.

Instalar Ntopng en Ubuntu 18.04 LTS Bionic Beaver

Paso 1. Primero, asegúrese de que todos los paquetes de su sistema estén actualizados ejecutando el siguiente apt-get comandos en la terminal.

sudo apt-get update
sudo apt-get upgrade

Paso 2. Instalación de Ntopng en Ubuntu 18.04 LTS.

Para instalar Ntopng, ejecute el siguiente comando como usuario raíz de su servidor:

wget http://apt.ntop.org/18.04/all/apt-ntop.deb
dpkg -i apt-ntop.deb

Luego, ejecute:

apt-get update
apt-get install pfring-dkms nprobe ntopng n2disk cento

Paso 3. Configurar Ntopng.

Cree un archivo de configuración de Ntopng. En este artículo, usamos nano como editor de texto. Puede usar su editor de texto favorito para crear archivos de configuración de Ntopng:

sudo nano /etc/ntopng/ntopng.conf
# /etc/ntopng/ntopng.conf
#
#        The  configuration  file is similar to the command line, with the exception that an equal
#        sign '=' must be used between key and value. Example:  -i=p1p2  or  --interface=p1p2  For
#        options with no value (e.g. -v) the equal is also necessary. Example: "-v=" must be used.
#
#
#       -G|--pid-path
#        Specifies the path where the PID (process ID) is saved.
#
-G=/var/tmp/ntopng.pid
#
#       -e|--daemon
#        This  parameter  causes ntop to become a daemon, i.e. a task which runs in the background
#        without connection to a specific terminal. To use ntop other than as a casual  monitoring
#        tool, you probably will want to use this option.
#
-e=
#
#       -i|--interface
#        Specifies  the  network  interface or collector endpoint to be used by ntopng for network
#        monitoring. On Unix you can specify both the interface name  (e.g.  lo)  or  the  numeric
#        interface id as shown by ntopng -h. On Windows you must use the interface number instead.
#        Note that you can specify -i multiple times in order to instruct ntopng to create  multi‐
#        ple interfaces.
#
-i=1
#
#       -w|--http-port
#        Sets the HTTP port of the embedded web server.
#
-w=3000
#
#       -m|--local-networks
#        ntopng determines the ip addresses and netmasks for each active interface. Any traffic on
#        those  networks  is considered local. This parameter allows the user to define additional
#        networks and subnetworks whose traffic is also considered local in  ntopng  reports.  All
#        other hosts are considered remote. If not specified the default is set to 192.168.1.0/24.
#
#        Commas  separate  multiple  network  values.  Both netmask and CIDR notation may be used,
#        even mixed together, for instance "131.114.21.0/24,10.0.0.0/255.0.0.0".
#
-m=192.168.1.0/24
#
#       -n|--dns-mode
#        Sets the DNS address resolution mode: 0 - Decode DNS responses  and  resolve  only  local
#        (-m)  numeric  IPs  1  -  Decode DNS responses and resolve all numeric IPs 2 - Decode DNS
#        responses and don't resolve numeric IPs 3 - Don't decode DNS responses and don't  resolve
#
-n=1
#
#       -S|--sticky-hosts
#        ntopng  periodically purges idle hosts. With this option you can modify this behaviour by
#        telling ntopng not to purge the hosts specified by -S. This parameter requires  an  argu‐
#        ment  that  can  be  "all"  (Keep  all hosts in memory), "local" (Keep only local hosts),
#        "remote" (Keep only remote hosts), "none" (Flush hosts when idle).
#
-S=
#
#       -d|--data-dir
#        Specifies the data directory (it must be writable). Default directory is ./data
#
-d=/var/tmp/ntopng
#
#       -q|--disable-autologout
#        Disable web interface logout for inactivity.
#
-q=

Crear archivo ntopng.start:

sudo nano /etc/ntopng/ntopng.start

##Add this line##

--local-networks "192.168.0.0/24"  ## give your local IP Ranges here.
--interface 1

Para ver todas las interfaces y opciones disponibles, use ntopng -h opción:

sudo ntopng -h

Iniciar el demonio del servidor Ntopng:

systemctl start ntopng.service
systemctl start redis-server.service

Paso 4. Acceso a Ntopng.

Ahora puede probar su aplicación Ntopng escribiendo http://your-server-ip-address:3000 . Verá la página de inicio de sesión de Ntopng. Por primera vez, puede usar el usuario 'admin' y la contraseña 'admin'.

¡Felicitaciones! Ha instalado Ntopng con éxito. Gracias por usar este tutorial para instalar Ntopng de alta velocidad basado en la web de análisis de tráfico y recopilación de flujo en su sistema Ubuntu 18.04 LTS Bionic Beaver. Para obtener ayuda adicional o información útil, le recomendamos que consulte el sitio web oficial de Ntopng.


Ubuntu
  1. Cómo instalar Docker en Ubuntu 22.04/20.04 LTS

  2. Cómo instalar PlayOnLinux en Ubuntu 20.04 LTS

  3. Cómo instalar MariaDB en Ubuntu 20.04 LTS

  4. Cómo instalar Ansible en Ubuntu 20.04 LTS / 21.04

  5. Cómo instalar Minikube en Ubuntu 20.04 LTS / 21.04

Cómo instalar Spotify en Ubuntu 18.04 LTS / 17.10 y Ubuntu 16.04

Cómo instalar Ubuntu Server 18.04 LTS

Cómo instalar Ntopng en Ubuntu 20.04 LTS

Cómo instalar Go en Ubuntu 22.04 LTS

Cómo instalar Go en Ubuntu 18.04 LTS

Cómo instalar Go en Ubuntu 20.04 LTS