Skip to content

NANDILLONMaxence/Projet-LPIC-102

Repository files navigation

Projet LPIC102 - Administration Linux Avancée

Contexte

Ce projet s'inscrit dans le cadre de notre formation ESGI3 et vise à mettre en pratique les compétences en administration Linux avancée à travers la configuration d'un environnement client-serveur complet sous Debian.

L'objectif est de créer une infrastructure fonctionnelle permettant :

  • La synchronisation horaire réseau via NTP
  • L'échange sécurisé de mails
  • Le renforcement de la sécurité système
  • La surveillance centralisée des activités

Fonctionnalités principales

Le projet propose une solution complète avec :

  • Synchronisation temporelle : Serveur NTP avec Chrony et clients synchronisés
  • Messagerie sécurisée : Configuration de Postfix avec relais Gmail
  • Sécurité renforcée :
    • Restrictions horaires via PAM
    • Politique stricte de mots de passe
    • Alertes par mail pour événements critiques
  • Monitoring : Tableau de bord graphique (Python/Tkinter) affichant :
    • Métriques système (CPU, RAM, réseau)
    • Logs PAM et Postfix en temps réel
    • Fuseau horaire actif

Installation

Prérequis

  • VirtualBox 7.0+
  • Vagrant 2.3+
  • 4GB de RAM minimum

1. Installation des dépendances

Depôt :

Linux Ubuntu/Debian

wget -O - https://apt.releases.hashicorp.com/gpg | sudo gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(grep -oP '(?<=UBUNTU_CODENAME=).*' /etc/os-release || lsb_release -cs) main" | 
sudo tee /etc/apt/sources.list.d/hashicorp.list
sudo apt update && sudo apt install vagrant
vagrant plugin install vagrant-vbguest

Autre système

2. Déploiement de l'environnement

Note : N'oubliez pas de compléter le fichier secrets.env avant de lancé la création du lab.

git clone https://github.com/NANDILLONMaxence/Projet-LPIC-102.git
cd Projet-LPIC-102
vagrant up

Note : Lors du premier démarrage, répondre y à la question "Souhaitez-vous installer les paquets pour serveur/client ?"

3. Accès aux machines

  • Serveur :
vagrant ssh srv-1
  • Client :
vagrant ssh cli-1

Utilisation

Scripts disponibles

Sur le serveur (srv-1) :

# Emplacement script de configuration
cd /home/vagrant/SCR_SRV/

# Configuration Postfix
sudo ./01_Install_postfix_srv.bash

# Configuration Chrony
sudo ./02_Install_chrony_srv.bash

# Configuration NTP
sudo ./03_Config_fuseau_horaire_srv.bash

# Configuration PAM (event, alert)
sudo ./04_Config_pam_event_alert_srv.bash

# Configuration PAM restriction (horaire, mdp)
sudo ./05_Config_pam_restrictions_horaires_srv.bash

# Configuration interface x11
sudo ./06_Config_x11_forwarding.bash
# Emplacement script de test
cd /home/vagrant/SCR_SRV/TEST/

# Test complet
sudo ./00_TEST_complet.bash

# Test ntp
sudo ./01_TEST_ntp_srv.bash

# Test postfix
sudo ./02_TEST_postfix_srv.bash

# Test PAM (event, alert)
sudo ./03_TEST_pam_srv.bash

# Test PAM restriction (horaire, mdp)
sudo ./04_TEST_alertes_systeme.bash

Sur le client (cli-1) :

# Emplacement script de configuration
cd /home/vagrant/SCR_CLI/

# Configuration Postfix
sudo ./01_Install_postfix_cli.bash

# Configuration Chrony
sudo ./02_Install_chrony_cli.bash

# Configuration NTP
sudo ./03_Config_fuseau_horaire_cli.bash
# Emplacement script de test
cd /home/vagrant/SCR_CLI/TEST/

#  Test ntp
sudo ./01_TEST_ntp_cli.bash

# Test postfix
sudo ./02_TEST_postfix_cli.bash

# Test connection, syncro horaire
sudo ./03_TEST_fuseau_horaire_cli.bash

Lancement du tableau de bord

Sur le serveur :

python3 /SCR_SRV/Dashboard.py

ou

Dashboard.py

Ou depuis votre PC connecter vous au serveur en passant par la vm cli-1

(TON PC → SSH → CLIENT → SSH → SERVEUR)

ssh -X -J vagrant@CLIENT vagrant@SERVEUR"

Tests complets

Sur le serveur :

# Emplacement script de test
cd /home/vagrant/SCR_SRV/TEST/

# Test complet
sudo ./00_TEST_complet.bash

Architecture technique

Client Debian (cli-1)
├── SCR_CLI
│   ├── 01_Install_postfix_cli.bash
│   ├── 02_Install_chrony_cli.bash
│   ├── 03_Config_fuseau_horaire_cli.bash
│   └── TEST
│       ├── 01_TEST_ntp_cli.bash
│       ├── 02_TEST_postfix_cli.bash
│       └── 03_TEST_fuseau_horaire_cli.bash
Serveur Debian (srv-1)
├── SCR_SRV
│   ├── 01_Install_postfix_srv.bash
│   ├── 02_Install_chrony_srv.bash
│   ├── 03_Config_fuseau_horaire_srv.bash
│   ├── 04_Config_pam_event_alert_srv.bash
│   ├── 05_Config_pam_restrictions_horaires_srv.bash
│   ├── 06_Config_x11_forwarding.bash
│   ├── Dashboard.py
│   └── TEST
│       ├── 00_TEST_complet.bash
│       ├── 01_TEST_ntp_srv.bash
│       ├── 02_TEST_postfix_srv.bash
│       ├── 03_TEST_pam_srv.bash
│       └── 04_TEST_alertes_systeme.bash

Auteurs

  • NANDILLON Maxence
  • PERREIN Alcide

Promotion 3ESGI - ESGI Nantes

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors