GNU/Linux >> Tutoriels Linux >  >> Ubuntu

Comment installer Ntopng sur Ubuntu 18.04 LTS

Dans ce tutoriel, nous allons vous montrer comment installer Ntopng sur Ubuntu 18.04 LTS. Pour ceux d'entre vous qui ne le savaient pas, Ntopng est un outil relativement utile si vous cherchez à surveiller différents protocoles réseau sur vos serveurs. Il fournit un ensemble d'outils pour surveiller divers protocoles, variantes de trafic et, oui, la bande passante sur plusieurs périodes. Ntopng est basé sur libpcap et il a été écrit de manière portable afin de fonctionner virtuellement sur chaque Plate-forme Unix, Mac OS et sur Win32 également.

Cet article suppose que vous avez au moins des connaissances de base sur Linux, que vous savez utiliser le shell et, plus important encore, que vous hébergez votre site sur votre propre VPS. L'installation est assez simple et suppose que vous s'exécutent dans le compte root, sinon vous devrez peut-être ajouter 'sudo ‘ aux commandes pour obtenir les privilèges root. Je vais vous montrer l'installation pas à pas de Ntopng sur un serveur Ubuntu 18.04 LTS (Bionic Beaver).

Prérequis

  • Un serveur exécutant l'un des systèmes d'exploitation suivants :Ubuntu 18.04 et toute autre distribution basée sur Debian comme Linux Mint.
  • Il est recommandé d'utiliser une nouvelle installation du système d'exploitation pour éviter tout problème potentiel.
  • Accès SSH au serveur (ou ouvrez simplement Terminal si vous êtes sur un ordinateur).
  • Un non-root sudo user ou l'accès à l'root user . Nous vous recommandons d'agir en tant qu'non-root sudo user , cependant, car vous pouvez endommager votre système si vous ne faites pas attention lorsque vous agissez en tant que root.

Installer Ntopng sur Ubuntu 18.04 LTS Bionic Beaver

Étape 1. Tout d'abord, assurez-vous que tous vos packages système sont à jour en exécutant le suivant apt-get commandes dans le terminal.

sudo apt-get update
sudo apt-get upgrade

Étape 2. Installation de Ntopng sur Ubuntu 18.04 LTS.

Pour installer Ntopng, exécutez la commande suivante en tant qu'utilisateur root de votre serveur :

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

Ensuite, exécutez :

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

Étape 3. Configurez Ntopng.

Créer un fichier de configuration Ntopng, Dans cet article, nous utilisons nano comme éditeur de texte. Vous pouvez utiliser votre éditeur de texte préféré pour créer des fichiers de configuration 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=

Créez le fichier 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

Pour voir toutes les interfaces et options disponibles, utilisez le ntopng -h choix :

sudo ntopng -h

Démarrer le démon du serveur Ntopng :

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

Étape 4. Accéder à Ntopng.

Vous pouvez maintenant tester votre application Ntopng en tapant http://your-server-ip-address:3000 . Vous verrez la page de connexion Ntopng. Pour la première fois, vous pouvez utiliser l'utilisateur "admin" et le mot de passe "admin".

Félicitations ! Vous avez installé Ntopng avec succès. Merci d'avoir utilisé ce didacticiel pour installer l'analyse de trafic et la collecte de flux Web à haut débit Ntopng sur votre système Ubuntu 18.04 LTS Bionic Beaver. Pour une aide supplémentaire ou informations utiles, nous vous recommandons de consulter le site officiel de Ntopng.


Ubuntu
  1. Comment installer Docker sur Ubuntu 22.04 / 20.04 LTS

  2. Comment installer PlayOnLinux sur Ubuntu 20.04 LTS

  3. Comment installer MariaDB dans Ubuntu 20.04 LTS

  4. Comment installer Ansible sur Ubuntu 20.04 LTS / 21.04

  5. Comment installer Minikube sur Ubuntu 20.04 LTS / 21.04

Comment installer Spotify sur Ubuntu 18.04 LTS / 17.10 et Ubuntu 16.04

Comment installer Ubuntu Server 18.04 LTS

Comment installer Ntopng sur Ubuntu 20.04 LTS

Comment installer Go sur Ubuntu 22.04 LTS

Comment installer Go sur Ubuntu 18.04 LTS

Comment installer Go sur Ubuntu 20.04 LTS