Serveur de Logs

Serveur de Logs:

A quoi ça sert ?

Un serveur de log (ou serveur de journalisation) est un système centralisé qui collecte, stocke, gère et analyse les logs (journaux d’événements) générés par les applications, les serveurs, les équipements réseau ou les services informatiques.

Compétences :

Bloc 1 :

Bloc 2 :

Bloc 3


Après installation de la VM

  • Sur la débian

  • allez sur Gestionnaire de paquets Synaptic

  • Puis ajouter : les 2 http cocher<

  • Et désactiver les celui cocher de base

Pasted image 20251210092006.png


Installation de Mariadb

Pasted image 20251210092600.png

  • sudo apt-get install -y mariadb-server

  • sudo systemctl enable --now mariadb

  • sudo mariadb-secure-installation

Enter current password for root (enter for none):
OK, successfully used password, moving on...

Setting the root password or using the unix_socket ensures that nobody
can log into the MariaDB root user without the proper authorisation.

*You already have your root account protected, so you can safely answer 'n'.

  • Switch to unix_socket authentication [Y/n] n
    *... skipping.

*You already have your root account protected, so you can safely answer 'n'.

  • Change the root password? [Y/n] Y
    New password: ****

    Re-enter new password: **
    Password updated successfully!
    Reloading privilege tables..
    ... Success!

*By default, a MariaDB installation has an anonymous user, allowing anyone
to log into MariaDB without having to have a user account created for
them. This is intended only for testing, and to make the installation
go a bit smoother. You should remove them before moving into a
production environment.

  • **Remove anonymous users? [Y/n] y
    ... Success!

*Normally, root should only be allowed to connect from 'localhost'. This
ensures that someone cannot guess at the root password from the network.

  • **Disallow root login remotely? [Y/n] y
    ... Success!

*By default, MariaDB comes with a database named 'test' that anyone can
access. This is also intended only for testing, and should be removed
before moving into a production environment.

  • *Remove test database and access to it? [Y/n] y
    - Dropping test database...
    ... Success!
    - Removing privileges on test database...
    *... Success!

*Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.

  • *Reload privilege tables now? [Y/n] y
    ... Success!

*Cleaning up...

*All done! If you've completed all of the above steps, your MariaDB
installation should now be secure.

Pasted image 20251210093234.png

  • mariadb -V

  • mariadb -u root -p

Pasted image 20251210093622.png

Pasted image 20251210093743.png

  • systemctl restart mariadb

Installation de rsyslog

apt-get install rsyslog-mysql -y
Pasted image 20251210094136.png
Pasted image 20251210094155.png

Pasted image 20251210094322.png

enlever les 2 #
Pasted image 20251210094424.png

ajouter cet ligne
Pasted image 20251210094627.png

puis ctrl O et ctrl X
Pasted image 20251210094758.png


Installation LogAnalyseur

  • cd /tmp

Pasted image 20251210103941.png

  • tar xzf loganalyzer-4.1.13.tar.gz
  • cd loganalyzer-4.1.13
  • dir
    Pasted image 20251210104715.png
  • chown -R www-data:www-data /var/www/html/loganalyzer

Puis accéder à cet page
Pasted image 20251210124921.png


STS Interne

Pasted image 20251210121426.png

  • Créer un objet Server Log avec l'@IP du serveur log ici : 192.168.32.179

Pasted image 20251210122353.png

et on peut voir les logs de Stormshield


Sts Externe

Pasted image 20251210123816.png

Sur l'externe pour pouvoir sur le serveur de Logs il faut ajouter une règle de filtrage pour pouvoir les voir mais faut attendre que la prof nous montres quelles règles et quelles manipulations faire


Switch Cisco

  • Ajouter le Serveur de LOG sur le Cisco
  • Administration
  • System Log
  • Remote Log Server
  • puis ajouté notre serveur de Logs en mettant l'adresse IP du Switch
    Pasted image 20251210122958.png

test sur le serverLog:

Pasted image 20251210123301.png


Conclusion

Je n'ai malheureusement pas réussi à installer loganalyzer car ça me mettait index done file après du coup j'ai pris la VM de la professeure puis j'ai bien réussi par la suite à ajouter les logs des différents équipement sur le Serveur de Logs.