<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="fr">
	<id>https://wiki-se.plil.fr/mediawiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Vsouopme</id>
	<title>wiki-se.plil.fr - Contributions [fr]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki-se.plil.fr/mediawiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Vsouopme"/>
	<link rel="alternate" type="text/html" href="https://wiki-se.plil.fr/mediawiki/index.php/Sp%C3%A9cial:Contributions/Vsouopme"/>
	<updated>2026-05-13T21:34:14Z</updated>
	<subtitle>Contributions</subtitle>
	<generator>MediaWiki 1.39.1</generator>
	<entry>
		<id>https://wiki-se.plil.fr/mediawiki/index.php?title=SE4_IdO_s%C3%A9curit%C3%A9_syst%C3%A8me/r%C3%A9seau_2025/2026&amp;diff=12742</id>
		<title>SE4 IdO sécurité système/réseau 2025/2026</title>
		<link rel="alternate" type="text/html" href="https://wiki-se.plil.fr/mediawiki/index.php?title=SE4_IdO_s%C3%A9curit%C3%A9_syst%C3%A8me/r%C3%A9seau_2025/2026&amp;diff=12742"/>
		<updated>2026-03-03T13:31:31Z</updated>

		<summary type="html">&lt;p&gt;Vsouopme : /* Répartition des binômes pour les travaux pratiques &amp;quot;administration système et réseau&amp;quot; */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Répartition des binômes pour les travaux pratiques &amp;quot;administration système et réseau&amp;quot; =&lt;br /&gt;
&lt;br /&gt;
Préfixe des noms de machine : &amp;lt;code&amp;gt;SE4&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Domaines Internet à louer sur [[gandi.net]]. Identifiant &amp;lt;code&amp;gt;pifou&amp;lt;/code&amp;gt;. Regardez le montant prévu sur le compte avant de louer un domaine.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Cahier !! Elève !! Nom de domaine&lt;br /&gt;
! Nom de machine de services !! Nom de machine mandataire&lt;br /&gt;
|-&lt;br /&gt;
| [[Atelier SysRes SE4 2025/2026 E1 | Cahier n°1]] || Pierre CASIMIRI || merteuil.tech || SE4.Merteuil||SE4.Rosemonde&lt;br /&gt;
|-&lt;br /&gt;
| [[Atelier SysRes SE4 2025/2026 E2 | Cahier n°2]] || Agathe HOUDUSSE || valmont.tech || SE4.Valmont||SE4.Rosemonde&lt;br /&gt;
|-&lt;br /&gt;
| [[Atelier SysRes SE4 2025/2026 E3 | Cahier n°3]] || Lilia GHAZALI || kirchhoff.live|| SE4.Tension||SE4.Kirchhoff&lt;br /&gt;
|-&lt;br /&gt;
| [[Atelier SysRes SE4 2025/2026 E4 | Cahier n°4]] || Marin GOURVEST || courant.online|| SE4.Courant||SE4.Kirchhoff&lt;br /&gt;
|-&lt;br /&gt;
| [[Atelier SysRes SE4 2025/2026 E5 | Cahier n°5]] || Cédric PAYET || archlinuxbtw.lol|| SE4.CachyOS||SE4.LinusTorvalds&lt;br /&gt;
|-&lt;br /&gt;
| [[Atelier SysRes SE4 2025/2026 E6 | Cahier n°6]] || Thomas DELOBELLE || archlinux.lol|| SE4.Manjaro||SE4.LinusTorvalds&lt;br /&gt;
|-&lt;br /&gt;
| [[Atelier SysRes SE4 2025/2026 E7 | Cahier n°7]] || Ibrahim TEPELI || c2vts.fr|| SE4.C2||SE4.Garage&lt;br /&gt;
|-&lt;br /&gt;
| [[Atelier SysRes SE4 2025/2026 E8 | Cahier n°8]] || Yassine YAHIANI || rs7.online|| SE4.RS7||SE4.Garage&lt;br /&gt;
|-&lt;br /&gt;
| [[Atelier SysRes SE4 2025/2026 E9 | Cahier n°9]] || Aurèle VANGHELUWE || tompere.online|| SE4-Tompere1||SE4-Tompere0&lt;br /&gt;
|-&lt;br /&gt;
| [[Atelier SysRes SE4 2025/2026 E10 | Cahier n°10]] || Tom MERIEN || tompere2.xyz|| SE4-Tompere2||SE4-Tompere0&lt;br /&gt;
|-&lt;br /&gt;
| [[Atelier SysRes SE4 2025/2026 E11 | Cahier n°11]] || Varesse Evora Souop Metse || elvis21.tech|| SE4.Elf||SE4.RockStar&lt;br /&gt;
|-&lt;br /&gt;
| [[Atelier SysRes SE4 2025/2026 E12 | Cahier n°12]] || Mario Sylainx S. GAUTHIER || kasav.online|| SE4.Kasav||SE4.RockStar&lt;br /&gt;
|-&lt;br /&gt;
| [[Atelier SysRes SE4 2025/2026 E13 | Cahier n°13]] || Billel Cheklat || dardevil.tech|| SE4.catwoman||SE4.superman&lt;br /&gt;
|-&lt;br /&gt;
| [[Atelier SysRes SE4 2025/2026 E14 | Cahier n°14]] || Antonin Biernacki || deadpool.tech|| SE4.batman||SE4.superman&lt;br /&gt;
|-&lt;br /&gt;
| [[Atelier SysRes SE4 2025/2026 E15 | Cahier n°15]] || Mohamed Salhi || msalhi.online|| SE4.Moon||SE4.Solstice&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Nom machine mandataire !! IPv4 publique machine mandataire !! Elèves &lt;br /&gt;
!numéro de binôme&lt;br /&gt;
!Adresse IPV4 OpenWRT&lt;br /&gt;
|-&lt;br /&gt;
| SE4.Rosemonde|| 193.48.57.165|| Pierre CASIMIRI &amp;amp; Agathe HOUDUSSE&lt;br /&gt;
|1&lt;br /&gt;
|193.48.57.177&lt;br /&gt;
|-&lt;br /&gt;
| SE4.Kirchhoff|| 193.48.57.171|| Lilia GHAZALI &amp;amp; Marin GOURVEST&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| SE4.LinusTorvalds|| 193.48.57.166|| Cédric PAYET &amp;amp; Thomas DELOBELLE&lt;br /&gt;
|3&lt;br /&gt;
|193.48.57.180&lt;br /&gt;
|-&lt;br /&gt;
| SE4.Garage|| 193.48.57.170|| Ibrahim TEPELI &amp;amp; Yassine YAHIANI &lt;br /&gt;
|4&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| SE4-Tompere0|| 193.48.57.168|| Aurèle VANGHELUWE &amp;amp; Tom MERIEN&lt;br /&gt;
|5&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| SE4.superman|| 193.48.57.169|| Billel Cheklat &amp;amp; Antonin Biernacki&lt;br /&gt;
|7&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| SE4.RockStar|| 193.48.57.172|| Varesse Evora Souop Metse &amp;amp; GAUTHIER Mario Sylainx S.&lt;br /&gt;
|6&lt;br /&gt;
|193.48.57.179&lt;br /&gt;
|-&lt;br /&gt;
| SE4.Solstice|| 193.48.57.167|| Mohamed Salhi &lt;br /&gt;
|2&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Tableau des commutateurs virtuels =&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Noms des élèves !! Nom du fichier de configuration !! Réseau IPv4 utilisé &lt;br /&gt;
|-&lt;br /&gt;
| CASIMIRI / HOUDUSSE || pont_gercourt || 192.168.3.0/24&lt;br /&gt;
|-&lt;br /&gt;
|PAYET / DELOBELLE&lt;br /&gt;
|pont_pacman&lt;br /&gt;
|192.168.10.0/24&lt;br /&gt;
|-&lt;br /&gt;
|MERIEN / VANGHELUWE&lt;br /&gt;
|pont_pere&lt;br /&gt;
|192.168.0.0/24&lt;br /&gt;
|-&lt;br /&gt;
|CHEKLAT / BIERNACKI&lt;br /&gt;
|pont_ironman&lt;br /&gt;
|192.168.69.0/24&lt;br /&gt;
|-&lt;br /&gt;
|SALHI&lt;br /&gt;
|pont_msalhi&lt;br /&gt;
|192.168.20.0/24&lt;br /&gt;
|-&lt;br /&gt;
|GOURVEST/GHAZALI&lt;br /&gt;
|pont_diviseur&lt;br /&gt;
|192.168.67.0/24&lt;br /&gt;
|-&lt;br /&gt;
|YAHIANI / TEPELI&lt;br /&gt;
|pontclio&lt;br /&gt;
|192.168.7.0/24&lt;br /&gt;
|-&lt;br /&gt;
|GAUTHIER / SOUOP METSE&lt;br /&gt;
|Styx&lt;br /&gt;
|192.168.50.0/24&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Tableau des réseaux virtuels =&lt;br /&gt;
&lt;br /&gt;
VLAN privés :&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Nom !! Numéro &lt;br /&gt;
|-&lt;br /&gt;
| VLAN1 || 1&lt;br /&gt;
|-&lt;br /&gt;
| MV-PROMO || 2 &lt;br /&gt;
|-&lt;br /&gt;
|E1-Pierre&lt;br /&gt;
|11&lt;br /&gt;
|-&lt;br /&gt;
|E2-Agathe&lt;br /&gt;
|12&lt;br /&gt;
|-&lt;br /&gt;
|E5-Cedric&lt;br /&gt;
|15&lt;br /&gt;
|-&lt;br /&gt;
|E6-Thomas&lt;br /&gt;
|16&lt;br /&gt;
|-&lt;br /&gt;
|E9-Aurele&lt;br /&gt;
|19&lt;br /&gt;
|-&lt;br /&gt;
|E10-Tom&lt;br /&gt;
|20&lt;br /&gt;
|-&lt;br /&gt;
|E13-Billel&lt;br /&gt;
|23&lt;br /&gt;
|-&lt;br /&gt;
|E14-Antonin&lt;br /&gt;
|24&lt;br /&gt;
|-&lt;br /&gt;
|E15-MSalhi&lt;br /&gt;
|25&lt;br /&gt;
|-&lt;br /&gt;
|E11-Evora&lt;br /&gt;
|28&lt;br /&gt;
|-&lt;br /&gt;
|E12-Gauthier&lt;br /&gt;
|21&lt;br /&gt;
|-&lt;br /&gt;
|E8-Yassine&lt;br /&gt;
|18&lt;br /&gt;
|-&lt;br /&gt;
|E7-Ibrahim&lt;br /&gt;
|17&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
VLAN communs avec l'école :&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Nom !! Numéro &lt;br /&gt;
|-&lt;br /&gt;
| INTERCO1 || 530 &lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Schéma de câblage =&lt;br /&gt;
&lt;br /&gt;
Vous avez des éléments réseaux et des panneaux de brassage fibres dans les locaux techniques SR31 et SR52 ainsi que dans les salles E304 et E306.&lt;br /&gt;
&lt;br /&gt;
Le plan doit donc comporter, pour chaque connexion, les locaux d'origine et de destination ainsi que l'identifiant des ports d'origine et de destination.&lt;br /&gt;
&lt;br /&gt;
= Plan d'adressage =&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Nom VLAN !! Réseau IPv4 !! Réseau IPv6 &lt;br /&gt;
|-&lt;br /&gt;
| MV-PROMO || &amp;lt;code&amp;gt;193.48.57.160/27&amp;lt;/code&amp;gt; || &amp;lt;/code&amp;gt;2001:660:4401:60a0::/64&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| PoolPierre || &amp;lt;code&amp;gt;10.60.1.0/24&amp;lt;/code&amp;gt; || &amp;lt;/code&amp;gt;2001:660:4401:60a1::/64&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| PoolAgathe || &amp;lt;code&amp;gt;10.60.2.0/24&amp;lt;/code&amp;gt; || &amp;lt;/code&amp;gt;2001:660:4401:60a2::/64&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|PoolCedric&lt;br /&gt;
|&amp;lt;code&amp;gt;10.60.5.0/24&amp;lt;/code&amp;gt;&lt;br /&gt;
|2001:660:4401:60a5::/64&lt;br /&gt;
|-&lt;br /&gt;
|PoolThomas&lt;br /&gt;
|&amp;lt;code&amp;gt;10.60.6.0/24&amp;lt;/code&amp;gt;&lt;br /&gt;
|2001:660:4401:60a6::/64&lt;br /&gt;
|-&lt;br /&gt;
|PoolBillel&lt;br /&gt;
|&amp;lt;code&amp;gt;10.60.13.0/24&amp;lt;/code&amp;gt;&lt;br /&gt;
|2001:660:4401:60ad::/64&lt;br /&gt;
|-&lt;br /&gt;
|PoolAurele&lt;br /&gt;
|&amp;lt;code&amp;gt;10.60.9.0/24&amp;lt;/code&amp;gt;&lt;br /&gt;
|2001:660:4401:60a9::/64&lt;br /&gt;
|-&lt;br /&gt;
|PoolTom&lt;br /&gt;
|&amp;lt;code&amp;gt;10.60.10.0/24&amp;lt;/code&amp;gt;&lt;br /&gt;
|2001:660:4401:60aa::/64&lt;br /&gt;
|-&lt;br /&gt;
|PoolSalhi&lt;br /&gt;
|&amp;lt;code&amp;gt;10.60.15.0/24&amp;lt;/code&amp;gt;&lt;br /&gt;
|2001:660:4401:60b1::/64&lt;br /&gt;
|-&lt;br /&gt;
|PoolAntonin&lt;br /&gt;
|&amp;lt;code&amp;gt;10.60.14.0/24&amp;lt;/code&amp;gt;&lt;br /&gt;
|2001:660:4401:60ae::/64&lt;br /&gt;
|-&lt;br /&gt;
|PoolYassine&lt;br /&gt;
|10.60.8.0/24&lt;br /&gt;
|2001:660:4401:60a8::/64&lt;br /&gt;
|-&lt;br /&gt;
|PoolEvora&lt;br /&gt;
|10.60.11.0/24&lt;br /&gt;
|2001:660:4401:60ab::/64&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Adresses IPv4 des éléments réseau dans VLAN1&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Elément !! Adresse &lt;br /&gt;
|-&lt;br /&gt;
| Routeur C9200-E304 || 172.27.0.1/16&lt;br /&gt;
|-&lt;br /&gt;
| Routeur C9200-E306 || 172.27.0.2/16&lt;br /&gt;
|-&lt;br /&gt;
| Borne Wi-Fi E306 || 172.27.0.3/16&lt;br /&gt;
|-&lt;br /&gt;
| Borne Wi-Fi E304 || 172.27.0.4/16&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Informations VRRP =&lt;br /&gt;
&lt;br /&gt;
Pour chaque VLAN et pour chaque instance VRRP dans le VLAN listez les adresses IPv4 propres ainsi que l'unique IPv4 virtuelle.&lt;br /&gt;
&lt;br /&gt;
== VLAN des machines virtuelles ==&lt;br /&gt;
&lt;br /&gt;
Une seule instance VRRP dans le VLAN des machines virtuelles.&lt;br /&gt;
&lt;br /&gt;
Adresse IPv4 virtuelle : &amp;lt;code&amp;gt;193.48.57.162&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Routeur !! IPv4 propre &lt;br /&gt;
|-&lt;br /&gt;
| C9200 E304 || &amp;lt;code&amp;gt;193.48.57.163&amp;lt;/code&amp;gt;&lt;br /&gt;
|- &lt;br /&gt;
| C9200 E306 || &amp;lt;code&amp;gt;193.48.57.164&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== VLAN ... ==&lt;/div&gt;</summary>
		<author><name>Vsouopme</name></author>
	</entry>
	<entry>
		<id>https://wiki-se.plil.fr/mediawiki/index.php?title=SE4_IdO_s%C3%A9curit%C3%A9_syst%C3%A8me/r%C3%A9seau_2025/2026&amp;diff=12738</id>
		<title>SE4 IdO sécurité système/réseau 2025/2026</title>
		<link rel="alternate" type="text/html" href="https://wiki-se.plil.fr/mediawiki/index.php?title=SE4_IdO_s%C3%A9curit%C3%A9_syst%C3%A8me/r%C3%A9seau_2025/2026&amp;diff=12738"/>
		<updated>2026-03-03T10:54:00Z</updated>

		<summary type="html">&lt;p&gt;Vsouopme : /* Répartition des binômes pour les travaux pratiques &amp;quot;administration système et réseau&amp;quot; */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Répartition des binômes pour les travaux pratiques &amp;quot;administration système et réseau&amp;quot; =&lt;br /&gt;
&lt;br /&gt;
Préfixe des noms de machine : &amp;lt;code&amp;gt;SE4&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Domaines Internet à louer sur [[gandi.net]]. Identifiant &amp;lt;code&amp;gt;pifou&amp;lt;/code&amp;gt;. Regardez le montant prévu sur le compte avant de louer un domaine.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Cahier !! Elève !! Nom de domaine&lt;br /&gt;
! Nom de machine de services !! Nom de machine mandataire&lt;br /&gt;
|-&lt;br /&gt;
| [[Atelier SysRes SE4 2025/2026 E1 | Cahier n°1]] || Pierre CASIMIRI || merteuil.tech || SE4.Merteuil||SE4.Rosemonde&lt;br /&gt;
|-&lt;br /&gt;
| [[Atelier SysRes SE4 2025/2026 E2 | Cahier n°2]] || Agathe HOUDUSSE || valmont.tech || SE4.Valmont||SE4.Rosemonde&lt;br /&gt;
|-&lt;br /&gt;
| [[Atelier SysRes SE4 2025/2026 E3 | Cahier n°3]] || Lilia GHAZALI || kirchhoff.live|| SE4.Tension||SE4.Kirchhoff&lt;br /&gt;
|-&lt;br /&gt;
| [[Atelier SysRes SE4 2025/2026 E4 | Cahier n°4]] || Marin GOURVEST || courant.online|| SE4.Courant||SE4.Kirchhoff&lt;br /&gt;
|-&lt;br /&gt;
| [[Atelier SysRes SE4 2025/2026 E5 | Cahier n°5]] || Cédric PAYET || archlinuxbtw.lol|| SE4.CachyOS||SE4.LinusTorvalds&lt;br /&gt;
|-&lt;br /&gt;
| [[Atelier SysRes SE4 2025/2026 E6 | Cahier n°6]] || Thomas DELOBELLE || archlinux.lol|| SE4.Manjaro||SE4.LinusTorvalds&lt;br /&gt;
|-&lt;br /&gt;
| [[Atelier SysRes SE4 2025/2026 E7 | Cahier n°7]] || Ibrahim TEPELI || c2vts.fr|| SE4.C2||SE4.Garage&lt;br /&gt;
|-&lt;br /&gt;
| [[Atelier SysRes SE4 2025/2026 E8 | Cahier n°8]] || Yassine YAHIANI || rs7.online|| SE4.RS7||SE4.Garage&lt;br /&gt;
|-&lt;br /&gt;
| [[Atelier SysRes SE4 2025/2026 E9 | Cahier n°9]] || Aurèle VANGHELUWE || tompere.online|| SE4-Tompere1||SE4-Tompere0&lt;br /&gt;
|-&lt;br /&gt;
| [[Atelier SysRes SE4 2025/2026 E10 | Cahier n°10]] || Tom MERIEN || tompere2.xyz|| SE4-Tompere2||SE4-Tompere0&lt;br /&gt;
|-&lt;br /&gt;
| [[Atelier SysRes SE4 2025/2026 E11 | Cahier n°11]] || Varesse Evora Souop Metse || elvis21.tech|| SE4.Elf||SE4.RockStar&lt;br /&gt;
|-&lt;br /&gt;
| [[Atelier SysRes SE4 2025/2026 E12 | Cahier n°12]] || Mario Sylainx S. GAUTHIER || kasav.online|| SE4.Kasav||SE4.RockStar&lt;br /&gt;
|-&lt;br /&gt;
| [[Atelier SysRes SE4 2025/2026 E13 | Cahier n°13]] || Billel Cheklat || dardevil.tech|| SE4.catwoman||SE4.superman&lt;br /&gt;
|-&lt;br /&gt;
| [[Atelier SysRes SE4 2025/2026 E14 | Cahier n°14]] || Antonin Biernacki || deadpool.tech|| SE4.batman||SE4.superman&lt;br /&gt;
|-&lt;br /&gt;
| [[Atelier SysRes SE4 2025/2026 E15 | Cahier n°15]] || Mohamed Salhi || msalhi.online|| SE4.Moon||SE4.Solstice&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Nom machine mandataire !! IPv4 publique machine mandataire !! Elèves &lt;br /&gt;
!numéro de binôme&lt;br /&gt;
!Adresse IPV4 OpenWRT&lt;br /&gt;
|-&lt;br /&gt;
| SE4.Rosemonde|| 193.48.57.165|| Pierre CASIMIRI &amp;amp; Agathe HOUDUSSE&lt;br /&gt;
|1&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| SE4.Kirchhoff|| 193.48.57.171|| Lilia GHAZALI &amp;amp; Marin GOURVEST&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| SE4.LinusTorvalds|| 193.48.57.166|| Cédric PAYET &amp;amp; Thomas DELOBELLE&lt;br /&gt;
|3&lt;br /&gt;
|193.48.57.180&lt;br /&gt;
|-&lt;br /&gt;
| SE4.Garage|| 193.48.57.170|| Ibrahim TEPELI &amp;amp; Yassine YAHIANI &lt;br /&gt;
|4&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| SE4-Tompere0|| 193.48.57.168|| Aurèle VANGHELUWE &amp;amp; Tom MERIEN&lt;br /&gt;
|5&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| SE4.superman|| 193.48.57.169|| Billel Cheklat &amp;amp; Antonin Biernacki&lt;br /&gt;
|7&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| SE4.RockStar|| 193.48.57.172|| Varesse Evora Souop Metse &amp;amp; GAUTHIER Mario Sylainx S.&lt;br /&gt;
|6&lt;br /&gt;
|193.48.57.100&lt;br /&gt;
|-&lt;br /&gt;
| SE4.Solstice|| 193.48.57.167|| Mohamed Salhi &lt;br /&gt;
|2&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Tableau des commutateurs virtuels =&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Noms des élèves !! Nom du fichier de configuration !! Réseau IPv4 utilisé &lt;br /&gt;
|-&lt;br /&gt;
| CASIMIRI / HOUDUSSE || pont_gercourt || 192.168.3.0/24&lt;br /&gt;
|-&lt;br /&gt;
|PAYET / DELOBELLE&lt;br /&gt;
|pont_pacman&lt;br /&gt;
|192.168.10.0/24&lt;br /&gt;
|-&lt;br /&gt;
|MERIEN / VANGHELUWE&lt;br /&gt;
|pont_pere&lt;br /&gt;
|192.168.0.0/24&lt;br /&gt;
|-&lt;br /&gt;
|CHEKLAT / BIERNACKI&lt;br /&gt;
|pont_ironman&lt;br /&gt;
|192.168.69.0/24&lt;br /&gt;
|-&lt;br /&gt;
|SALHI&lt;br /&gt;
|pont_msalhi&lt;br /&gt;
|192.168.20.0/24&lt;br /&gt;
|-&lt;br /&gt;
|GOURVEST/GHAZALI&lt;br /&gt;
|pont_diviseur&lt;br /&gt;
|192.168.67.0/24&lt;br /&gt;
|-&lt;br /&gt;
|YAHIANI / TEPELI&lt;br /&gt;
|pontclio&lt;br /&gt;
|192.168.7.0/24&lt;br /&gt;
|-&lt;br /&gt;
|GAUTHIER / SOUOP METSE&lt;br /&gt;
|Styx&lt;br /&gt;
|192.168.50.0/24&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Tableau des réseaux virtuels =&lt;br /&gt;
&lt;br /&gt;
VLAN privés :&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Nom !! Numéro &lt;br /&gt;
|-&lt;br /&gt;
| VLAN1 || 1&lt;br /&gt;
|-&lt;br /&gt;
| MV-PROMO || 2 &lt;br /&gt;
|-&lt;br /&gt;
|E1-Pierre&lt;br /&gt;
|11&lt;br /&gt;
|-&lt;br /&gt;
|E2-Agathe&lt;br /&gt;
|12&lt;br /&gt;
|-&lt;br /&gt;
|E5-Cedric&lt;br /&gt;
|15&lt;br /&gt;
|-&lt;br /&gt;
|E6-Thomas&lt;br /&gt;
|16&lt;br /&gt;
|-&lt;br /&gt;
|E9-Aurele&lt;br /&gt;
|19&lt;br /&gt;
|-&lt;br /&gt;
|E10-Tom&lt;br /&gt;
|20&lt;br /&gt;
|-&lt;br /&gt;
|E13-Billel&lt;br /&gt;
|23&lt;br /&gt;
|-&lt;br /&gt;
|E14-Antonin&lt;br /&gt;
|24&lt;br /&gt;
|-&lt;br /&gt;
|E15-MSalhi&lt;br /&gt;
|25&lt;br /&gt;
|-&lt;br /&gt;
|E11-Evora&lt;br /&gt;
|28&lt;br /&gt;
|-&lt;br /&gt;
|E12-Gauthier&lt;br /&gt;
|21&lt;br /&gt;
|-&lt;br /&gt;
|E8-Yassine&lt;br /&gt;
|18&lt;br /&gt;
|-&lt;br /&gt;
|E7-Ibrahim&lt;br /&gt;
|17&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
VLAN communs avec l'école :&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Nom !! Numéro &lt;br /&gt;
|-&lt;br /&gt;
| INTERCO1 || 530 &lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Schéma de câblage =&lt;br /&gt;
&lt;br /&gt;
Vous avez des éléments réseaux et des panneaux de brassage fibres dans les locaux techniques SR31 et SR52 ainsi que dans les salles E304 et E306.&lt;br /&gt;
&lt;br /&gt;
Le plan doit donc comporter, pour chaque connexion, les locaux d'origine et de destination ainsi que l'identifiant des ports d'origine et de destination.&lt;br /&gt;
&lt;br /&gt;
= Plan d'adressage =&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Nom VLAN !! Réseau IPv4 !! Réseau IPv6 &lt;br /&gt;
|-&lt;br /&gt;
| MV-PROMO || &amp;lt;code&amp;gt;193.48.57.160/27&amp;lt;/code&amp;gt; || &amp;lt;/code&amp;gt;2001:660:4401:60a0::/64&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| PoolPierre || &amp;lt;code&amp;gt;10.60.1.0/24&amp;lt;/code&amp;gt; || &amp;lt;/code&amp;gt;2001:660:4401:60a1::/64&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| PoolAgathe || &amp;lt;code&amp;gt;10.60.2.0/24&amp;lt;/code&amp;gt; || &amp;lt;/code&amp;gt;2001:660:4401:60a2::/64&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|PoolCedric&lt;br /&gt;
|&amp;lt;code&amp;gt;10.60.5.0/24&amp;lt;/code&amp;gt;&lt;br /&gt;
|2001:660:4401:60a5::/64&lt;br /&gt;
|-&lt;br /&gt;
|PoolThomas&lt;br /&gt;
|&amp;lt;code&amp;gt;10.60.6.0/24&amp;lt;/code&amp;gt;&lt;br /&gt;
|2001:660:4401:60a6::/64&lt;br /&gt;
|-&lt;br /&gt;
|PoolBillel&lt;br /&gt;
|&amp;lt;code&amp;gt;10.60.13.0/24&amp;lt;/code&amp;gt;&lt;br /&gt;
|2001:660:4401:60ad::/64&lt;br /&gt;
|-&lt;br /&gt;
|PoolAurele&lt;br /&gt;
|&amp;lt;code&amp;gt;10.60.9.0/24&amp;lt;/code&amp;gt;&lt;br /&gt;
|2001:660:4401:60a9::/64&lt;br /&gt;
|-&lt;br /&gt;
|PoolTom&lt;br /&gt;
|&amp;lt;code&amp;gt;10.60.10.0/24&amp;lt;/code&amp;gt;&lt;br /&gt;
|2001:660:4401:60aa::/64&lt;br /&gt;
|-&lt;br /&gt;
|PoolSalhi&lt;br /&gt;
|&amp;lt;code&amp;gt;10.60.15.0/24&amp;lt;/code&amp;gt;&lt;br /&gt;
|2001:660:4401:60b1::/64&lt;br /&gt;
|-&lt;br /&gt;
|PoolAntonin&lt;br /&gt;
|&amp;lt;code&amp;gt;10.60.14.0/24&amp;lt;/code&amp;gt;&lt;br /&gt;
|2001:660:4401:60ae::/64&lt;br /&gt;
|-&lt;br /&gt;
|PoolYassine&lt;br /&gt;
|10.60.8.0/24&lt;br /&gt;
|2001:660:4401:60a8::/64&lt;br /&gt;
|-&lt;br /&gt;
|PoolEvora&lt;br /&gt;
|10.60.11.0/24&lt;br /&gt;
|2001:660:4401:60ab::/64&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Adresses IPv4 des éléments réseau dans VLAN1&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Elément !! Adresse &lt;br /&gt;
|-&lt;br /&gt;
| Routeur C9200-E304 || 172.27.0.1/16&lt;br /&gt;
|-&lt;br /&gt;
| Routeur C9200-E306 || 172.27.0.2/16&lt;br /&gt;
|-&lt;br /&gt;
| Borne Wi-Fi E306 || 172.27.0.3/16&lt;br /&gt;
|-&lt;br /&gt;
| Borne Wi-Fi E304 || 172.27.0.4/16&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Informations VRRP =&lt;br /&gt;
&lt;br /&gt;
Pour chaque VLAN et pour chaque instance VRRP dans le VLAN listez les adresses IPv4 propres ainsi que l'unique IPv4 virtuelle.&lt;br /&gt;
&lt;br /&gt;
== VLAN des machines virtuelles ==&lt;br /&gt;
&lt;br /&gt;
Une seule instance VRRP dans le VLAN des machines virtuelles.&lt;br /&gt;
&lt;br /&gt;
Adresse IPv4 virtuelle : &amp;lt;code&amp;gt;193.48.57.162&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Routeur !! IPv4 propre &lt;br /&gt;
|-&lt;br /&gt;
| C9200 E304 || &amp;lt;code&amp;gt;193.48.57.163&amp;lt;/code&amp;gt;&lt;br /&gt;
|- &lt;br /&gt;
| C9200 E306 || &amp;lt;code&amp;gt;193.48.57.164&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== VLAN ... ==&lt;/div&gt;</summary>
		<author><name>Vsouopme</name></author>
	</entry>
	<entry>
		<id>https://wiki-se.plil.fr/mediawiki/index.php?title=SE4_IdO_s%C3%A9curit%C3%A9_syst%C3%A8me/r%C3%A9seau_2025/2026&amp;diff=12721</id>
		<title>SE4 IdO sécurité système/réseau 2025/2026</title>
		<link rel="alternate" type="text/html" href="https://wiki-se.plil.fr/mediawiki/index.php?title=SE4_IdO_s%C3%A9curit%C3%A9_syst%C3%A8me/r%C3%A9seau_2025/2026&amp;diff=12721"/>
		<updated>2026-03-02T12:38:12Z</updated>

		<summary type="html">&lt;p&gt;Vsouopme : &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Répartition des binômes pour les travaux pratiques &amp;quot;administration système et réseau&amp;quot; =&lt;br /&gt;
&lt;br /&gt;
Préfixe des noms de machine : &amp;lt;code&amp;gt;SE4&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Domaines Internet à louer sur [[gandi.net]]. Identifiant &amp;lt;code&amp;gt;pifou&amp;lt;/code&amp;gt;. Regardez le montant prévu sur le compte avant de louer un domaine.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Cahier !! Elève !! Nom de domaine&lt;br /&gt;
! Nom de machine de services !! Nom de machine mandataire&lt;br /&gt;
|-&lt;br /&gt;
| [[Atelier SysRes SE4 2025/2026 E1 | Cahier n°1]] || Pierre CASIMIRI || merteuil.tech || SE4.Merteuil||SE4.Rosemonde&lt;br /&gt;
|-&lt;br /&gt;
| [[Atelier SysRes SE4 2025/2026 E2 | Cahier n°2]] || Agathe HOUDUSSE || valmont.tech || SE4.Valmont||SE4.Rosemonde&lt;br /&gt;
|-&lt;br /&gt;
| [[Atelier SysRes SE4 2025/2026 E3 | Cahier n°3]] || Lilia GHAZALI || kirchhoff.live|| SE4.Tension||SE4.Kirchhoff&lt;br /&gt;
|-&lt;br /&gt;
| [[Atelier SysRes SE4 2025/2026 E4 | Cahier n°4]] || Marin GOURVEST || courant.online|| SE4.Courant||SE4.Kirchhoff&lt;br /&gt;
|-&lt;br /&gt;
| [[Atelier SysRes SE4 2025/2026 E5 | Cahier n°5]] || Cédric PAYET || archlinuxbtw.lol|| SE4.CachyOS||SE4.LinusTorvalds&lt;br /&gt;
|-&lt;br /&gt;
| [[Atelier SysRes SE4 2025/2026 E6 | Cahier n°6]] || Thomas DELOBELLE || archlinux.lol|| SE4.Manjaro||SE4.LinusTorvalds&lt;br /&gt;
|-&lt;br /&gt;
| [[Atelier SysRes SE4 2025/2026 E7 | Cahier n°7]] || Ibrahim TEPELI || c2vts.fr|| SE4.C2||SE4.Garage&lt;br /&gt;
|-&lt;br /&gt;
| [[Atelier SysRes SE4 2025/2026 E8 | Cahier n°8]] || Yassine YAHIANI || rs7.online|| SE4.RS7||SE4.Garage&lt;br /&gt;
|-&lt;br /&gt;
| [[Atelier SysRes SE4 2025/2026 E9 | Cahier n°9]] || Aurèle VANGHELUWE || tompere.online|| SE4-Tompere1||SE4-Tompere0&lt;br /&gt;
|-&lt;br /&gt;
| [[Atelier SysRes SE4 2025/2026 E10 | Cahier n°10]] || Tom MERIEN || tompere2.xyz|| SE4-Tompere2||SE4-Tompere0&lt;br /&gt;
|-&lt;br /&gt;
| [[Atelier SysRes SE4 2025/2026 E11 | Cahier n°11]] || Varesse Evora Souop Metse || elvis21.tech|| SE4.Elf||SE4.RockStar&lt;br /&gt;
|-&lt;br /&gt;
| [[Atelier SysRes SE4 2025/2026 E12 | Cahier n°12]] || Mario Sylainx S. GAUTHIER || kasav.online|| SE4.Kasav||SE4.RockStar&lt;br /&gt;
|-&lt;br /&gt;
| [[Atelier SysRes SE4 2025/2026 E13 | Cahier n°13]] || Billel Cheklat || dardevil.tech|| SE4.catwoman||SE4.superman&lt;br /&gt;
|-&lt;br /&gt;
| [[Atelier SysRes SE4 2025/2026 E14 | Cahier n°14]] || Antonin Biernacki || deadpool.tech|| SE4.batman||SE4.superman&lt;br /&gt;
|-&lt;br /&gt;
| [[Atelier SysRes SE4 2025/2026 E15 | Cahier n°15]] || Mohamed Salhi || msalhi.online|| SE4.Moon||SE4.Solstice&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Nom machine mandataire !! IPv4 publique machine mandataire !! Elèves &lt;br /&gt;
!numéro de binôme&lt;br /&gt;
|-&lt;br /&gt;
| SE4.Rosemonde|| 193.48.57.165|| Pierre CASIMIRI &amp;amp; Agathe HOUDUSSE&lt;br /&gt;
|1&lt;br /&gt;
|-&lt;br /&gt;
| SE4.Kirchhoff|| 193.48.57.171|| Lilia GHAZALI &amp;amp; Marin GOURVEST&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| SE4.LinusTorvalds|| 193.48.57.166|| Cédric PAYET &amp;amp; Thomas DELOBELLE&lt;br /&gt;
|3&lt;br /&gt;
|-&lt;br /&gt;
| SE4.Garage|| 193.48.57.170|| Ibrahim TEPELI &amp;amp; Yassine YAHIANI &lt;br /&gt;
|4&lt;br /&gt;
|-&lt;br /&gt;
| SE4-Tompere0|| 193.48.57.168|| Aurèle VANGHELUWE &amp;amp; Tom MERIEN&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| SE4.superman|| 193.48.57.169|| Billel Cheklat &amp;amp; Antonin Biernacki&lt;br /&gt;
|7&lt;br /&gt;
|-&lt;br /&gt;
| SE4.RockStar|| 193.48.57.172|| Varesse Evora Souop Metse &amp;amp; GAUTHIER Mario Sylainx S.&lt;br /&gt;
|6&lt;br /&gt;
|-&lt;br /&gt;
| SE4.Solstice|| 193.48.57.167|| Mohamed Salhi &lt;br /&gt;
|2&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Tableau des commutateurs virtuels =&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Noms des élèves !! Nom du fichier de configuration !! Réseau IPv4 utilisé &lt;br /&gt;
|-&lt;br /&gt;
| CASIMIRI / HOUDUSSE || pont_gercourt || 192.168.3.0/24&lt;br /&gt;
|-&lt;br /&gt;
|PAYET / DELOBELLE&lt;br /&gt;
|pont_pacman&lt;br /&gt;
|192.168.10.0/24&lt;br /&gt;
|-&lt;br /&gt;
|MERIEN / VANGHELUWE&lt;br /&gt;
|pont_pere&lt;br /&gt;
|192.168.0.0/24&lt;br /&gt;
|-&lt;br /&gt;
|CHEKLAT / BIERNACKI&lt;br /&gt;
|pont_ironman&lt;br /&gt;
|192.168.69.0/24&lt;br /&gt;
|-&lt;br /&gt;
|SALHI&lt;br /&gt;
|pont_msalhi&lt;br /&gt;
|192.168.20.0/24&lt;br /&gt;
|-&lt;br /&gt;
|GOURVEST/GHAZALI&lt;br /&gt;
|pont_diviseur&lt;br /&gt;
|192.168.67.0/24&lt;br /&gt;
|-&lt;br /&gt;
|YAHIANI / TEPELI&lt;br /&gt;
|pontclio&lt;br /&gt;
|192.168.7.0/24&lt;br /&gt;
|-&lt;br /&gt;
|GAUTHIER / SOUOP METSE&lt;br /&gt;
|Styx&lt;br /&gt;
|192.168.50.0/24&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Tableau des réseaux virtuels =&lt;br /&gt;
&lt;br /&gt;
VLAN privés :&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Nom !! Numéro &lt;br /&gt;
|-&lt;br /&gt;
| VLAN1 || 1&lt;br /&gt;
|-&lt;br /&gt;
| MV-PROMO || 2 &lt;br /&gt;
|-&lt;br /&gt;
|E1-Pierre&lt;br /&gt;
|11&lt;br /&gt;
|-&lt;br /&gt;
|E2-Agathe&lt;br /&gt;
|12&lt;br /&gt;
|-&lt;br /&gt;
|E5-Cedric&lt;br /&gt;
|15&lt;br /&gt;
|-&lt;br /&gt;
|E6-Thomas&lt;br /&gt;
|16&lt;br /&gt;
|-&lt;br /&gt;
|E9-Aurele&lt;br /&gt;
|19&lt;br /&gt;
|-&lt;br /&gt;
|E10-Tom&lt;br /&gt;
|20&lt;br /&gt;
|-&lt;br /&gt;
|E13-Billel&lt;br /&gt;
|23&lt;br /&gt;
|-&lt;br /&gt;
|E14-Antonin&lt;br /&gt;
|24&lt;br /&gt;
|-&lt;br /&gt;
|E15-MSalhi&lt;br /&gt;
|25&lt;br /&gt;
|-&lt;br /&gt;
|E11-Evora&lt;br /&gt;
|28&lt;br /&gt;
|-&lt;br /&gt;
|E12-Gauthier&lt;br /&gt;
|21&lt;br /&gt;
|-&lt;br /&gt;
|E8-Yassine&lt;br /&gt;
|18&lt;br /&gt;
|-&lt;br /&gt;
|E7-Ibrahim&lt;br /&gt;
|17&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
VLAN communs avec l'école :&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Nom !! Numéro &lt;br /&gt;
|-&lt;br /&gt;
| INTERCO1 || 530 &lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Schéma de câblage =&lt;br /&gt;
&lt;br /&gt;
Vous avez des éléments réseaux et des panneaux de brassage fibres dans les locaux techniques SR31 et SR52 ainsi que dans les salles E304 et E306.&lt;br /&gt;
&lt;br /&gt;
Le plan doit donc comporter, pour chaque connexion, les locaux d'origine et de destination ainsi que l'identifiant des ports d'origine et de destination.&lt;br /&gt;
&lt;br /&gt;
= Plan d'adressage =&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Nom VLAN !! Réseau IPv4 !! Réseau IPv6 &lt;br /&gt;
|-&lt;br /&gt;
| MV-PROMO || &amp;lt;code&amp;gt;193.48.57.160/27&amp;lt;/code&amp;gt; || &amp;lt;/code&amp;gt;2001:660:4401:60a0::/64&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| PoolPierre || &amp;lt;code&amp;gt;10.60.1.0/24&amp;lt;/code&amp;gt; || &amp;lt;/code&amp;gt;2001:660:4401:60a1::/64&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| PoolAgathe || &amp;lt;code&amp;gt;10.60.2.0/24&amp;lt;/code&amp;gt; || &amp;lt;/code&amp;gt;2001:660:4401:60a2::/64&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|PoolCedric&lt;br /&gt;
|&amp;lt;code&amp;gt;10.60.5.0/24&amp;lt;/code&amp;gt;&lt;br /&gt;
|2001:660:4401:60a5::/64&lt;br /&gt;
|-&lt;br /&gt;
|PoolThomas&lt;br /&gt;
|&amp;lt;code&amp;gt;10.60.6.0/24&amp;lt;/code&amp;gt;&lt;br /&gt;
|2001:660:4401:60a6::/64&lt;br /&gt;
|-&lt;br /&gt;
|PoolBillel&lt;br /&gt;
|&amp;lt;code&amp;gt;10.60.13.0/24&amp;lt;/code&amp;gt;&lt;br /&gt;
|2001:660:4401:60ad::/64&lt;br /&gt;
|-&lt;br /&gt;
|PoolAurele&lt;br /&gt;
|&amp;lt;code&amp;gt;10.60.9.0/24&amp;lt;/code&amp;gt;&lt;br /&gt;
|2001:660:4401:60a9::/64&lt;br /&gt;
|-&lt;br /&gt;
|PoolTom&lt;br /&gt;
|&amp;lt;code&amp;gt;10.60.10.0/24&amp;lt;/code&amp;gt;&lt;br /&gt;
|2001:660:4401:60aa::/64&lt;br /&gt;
|-&lt;br /&gt;
|PoolSalhi&lt;br /&gt;
|&amp;lt;code&amp;gt;10.60.15.0/24&amp;lt;/code&amp;gt;&lt;br /&gt;
|2001:660:4401:60b1::/64&lt;br /&gt;
|-&lt;br /&gt;
|PoolAntonin&lt;br /&gt;
|&amp;lt;code&amp;gt;10.60.14.0/24&amp;lt;/code&amp;gt;&lt;br /&gt;
|2001:660:4401:60ae::/64&lt;br /&gt;
|-&lt;br /&gt;
|PoolYassine&lt;br /&gt;
|10.60.8.0/24&lt;br /&gt;
|2001:660:4401:60a8::/64&lt;br /&gt;
|-&lt;br /&gt;
|PoolEvora&lt;br /&gt;
|10.60.11.0/24&lt;br /&gt;
|2001:660:4401:60ab::/64&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Adresses IPv4 des éléments réseau dans VLAN1&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Elément !! Adresse &lt;br /&gt;
|-&lt;br /&gt;
| Routeur C9200-E304 || 172.27.0.1/16&lt;br /&gt;
|-&lt;br /&gt;
| Routeur C9200-E306 || 172.27.0.2/16&lt;br /&gt;
|-&lt;br /&gt;
| Borne Wi-Fi E306 || 172.27.0.3/16&lt;br /&gt;
|-&lt;br /&gt;
| Borne Wi-Fi E304 || 172.27.0.4/16&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Informations VRRP =&lt;br /&gt;
&lt;br /&gt;
Pour chaque VLAN et pour chaque instance VRRP dans le VLAN listez les adresses IPv4 propres ainsi que l'unique IPv4 virtuelle.&lt;br /&gt;
&lt;br /&gt;
== VLAN des machines virtuelles ==&lt;br /&gt;
&lt;br /&gt;
Une seule instance VRRP dans le VLAN des machines virtuelles.&lt;br /&gt;
&lt;br /&gt;
Adresse IPv4 virtuelle : &amp;lt;code&amp;gt;193.48.57.162&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Routeur !! IPv4 propre &lt;br /&gt;
|-&lt;br /&gt;
| C9200 E304 || &amp;lt;code&amp;gt;193.48.57.163&amp;lt;/code&amp;gt;&lt;br /&gt;
|- &lt;br /&gt;
| C9200 E306 || &amp;lt;code&amp;gt;193.48.57.164&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== VLAN ... ==&lt;/div&gt;</summary>
		<author><name>Vsouopme</name></author>
	</entry>
	<entry>
		<id>https://wiki-se.plil.fr/mediawiki/index.php?title=Atelier_SysRes_SE4_2025/2026_E11&amp;diff=12309</id>
		<title>Atelier SysRes SE4 2025/2026 E11</title>
		<link rel="alternate" type="text/html" href="https://wiki-se.plil.fr/mediawiki/index.php?title=Atelier_SysRes_SE4_2025/2026_E11&amp;diff=12309"/>
		<updated>2026-02-21T20:39:04Z</updated>

		<summary type="html">&lt;p&gt;Vsouopme : /* Configuration du Serveur DNS Maître et Secondaire */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Projet Virtualisation /Administration Systeme-Réseau - Machine SE4.Elf =&lt;br /&gt;
Dans le cadre de ce projet, nnous avons déployés une infrastructure composée de '''deux machines dédiées aux services''' et d’une '''machine mandataire''', le tout à l’aide de l'environnement  '''Xen.'''&lt;br /&gt;
&lt;br /&gt;
== Création des machines virtuelles ==&lt;br /&gt;
Les machines sont créées  sur le Dom0 '''Capbreton.plil.info''' en faisant un '''ssh root@capbreton.plil.info''' &lt;br /&gt;
&lt;br /&gt;
Sur la capbreton.plil.info, &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
xen create-image --hostname=SE4.Elf --dhcp --dir=/usr/local/xen --size=10G --dist=excalibur --memory=2G --bridge=Styx --force&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; '''Xen-create-image''' :  Commande permettant de créer une nouvelle machine virtuelle Xen&lt;br /&gt;
&lt;br /&gt;
'''--hostname=SE4.Elf :''' Pour le nom de la machine &lt;br /&gt;
&lt;br /&gt;
'''--size=10G''' : La taille du disque &lt;br /&gt;
&lt;br /&gt;
'''--bridge=Styx''' : Le nom du bridge &lt;br /&gt;
&lt;br /&gt;
Par la suite il faut creer un fichier dans le répertoire &amp;lt;code&amp;gt;/etc/network/interfaces.d&amp;lt;/code&amp;gt; du Dom0 pour créer notre pont. (NB: Il faut noter que cette etape on peut la faire avant la creation de notre VM&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
auto Styx&lt;br /&gt;
&lt;br /&gt;
iface Styx inet manual&lt;br /&gt;
   bridge_ports none&lt;br /&gt;
   up ip link set $IFACE up&lt;br /&gt;
   down ip link set $IFACE down&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;La commande '''xen list :''' Affiche les '''machines virtuelles''' (VM) qui sont actuellement gérées par Xen (Elle fait la liste des VM allumée).&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
root@capbreton:~# xen list&lt;br /&gt;
SE4.batman                                 322  2048     1     -b----      37.5&lt;br /&gt;
SE4.Moon                                   326  2048     1     -b----      41.1&lt;br /&gt;
SE4.C2                                     332  1024     1     -b----      18.1&lt;br /&gt;
SE4.Tension                                343  2048     1     -b----       7.8&lt;br /&gt;
SE4.CachyOS                                365  2048     1     -b----      10.2&lt;br /&gt;
SE4.RockStar                               367  2048     1     -b----       6.1&lt;br /&gt;
SE4.Kasav                                  368  2048     1     -b----       5.9&lt;br /&gt;
SE4.Elf                                    369  2048     1     -b----       5.6&lt;br /&gt;
SE4.catwoman                               370  2048     1     -b----       6.1&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;-La commande '''xen create /etc/xen/SE4.Elf.cfg''' permet d'allumer la Machine virtuellle.&lt;br /&gt;
&lt;br /&gt;
-La commande xen '''console SE4.Elf''' permet d'acceder  / de se connecter  a la VM.&lt;br /&gt;
&lt;br /&gt;
-La commande '''xen shutdown''' '''SE4.Elf''' permet d'eteindre la machine virtuelle.&lt;br /&gt;
&lt;br /&gt;
Lors de la tentative de connexion, il y'a une un probleme , pour y remedier,  '''Ctrl + AltGr + ] =&amp;gt; vi =&amp;gt; :q! =&amp;gt; reconnexion'''&lt;br /&gt;
&lt;br /&gt;
Pour voir le mot de passe de la VM, '''cat /var/log/xen-tools/SE4.Elf.log'''&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
Installation Summary&lt;br /&gt;
---------------------&lt;br /&gt;
Hostname        :  SE4.Elf&lt;br /&gt;
Distribution    :  excalibur&lt;br /&gt;
MAC Address     :  00:16:3E:83:A3:C7&lt;br /&gt;
IP Address(es)  :  dynamic&lt;br /&gt;
SSH Fingerprint :  SHA256:IrPhxhB4m1s+eaPaLynS6NlE/HfL78+y3ba3DPuHFQU (DSA)&lt;br /&gt;
SSH Fingerprint :  SHA256:RT+MZtlFxC7BrdYORzOcxDX+SKsJrLzOGWWngX2pKz4 (ECDSA)&lt;br /&gt;
SSH Fingerprint :  SHA256:aLYvYqUPX2Q/J5P0nTpdpMyrFD5xopRqkFKuYb7QUo4 (ED25519)&lt;br /&gt;
SSH Fingerprint :  SHA256:b0ddm9FYx4/losJU8/pE9MXx7102ygkAMjChOvPlNhE (RSA)&lt;br /&gt;
Root Password   :  X&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;- La commande '''vi /etc/hostname''' pour changer le nom de la VM&lt;br /&gt;
&lt;br /&gt;
== '''Configuration de la Machine de Services''' ==&lt;br /&gt;
Il faut creer deux partitions LVM de 10G pour votre machine virtuelle et modifiez le fichier de configuration de la machine virtuelle de services pour faire en sorte que les répertoires &amp;lt;code&amp;gt;/'''var'''&amp;lt;/code&amp;gt; et &amp;lt;code&amp;gt;'''/home'''&amp;lt;/code&amp;gt; de la machine virtuelle soient implantés sur ces partitions LVM&lt;br /&gt;
&lt;br /&gt;
=== '''Création des volumes logiques''' ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
lvcreate -L 10G -n lv_var_SE4Elf &lt;br /&gt;
lvcreate -L 10G -n lv_home_SE4Elf &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Faire '''lvdisplay''' pour faire la verification&lt;br /&gt;
&lt;br /&gt;
Depuis le serveur Capbreton, on a créé 2 fichiers de partitions dans &amp;lt;code&amp;gt;/dev/virtual&amp;lt;/code&amp;gt; pour chaque machines de services &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@capbreton:/dev/virtual# ls &lt;br /&gt;
SE4.Poseidon.home lv_home_SE4Elf lv_var_SE4Elf  SE4.Gaby.home SE4.Poseidon.var SE4.Gaby.var &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Apres nous avons modifié le fichier /etc/xen/SE4.Elf.cfg piur y ajouter deux répertoires&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
disk = [&lt;br /&gt;
  'file:/usr/local/xen/domains/SE4.Elf/disk.img,xvda2,w',&lt;br /&gt;
  'file:/usr/local/xen/domains/SE4.Elf/swap.img,xvda1,w',&lt;br /&gt;
  'phy:/dev/vg0/lv_var_SE4Elf,xvdb,w',&lt;br /&gt;
  'phy:/dev/vg0/lv_home_SE4Elf,xvdc,w'&lt;br /&gt;
]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== ''' Création et formatage des partitions''' ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
mkfs -t ext4 /dev/xvdb  # Formatage de la partition pour /var &lt;br /&gt;
mkfs -t ext4 /dev/xvdc  # Formatage de la partition pour /home&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== '''Préparer les partitions et déplacer les données :''' ===&lt;br /&gt;
&lt;br /&gt;
* '''Montage temporaire des partitions dans &amp;lt;code&amp;gt;/mnt&amp;lt;/code&amp;gt; :'''&lt;br /&gt;
&lt;br /&gt;
Pour pouvoir déplacer les données, nous avons du monter les nouvelles partitions LVM dans un répertoire temporaire &amp;lt;code&amp;gt;/mnt&amp;lt;/code&amp;gt;.  On a créé 2 partitions une pour &amp;lt;code&amp;gt;/var&amp;lt;/code&amp;gt; et une &amp;lt;code&amp;gt;/home&amp;lt;/code&amp;gt; sous les noms xvdb et xvdc dans  &amp;lt;code&amp;gt;/dev&amp;lt;/code&amp;gt;  ,que l'on monte avec  :&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
mount /dev/xvdb /mnt&lt;br /&gt;
mount /dev/xvdc /mnt&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* '''Déplacement des fichiers existants'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
mv /var/* /mnt # Déplacement des fichiers de /var vers la nouvelle partition&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== '''Démonter les partitions temporaires :''' ===&lt;br /&gt;
Avant de configurer les montages permanents, on démonte les partitions des répertoires temporaires (&amp;lt;code&amp;gt;/mnt&amp;lt;/code&amp;gt;)&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
umount /mnt # Démontage après transfert des données&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== '''Modification du fichier &amp;lt;code&amp;gt;/etc/fstab&amp;lt;/code&amp;gt; pour un montage automatique au démarrage :''' ===&lt;br /&gt;
On modifie le fichier &amp;lt;code&amp;gt;'''/etc/fstab'''&amp;lt;/code&amp;gt;, qui contient la liste des partitions.&lt;br /&gt;
&lt;br /&gt;
Ajout des nouvelles partitions LVM au fichier &amp;lt;code&amp;gt;/etc/fstab&amp;lt;/code&amp;gt; :&lt;br /&gt;
&lt;br /&gt;
* '''/dev/xvdb /var ext4 defaults 0 2'''&lt;br /&gt;
* '''/dev/xvdc /home ext4 defaults 0''' &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
# /etc/fstab: static file system information.&lt;br /&gt;
#&lt;br /&gt;
# &amp;lt;file system&amp;gt; &amp;lt;mount point&amp;gt; &amp;lt;type&amp;gt; &amp;lt;options&amp;gt; &amp;lt;dump&amp;gt; &amp;lt;pass&amp;gt;&lt;br /&gt;
proc             /proc           proc  defaults   0     0&lt;br /&gt;
devpts            /dev/pts       devpts rw,noexec,nosuid,gid=5,mode=620 0 0 /dev/xvda1 none swap sw 0 0&lt;br /&gt;
/dev/xvda1 none swap sw 0 0&lt;br /&gt;
/dev/xvda2 / ext4 noatime,nodiratime,errors=remount-ro 0 1&lt;br /&gt;
/dev/xvdb /var ext4 defaults 0 2 &lt;br /&gt;
/dev/xvdc /home ext4 defaults 0 2&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== '''Monter les partitions définies dans &amp;lt;code&amp;gt;fstab&amp;lt;/code&amp;gt; :''' ===&lt;br /&gt;
Pour monter toutes les partitions définies dans le fichier &amp;lt;code&amp;gt;/etc/fstab&amp;lt;/code&amp;gt;  :&lt;br /&gt;
 mount -a  # Remontage des partitions définies dans fstab&lt;br /&gt;
Cette commande monte toutes les partitions qui ne sont pas encore montées et qui sont définies dans &amp;lt;code&amp;gt;/etc/fstab&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
remet les données dans le fichier déplacer.&lt;br /&gt;
&lt;br /&gt;
Puis, pour appliquer les changement nous avons redémarré la VM en faisant le '''xen shutdown SE4.Elf''' ,  '''xen create /etc/xen/SE4.Elf.cfg''',  '''xen console SE4.Elf'''&lt;br /&gt;
&lt;br /&gt;
=== '''Vérification des partitions montées''' ===&lt;br /&gt;
Après avoir configuré le montage automatique et remonté les partitions, nous devons vérifier que les partitions sont correctement montées. Nous avons utilisé la commande '''&amp;lt;code&amp;gt;df -h&amp;lt;/code&amp;gt;''' pour afficher l'espace disque utilisé et disponible sur les partitions montées.&lt;br /&gt;
&lt;br /&gt;
Cela nous permet de confirmer que les partitions '''&amp;lt;code&amp;gt;/var&amp;lt;/code&amp;gt;''' et '''&amp;lt;code&amp;gt;/home&amp;lt;/code&amp;gt;''' sont correctement montées sur les répertoires associés et qu'il n'y a pas de problème d'espace disque.&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== &amp;lt;big&amp;gt;'''Configuration Reseau'''&amp;lt;/big&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
Tout d'abord nous avons modifier le fichier /etc/xen/SE4.Elf pour y ajouter une nouvelle interface sur le bridge de la promotion SE4.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Afin d’assurer une connectivité IPv6 stable et routée pour un accès direct à Internet, ainsi qu’une communication efficace avec la machine mandataire, nous avons modifié le fichier '''&amp;lt;code&amp;gt;/etc/network/interfaces&amp;lt;/code&amp;gt;'''. De plus, une adresse IPv4 fixe a été attribuée sur le réseau privé afin de garantir une interaction optimale entre les machines de services et leur machine mandataire.&lt;br /&gt;
&lt;br /&gt;
=== '''Mise a jour du fichier'''  /etc/network/interfaces ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
# Interface loopback&lt;br /&gt;
auto lo&lt;br /&gt;
iface lo inet loopback&lt;br /&gt;
&lt;br /&gt;
# Interface principale (eth0) - IPv4 statique + IPv6 automatique&lt;br /&gt;
auto eth0&lt;br /&gt;
iface eth0 inet static&lt;br /&gt;
    address 192.168.50.12&lt;br /&gt;
    netmask 255.255.255.254  # /24 &lt;br /&gt;
    gateway 192.168.50.1     # @mandataire&lt;br /&gt;
&lt;br /&gt;
iface eth0 inet6 auto  # Attribution automatique d'une IPv6&lt;br /&gt;
&lt;br /&gt;
# Interface secondaire (eth1) - IPv6 automatique uniquement&lt;br /&gt;
auto eth1&lt;br /&gt;
iface eth1 inet6 auto&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Il faut ensuite aciver l'interface en faisan'''t  ifdown eth0 &amp;amp;&amp;amp; ifup eth0''' et puis  '''ifdown eth1 &amp;amp;&amp;amp; ifup eth1''' aprés faire le '''systemctl restart networking''' pour mettre a jour les configurations du reseau.&lt;br /&gt;
&lt;br /&gt;
Les commandes : &lt;br /&gt;
&lt;br /&gt;
* ip route show : pour afficher la table de routage.&lt;br /&gt;
* ip -4 addr show : pour afficher l'adresse ipv4   #'''''192.168.50.12'''''&lt;br /&gt;
* ip -6 addr show : pour afficher l'adresse ipv6   #'''''2001:660:4401:60a0:216:3eff:fe83:a3c8'''''&lt;br /&gt;
&lt;br /&gt;
Grace a toute ses configurations, nous pouvons faire un ping sur la machine mandataire RockStar et sur la machine de service Kasav &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:~# ping 192.168.50.13        #ping sur la machine de service Kasav&lt;br /&gt;
PING 192.168.50.13 (192.168.50.13) 56(84) bytes of data.&lt;br /&gt;
64 bytes from 192.168.50.13: icmp_seq=1 ttl=64 time=0.132 ms&lt;br /&gt;
64 bytes from 192.168.50.13: icmp_seq=2 ttl=64 time=0.318 ms&lt;br /&gt;
64 bytes from 192.168.50.13: icmp_seq=3 ttl=64 time=0.369 ms&lt;br /&gt;
64 bytes from 192.168.50.13 icmp_seq=4 ttl=64 time=0.356 ms&lt;br /&gt;
--- 192.168.50.13 ping statistics ---&lt;br /&gt;
4 packets transmitted, 4 received, 0% packet loss, time 3077ms&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== '''Installation des services''' ===&lt;br /&gt;
Installation des services pour la suite du tp, les services a installé sont&lt;br /&gt;
&lt;br /&gt;
* '''Ssh''' : pour permettre l’accès à distance sécurisé à la machine pour l’administration et la maintenance&lt;br /&gt;
* '''Apache2 (Serveur web)''' : pour heberger des applications et sites web accessibles aux utilisateurs&lt;br /&gt;
* '''Bind9''' : pour assurer  la résolution de noms de domaine, essentielle pour le bon fonctionnement des services sur le réseau&lt;br /&gt;
&lt;br /&gt;
La commnde pour installer est '''apt install -y openssh-server apache2 bind9'''Après l'installation :&lt;br /&gt;
&lt;br /&gt;
Vérifiez si les services sont en cours d'exécution  '''systemctl status ssh apache2 bind9.'''&lt;br /&gt;
&lt;br /&gt;
Activez et démarrez les services si nécessaire '''systemctl enable --now ssh apache2 bind9'''&lt;br /&gt;
&lt;br /&gt;
== '''Configuration de la machine mandataire''' ==&lt;br /&gt;
&lt;br /&gt;
=== '''Mise à jour du fichier''' ===&lt;br /&gt;
'''&amp;lt;code&amp;gt;Modification du fichier /etc/network/interfaces&amp;lt;/code&amp;gt;'''&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
# Fichier /etc/network/interfaces&lt;br /&gt;
auto lo&lt;br /&gt;
iface lo inet loopback&lt;br /&gt;
&lt;br /&gt;
# Interface publique (réseau routé)&lt;br /&gt;
auto eth1&lt;br /&gt;
iface eth1 inet static&lt;br /&gt;
    address 193.48.57.172/27&lt;br /&gt;
   &lt;br /&gt;
&lt;br /&gt;
iface eth1 inet6 auto&lt;br /&gt;
&lt;br /&gt;
# Interface privée &lt;br /&gt;
auto eth0&lt;br /&gt;
iface eth0 inet static&lt;br /&gt;
    address 192.168.50.1/24&lt;br /&gt;
&lt;br /&gt;
iface eth0 inet6 auto&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Il faut ensuite aciver l'interface en faisan'''t  ifdown eth0 &amp;amp;&amp;amp; ifup eth0''' et puis  '''ifdown eth1 &amp;amp;&amp;amp; ifup eth1''' aprés faire le '''systemctl restart networking''' pour mettre a jour les configurations du reseau.&lt;br /&gt;
&lt;br /&gt;
=== Mise en place de la mascarade (NAT) ===&lt;br /&gt;
La mise en place de la masquerade (NAT) permet aux machines d’un réseau privé d’accéder au réseau externe en utilisant l’adresse IP publique de la passerelle, tout en masquant l’architecture interne et en améliorant la sécurité.&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
echo &amp;quot;net.ipv4.ip_forward=1&amp;quot; &amp;gt;&amp;gt; /etc/sysctl.conf&lt;br /&gt;
sysctl -p&lt;br /&gt;
&lt;br /&gt;
# Règles iptables pour la mascarade&lt;br /&gt;
iptables -t nat -A POSTROUTING -s 192.168.50.0/24 -o eth1 -j MASQUERADE&lt;br /&gt;
iptables -A FORWARD -i eth0 -o eth1 -j ACCEPT&lt;br /&gt;
iptables -A FORWARD -i eth1 -o eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT&lt;br /&gt;
&lt;br /&gt;
# Sauvegarde pour persistance&lt;br /&gt;
iptables-save &amp;gt; /etc/iptables/rules.v4&lt;br /&gt;
&lt;br /&gt;
# Ajout dans interfaces pour chargement au démarrage&lt;br /&gt;
post-up iptables-restore &amp;lt; /etc/iptables/rules.v4&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== '''Installation des paquetages  :''' ===&lt;br /&gt;
De la même manière que pour Moon et Apollo on installe les paquetages :&lt;br /&gt;
 apt install -y openssh-server apache2 bind9&lt;br /&gt;
Puis après l'installation on vérifie si les services sont en cours d'exécution :&lt;br /&gt;
 systemctl status ssh apache2 bind9&lt;br /&gt;
Activez et démarrez les services si nécessaire :&lt;br /&gt;
 systemctl enable --now ssh apache2 bind9&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==  '''Serveur SSH''' ==&lt;br /&gt;
Notre machine virtuelle doit etre accessible par SSH, on autorise donc l'accès par l'utilisateur '''Root en modifiant le fichier de de configuration &amp;lt;code&amp;gt;/etc/ssh/sshd_config  :&amp;lt;/code&amp;gt;'''&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
PermitRootLogin yes&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Il faut ensuite redemarrer le serveur ssh en faisant :&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/etc/ssh# /etc/init.d/ssh restart&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Pour gérer la redirection du SSH, on doit configurer '''nftables''' sur nos machines de service en redirigeant les ports 2201 et 2202&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
nft add table ip nat&lt;br /&gt;
nft add chain ip nat PREROUTING { type nat hook prerouting priority 0 \; }&lt;br /&gt;
nft add rule ip nat PREROUTING tcp dport 2201 dnat to 192.168.50.12:22                 &lt;br /&gt;
nft add rule ip nat PREROUTING tcp dport 2202 dnat to 192.168.50.3:22              &lt;br /&gt;
nft add chain ip nat POSTROUTING { type nat hook postrouting priority 100 \; }&lt;br /&gt;
nft add rule ip nat POSTROUTING masquerade&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Maintenant, on peut se connecter en SSH sur les machiches virtuelles de services:  De Elf, on peut se connecter a Kasav&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/# ssh root@192.168.50.3&lt;br /&gt;
root@192.168.50.3's password: &lt;br /&gt;
Linux Kasav 4.19.0-26-amd64 #1 SMP Debian 4.19.304-1 (2024-01-09) x86_64&lt;br /&gt;
&lt;br /&gt;
The programs included with the Devuan GNU/Linux system are free software;&lt;br /&gt;
the exact distribution terms for each program are described in the&lt;br /&gt;
individual files in /usr/share/doc/*/copyright.&lt;br /&gt;
&lt;br /&gt;
Devuan GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent&lt;br /&gt;
permitted by applicable law.&lt;br /&gt;
Last login: Tue Feb  3 11:34:45 2026 from 192.168.50.12&lt;br /&gt;
root@Kasav:~# &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Serveur DNS''' ==&lt;br /&gt;
Nous avons configuré un serveur DNS pour gérer les noms de domaine de nos machines virtuelles : '''elvis21.tech''' .&lt;br /&gt;
&lt;br /&gt;
La première étape était d'acquérir les noms de domaine pour '''Elf''' sur https://www.gandi.net/fr '''.''' La seconde étape était d'acquerir les certificats.&lt;br /&gt;
&lt;br /&gt;
Après avoir suivi le tutoriel, nous obtenons deux fichiers : '''myserver.key''' (la clé privée) et '''server.csr''' (la demande de certificat). Ces fichiers nous permettrons de configurer '''DNSSEC''' et sécuriser la zone DNS.&lt;br /&gt;
&lt;br /&gt;
=== Configuration bind9 ===&lt;br /&gt;
&lt;br /&gt;
==== Configuration du Serveur DNS Maître et Secondaire ====&lt;br /&gt;
La machine Elf est le serveur DNS principal, tandis que Kasav sert de DNS secondaire et récupère la zone depuis Elf.&lt;br /&gt;
&lt;br /&gt;
Puis on créer le fichier de zone pour le domaine : '''&amp;lt;code&amp;gt;/etc/bind/db.elvis21.tech&amp;lt;/code&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
Après des modifications on a du augmenter le numéro de série dans le fichier '''&amp;lt;code&amp;gt;/etc/bind/db.elvis21.tech&amp;lt;/code&amp;gt;'''&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
$TTL 86400&lt;br /&gt;
@ IN SOA ns1.elvis21.tech. admin.elvis21.tech. (&lt;br /&gt;
        3298267246      ;Version&lt;br /&gt;
        3600            ;Refresh&lt;br /&gt;
        1800            ;Retry&lt;br /&gt;
        604800          ;Expire&lt;br /&gt;
        86400 )         ;Minimum TTL&lt;br /&gt;
;&lt;br /&gt;
@  IN NS ns1.elvis21.tech.&lt;br /&gt;
&lt;br /&gt;
ns1 IN A 192.168.50.12&lt;br /&gt;
ns2 IN A 192.168.50.1&lt;br /&gt;
 IN A 192.168.50.12&lt;br /&gt;
      IN AAAA 2001:660:4401:60a0:216:3eff:fe83:a3c8&lt;br /&gt;
www IN A 192.168.50.12&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Dans &amp;lt;code&amp;gt;/etc/bind/named.conf.local&amp;lt;/code&amp;gt; :avons configuré les zones DNS&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/etc/bind# cat named.conf.local &lt;br /&gt;
zone &amp;quot;elvis21.tech&amp;quot; {&lt;br /&gt;
    type primary;&lt;br /&gt;
    file &amp;quot;/etc/bind/zones/db.elvis21.tech&amp;quot;;&lt;br /&gt;
    allow-transfer {&lt;br /&gt;
      2001:660:4401:60a0:216:3eff:fe70:7f1c;&lt;br /&gt;
      2001:660:4401:60a0:216:3eff:fe9a:ea1c;&lt;br /&gt;
      };&lt;br /&gt;
    also-notify { 2001:660:4401:60a0:216:3eff:fe70:7f1c; };&lt;br /&gt;
    inline-signing yes;   // DNSSEC automatique&lt;br /&gt;
    key-directory &amp;quot;/etc/bind/keys&amp;quot;; // répertoire des clefs, attention aux droits&lt;br /&gt;
    dnssec-policy &amp;quot;dnssecpolicy&amp;quot;;  // politique pour les clefs de chiffrement&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
zone &amp;quot;kasav.online&amp;quot; {&lt;br /&gt;
    type secondary;&lt;br /&gt;
    file &amp;quot;/etc/bind/backup/db.kasav.online&amp;quot;;&lt;br /&gt;
    primaries { 2001:660:4401:60a0:216:3eff:fe9a:ea1c; };&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
dnssec-policy &amp;quot;dnssecpolicy&amp;quot; {&lt;br /&gt;
  keys {&lt;br /&gt;
    ksk key-directory lifetime unlimited algorithm 13;&lt;br /&gt;
    zsk key-directory lifetime unlimited algorithm 13;&lt;br /&gt;
  };&lt;br /&gt;
  nsec3param;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Pour charger la version du fichier de zone, on tape la commande &amp;quot;named-checkzone elvis21.tech /etc/bind/db.elvis21.tech &amp;quot; en étant dans le répertoire /etc/bind&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/etc/bind# named-checkzone elvis21.tech /etc/bind/db.elvis21.tech&lt;br /&gt;
zone elvis21.tech/IN: loaded serial 3298267246&lt;br /&gt;
OK&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
openssl req -nodes -newkey rsa:2048 -sha256 -keyout elvis21.tech.key -out elvis21.csr&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
[[Fichier:ImageDns.png|vignette|994x994px|centré]]&lt;br /&gt;
&lt;br /&gt;
== '''Mise en place du serveur Apache (http et https)''' ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
apt update&lt;br /&gt;
apt install apache2&lt;br /&gt;
systemctl enable --now apache2&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
[[Fichier:Elvis21.tech-DNS.png|gauche|vignette|863x863px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Installation Fail2ban''' ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/# apt install fail2ban &lt;br /&gt;
Installing:                     &lt;br /&gt;
  fail2ban&lt;br /&gt;
&lt;br /&gt;
root@Elf:/# systemctl status fail2ban&lt;br /&gt;
fail2ban.service - Fail2Ban Service&lt;br /&gt;
    Loaded: loaded (/usr/lib/systemd/system/fail2ban.service, disabled)&lt;br /&gt;
    Active: active (running)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/# service fail2ban status                             &lt;br /&gt;
Status of Authentication failure monitor: fail2ban is running.&lt;br /&gt;
 root@Elf:/# fail2ban-client status&lt;br /&gt;
Status&lt;br /&gt;
|- Number of jail:	1&lt;br /&gt;
`- Jail list:	sshd&lt;br /&gt;
&lt;br /&gt;
root@Elf:/# fail2ban-client status sshd&lt;br /&gt;
Status for the jail: sshd&lt;br /&gt;
|- Filter&lt;br /&gt;
|  |- Currently failed:	0&lt;br /&gt;
|  |- Total failed:	0&lt;br /&gt;
|  `- File list:	/var/log/auth.log&lt;br /&gt;
`- Actions&lt;br /&gt;
   |- Currently banned:	0&lt;br /&gt;
   |- Total banned:	0&lt;br /&gt;
   `- Banned IP list:	&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Mise en place du serveur Apache (http et https) ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/# service apache2 status&lt;br /&gt;
apache2 is running.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''WIFI''' ==&lt;br /&gt;
Faire ip link&lt;br /&gt;
&lt;br /&gt;
ensuite sudo airodump-ng wlanx  -- Remplacer x par le numero du wlan present &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
BSSID              PWR  Beacons    #Data, #/s  CH   MB   ENC CIPHER  AUTH ESSID&lt;br /&gt;
04:DA:D2:9C:50:54  -62       23       11    0   4   54e. WEP  WEP         cracotte05                         &lt;br /&gt;
04:DA:D2:9C:50:5A  -61        2        1    0   4   54e. WEP  WEP         cracotte11    &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;sudo airodump-ng wlan1 --bssid 04:DA:D2:9C:50:5A  -c4 --write log_airdump&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
sudo airodump-ng wlan1 --write airdump --bssid 04:DA:D2:9C:50:5A -c4&lt;br /&gt;
17:31:10  Created capture file &amp;quot;airdump-04.cap&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
 CH  4 ][ Elapsed: 39 mins ][ 2026-02-10 18:11 ][ fixed channel wlan1: 13 &lt;br /&gt;
&lt;br /&gt;
 BSSID              PWR RXQ  Beacons    #Data, #/s  CH   MB   ENC CIPHER  AUTH ESSID&lt;br /&gt;
&lt;br /&gt;
 04:DA:D2:9C:50:5A  -58   3     9766    43771   21   4   54e. WEP  WEP         cracotte11                                                                                                   &lt;br /&gt;
&lt;br /&gt;
 BSSID              STATION            PWR    Rate    Lost   Frames  Notes  Probes&lt;br /&gt;
&lt;br /&gt;
 04:DA:D2:9C:50:5A  40:A5:EF:01:2E:FA  -77    0 -48e   127    46300                                                                                                                          &lt;br /&gt;
Quitting...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
aircrack-ng airdump-05.cap &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
           Aircrack-ng 1.7 &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                 [00:25:47] Tested 869 keys (got 34546 IVs)&lt;br /&gt;
                          Got 35002 out of 35000 IVsStarting PTW attack with 35002 KB    depth   byte(vote)&lt;br /&gt;
    0    0/  2   FF(50176) 1C(43520) E6(42752) 3F(42496) B6(42496) &lt;br /&gt;
    1    0/  6   FF(48128) AC(46336) 90(42752) 8E(42496) 04(42240) &lt;br /&gt;
    2    0/  1   BD(50688) 7F(43776) 75(42752) E6(41216) F2(41216) &lt;br /&gt;
    3    9/  3   CE(39936) 05(39680) 5C(39680) 9A(39168) F4(39168) &lt;br /&gt;
    4   41/  4   6C(37376) 1E(37120) 80(37120) 88(37120) A7(37120) &lt;br /&gt;
&lt;br /&gt;
             KEY FOUND! [ FF:FF:FF:FF:FA:BC:12:CB:AE:EE:EE:EE:EE ]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
ssh -oKexAlgorithms=+diffie-hellman-group14-sha1 -oHostKeyAlgorithms=+ssh-rsa -oCiphers=+aes128-cbc admin@172.27.0.1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
C9200-E304&amp;gt;en&lt;br /&gt;
Password: &lt;br /&gt;
C9200-E304#config t&lt;br /&gt;
Enter configuration commands, one per line.  End with CNTL/Z.&lt;br /&gt;
C9200-E304(config)#vlan 28&lt;br /&gt;
C9200-E304(config-vlan)#name PoolEvora&lt;br /&gt;
C9200-E304(config-vlan)#exit &lt;br /&gt;
C9200-E304(config)#exit&lt;br /&gt;
C9200-E304#write&lt;br /&gt;
Building configuration...&lt;br /&gt;
[OK]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
C9200-E304#en&lt;br /&gt;
C9200-E304#config t&lt;br /&gt;
Enter configuration commands, one per line.  End with CNTL/Z.&lt;br /&gt;
C9200-E304(config)#ip dhcp pool PoolEvora  &lt;br /&gt;
C9200-E304(dhcp-config)#network 10.60.11.0 255.255.255.0&lt;br /&gt;
C9200-E304(dhcp-config)#dns-server 193.48.57.172&lt;br /&gt;
C9200-E304(dhcp-config)#default-router 10.60.11.254&lt;br /&gt;
C9200-E304(dhcp-config)#exit&lt;br /&gt;
C9200-E304(config)#exit&lt;br /&gt;
C9200-E304#write&lt;br /&gt;
Building configuration...&lt;br /&gt;
[OK]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
ip dhcp pool PoolTom&lt;br /&gt;
 network 10.60.10.0 255.255.255.0&lt;br /&gt;
 dns-server 193.48.57.168 &lt;br /&gt;
 default-router 10.60.10.254 &lt;br /&gt;
!         &lt;br /&gt;
ip dhcp pool PoolEvora&lt;br /&gt;
 network 10.60.11.0 255.255.255.0&lt;br /&gt;
 dns-server 193.48.57.172 &lt;br /&gt;
 default-router 10.60.11.254 &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;VRRP&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
C9200-E304&amp;gt;en &lt;br /&gt;
Password: &lt;br /&gt;
C9200-E304#config t&lt;br /&gt;
Enter configuration commands, one per line.  End with CNTL/Z.&lt;br /&gt;
C9200-E304(config)#interface vlan 28&lt;br /&gt;
C9200-E304(config-if)#ip address 10.60.11.2 255.255.255.0&lt;br /&gt;
C9200-E304(config-if)#ipv6 address 2001:660:4401:60ab::2/64&lt;br /&gt;
C9200-E304(config-if)#vrrp 28 address-family ipv4        &lt;br /&gt;
C9200-E304(config-if-vrrp)#priority 110&lt;br /&gt;
C9200-E304(config-if-vrrp)#address 10.60.11.1 primary&lt;br /&gt;
C9200-E304(config-if-vrrp)#exit&lt;br /&gt;
C9200-E304(config-if)#exit&lt;br /&gt;
C9200-E304(config)#exit&lt;br /&gt;
C9200-E304#write&lt;br /&gt;
Building configuration...&lt;br /&gt;
[OK]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;WIFI e304&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
ssh admin@172.27.0.4 \&lt;br /&gt;
  -o KexAlgorithms=+diffie-hellman-group1-sha1 \&lt;br /&gt;
  -o HostKeyAlgorithms=+ssh-rsa \&lt;br /&gt;
  -o Ciphers=+aes128-cbc \&lt;br /&gt;
  -o MACs=+hmac-sha1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Vsouopme</name></author>
	</entry>
	<entry>
		<id>https://wiki-se.plil.fr/mediawiki/index.php?title=Atelier_SysRes_SE4_2025/2026_E11&amp;diff=12308</id>
		<title>Atelier SysRes SE4 2025/2026 E11</title>
		<link rel="alternate" type="text/html" href="https://wiki-se.plil.fr/mediawiki/index.php?title=Atelier_SysRes_SE4_2025/2026_E11&amp;diff=12308"/>
		<updated>2026-02-21T20:33:45Z</updated>

		<summary type="html">&lt;p&gt;Vsouopme : /* Serveur DNS */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Projet Virtualisation /Administration Systeme-Réseau - Machine SE4.Elf =&lt;br /&gt;
Dans le cadre de ce projet, nnous avons déployés une infrastructure composée de '''deux machines dédiées aux services''' et d’une '''machine mandataire''', le tout à l’aide de l'environnement  '''Xen.'''&lt;br /&gt;
&lt;br /&gt;
== Création des machines virtuelles ==&lt;br /&gt;
Les machines sont créées  sur le Dom0 '''Capbreton.plil.info''' en faisant un '''ssh root@capbreton.plil.info''' &lt;br /&gt;
&lt;br /&gt;
Sur la capbreton.plil.info, &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
xen create-image --hostname=SE4.Elf --dhcp --dir=/usr/local/xen --size=10G --dist=excalibur --memory=2G --bridge=Styx --force&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; '''Xen-create-image''' :  Commande permettant de créer une nouvelle machine virtuelle Xen&lt;br /&gt;
&lt;br /&gt;
'''--hostname=SE4.Elf :''' Pour le nom de la machine &lt;br /&gt;
&lt;br /&gt;
'''--size=10G''' : La taille du disque &lt;br /&gt;
&lt;br /&gt;
'''--bridge=Styx''' : Le nom du bridge &lt;br /&gt;
&lt;br /&gt;
Par la suite il faut creer un fichier dans le répertoire &amp;lt;code&amp;gt;/etc/network/interfaces.d&amp;lt;/code&amp;gt; du Dom0 pour créer notre pont. (NB: Il faut noter que cette etape on peut la faire avant la creation de notre VM&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
auto Styx&lt;br /&gt;
&lt;br /&gt;
iface Styx inet manual&lt;br /&gt;
   bridge_ports none&lt;br /&gt;
   up ip link set $IFACE up&lt;br /&gt;
   down ip link set $IFACE down&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;La commande '''xen list :''' Affiche les '''machines virtuelles''' (VM) qui sont actuellement gérées par Xen (Elle fait la liste des VM allumée).&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
root@capbreton:~# xen list&lt;br /&gt;
SE4.batman                                 322  2048     1     -b----      37.5&lt;br /&gt;
SE4.Moon                                   326  2048     1     -b----      41.1&lt;br /&gt;
SE4.C2                                     332  1024     1     -b----      18.1&lt;br /&gt;
SE4.Tension                                343  2048     1     -b----       7.8&lt;br /&gt;
SE4.CachyOS                                365  2048     1     -b----      10.2&lt;br /&gt;
SE4.RockStar                               367  2048     1     -b----       6.1&lt;br /&gt;
SE4.Kasav                                  368  2048     1     -b----       5.9&lt;br /&gt;
SE4.Elf                                    369  2048     1     -b----       5.6&lt;br /&gt;
SE4.catwoman                               370  2048     1     -b----       6.1&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;-La commande '''xen create /etc/xen/SE4.Elf.cfg''' permet d'allumer la Machine virtuellle.&lt;br /&gt;
&lt;br /&gt;
-La commande xen '''console SE4.Elf''' permet d'acceder  / de se connecter  a la VM.&lt;br /&gt;
&lt;br /&gt;
-La commande '''xen shutdown''' '''SE4.Elf''' permet d'eteindre la machine virtuelle.&lt;br /&gt;
&lt;br /&gt;
Lors de la tentative de connexion, il y'a une un probleme , pour y remedier,  '''Ctrl + AltGr + ] =&amp;gt; vi =&amp;gt; :q! =&amp;gt; reconnexion'''&lt;br /&gt;
&lt;br /&gt;
Pour voir le mot de passe de la VM, '''cat /var/log/xen-tools/SE4.Elf.log'''&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
Installation Summary&lt;br /&gt;
---------------------&lt;br /&gt;
Hostname        :  SE4.Elf&lt;br /&gt;
Distribution    :  excalibur&lt;br /&gt;
MAC Address     :  00:16:3E:83:A3:C7&lt;br /&gt;
IP Address(es)  :  dynamic&lt;br /&gt;
SSH Fingerprint :  SHA256:IrPhxhB4m1s+eaPaLynS6NlE/HfL78+y3ba3DPuHFQU (DSA)&lt;br /&gt;
SSH Fingerprint :  SHA256:RT+MZtlFxC7BrdYORzOcxDX+SKsJrLzOGWWngX2pKz4 (ECDSA)&lt;br /&gt;
SSH Fingerprint :  SHA256:aLYvYqUPX2Q/J5P0nTpdpMyrFD5xopRqkFKuYb7QUo4 (ED25519)&lt;br /&gt;
SSH Fingerprint :  SHA256:b0ddm9FYx4/losJU8/pE9MXx7102ygkAMjChOvPlNhE (RSA)&lt;br /&gt;
Root Password   :  X&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;- La commande '''vi /etc/hostname''' pour changer le nom de la VM&lt;br /&gt;
&lt;br /&gt;
== '''Configuration de la Machine de Services''' ==&lt;br /&gt;
Il faut creer deux partitions LVM de 10G pour votre machine virtuelle et modifiez le fichier de configuration de la machine virtuelle de services pour faire en sorte que les répertoires &amp;lt;code&amp;gt;/'''var'''&amp;lt;/code&amp;gt; et &amp;lt;code&amp;gt;'''/home'''&amp;lt;/code&amp;gt; de la machine virtuelle soient implantés sur ces partitions LVM&lt;br /&gt;
&lt;br /&gt;
=== '''Création des volumes logiques''' ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
lvcreate -L 10G -n lv_var_SE4Elf &lt;br /&gt;
lvcreate -L 10G -n lv_home_SE4Elf &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Faire '''lvdisplay''' pour faire la verification&lt;br /&gt;
&lt;br /&gt;
Depuis le serveur Capbreton, on a créé 2 fichiers de partitions dans &amp;lt;code&amp;gt;/dev/virtual&amp;lt;/code&amp;gt; pour chaque machines de services &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@capbreton:/dev/virtual# ls &lt;br /&gt;
SE4.Poseidon.home lv_home_SE4Elf lv_var_SE4Elf  SE4.Gaby.home SE4.Poseidon.var SE4.Gaby.var &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Apres nous avons modifié le fichier /etc/xen/SE4.Elf.cfg piur y ajouter deux répertoires&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
disk = [&lt;br /&gt;
  'file:/usr/local/xen/domains/SE4.Elf/disk.img,xvda2,w',&lt;br /&gt;
  'file:/usr/local/xen/domains/SE4.Elf/swap.img,xvda1,w',&lt;br /&gt;
  'phy:/dev/vg0/lv_var_SE4Elf,xvdb,w',&lt;br /&gt;
  'phy:/dev/vg0/lv_home_SE4Elf,xvdc,w'&lt;br /&gt;
]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== ''' Création et formatage des partitions''' ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
mkfs -t ext4 /dev/xvdb  # Formatage de la partition pour /var &lt;br /&gt;
mkfs -t ext4 /dev/xvdc  # Formatage de la partition pour /home&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== '''Préparer les partitions et déplacer les données :''' ===&lt;br /&gt;
&lt;br /&gt;
* '''Montage temporaire des partitions dans &amp;lt;code&amp;gt;/mnt&amp;lt;/code&amp;gt; :'''&lt;br /&gt;
&lt;br /&gt;
Pour pouvoir déplacer les données, nous avons du monter les nouvelles partitions LVM dans un répertoire temporaire &amp;lt;code&amp;gt;/mnt&amp;lt;/code&amp;gt;.  On a créé 2 partitions une pour &amp;lt;code&amp;gt;/var&amp;lt;/code&amp;gt; et une &amp;lt;code&amp;gt;/home&amp;lt;/code&amp;gt; sous les noms xvdb et xvdc dans  &amp;lt;code&amp;gt;/dev&amp;lt;/code&amp;gt;  ,que l'on monte avec  :&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
mount /dev/xvdb /mnt&lt;br /&gt;
mount /dev/xvdc /mnt&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* '''Déplacement des fichiers existants'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
mv /var/* /mnt # Déplacement des fichiers de /var vers la nouvelle partition&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== '''Démonter les partitions temporaires :''' ===&lt;br /&gt;
Avant de configurer les montages permanents, on démonte les partitions des répertoires temporaires (&amp;lt;code&amp;gt;/mnt&amp;lt;/code&amp;gt;)&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
umount /mnt # Démontage après transfert des données&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== '''Modification du fichier &amp;lt;code&amp;gt;/etc/fstab&amp;lt;/code&amp;gt; pour un montage automatique au démarrage :''' ===&lt;br /&gt;
On modifie le fichier &amp;lt;code&amp;gt;'''/etc/fstab'''&amp;lt;/code&amp;gt;, qui contient la liste des partitions.&lt;br /&gt;
&lt;br /&gt;
Ajout des nouvelles partitions LVM au fichier &amp;lt;code&amp;gt;/etc/fstab&amp;lt;/code&amp;gt; :&lt;br /&gt;
&lt;br /&gt;
* '''/dev/xvdb /var ext4 defaults 0 2'''&lt;br /&gt;
* '''/dev/xvdc /home ext4 defaults 0''' &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
# /etc/fstab: static file system information.&lt;br /&gt;
#&lt;br /&gt;
# &amp;lt;file system&amp;gt; &amp;lt;mount point&amp;gt; &amp;lt;type&amp;gt; &amp;lt;options&amp;gt; &amp;lt;dump&amp;gt; &amp;lt;pass&amp;gt;&lt;br /&gt;
proc             /proc           proc  defaults   0     0&lt;br /&gt;
devpts            /dev/pts       devpts rw,noexec,nosuid,gid=5,mode=620 0 0 /dev/xvda1 none swap sw 0 0&lt;br /&gt;
/dev/xvda1 none swap sw 0 0&lt;br /&gt;
/dev/xvda2 / ext4 noatime,nodiratime,errors=remount-ro 0 1&lt;br /&gt;
/dev/xvdb /var ext4 defaults 0 2 &lt;br /&gt;
/dev/xvdc /home ext4 defaults 0 2&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== '''Monter les partitions définies dans &amp;lt;code&amp;gt;fstab&amp;lt;/code&amp;gt; :''' ===&lt;br /&gt;
Pour monter toutes les partitions définies dans le fichier &amp;lt;code&amp;gt;/etc/fstab&amp;lt;/code&amp;gt;  :&lt;br /&gt;
 mount -a  # Remontage des partitions définies dans fstab&lt;br /&gt;
Cette commande monte toutes les partitions qui ne sont pas encore montées et qui sont définies dans &amp;lt;code&amp;gt;/etc/fstab&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
remet les données dans le fichier déplacer.&lt;br /&gt;
&lt;br /&gt;
Puis, pour appliquer les changement nous avons redémarré la VM en faisant le '''xen shutdown SE4.Elf''' ,  '''xen create /etc/xen/SE4.Elf.cfg''',  '''xen console SE4.Elf'''&lt;br /&gt;
&lt;br /&gt;
=== '''Vérification des partitions montées''' ===&lt;br /&gt;
Après avoir configuré le montage automatique et remonté les partitions, nous devons vérifier que les partitions sont correctement montées. Nous avons utilisé la commande '''&amp;lt;code&amp;gt;df -h&amp;lt;/code&amp;gt;''' pour afficher l'espace disque utilisé et disponible sur les partitions montées.&lt;br /&gt;
&lt;br /&gt;
Cela nous permet de confirmer que les partitions '''&amp;lt;code&amp;gt;/var&amp;lt;/code&amp;gt;''' et '''&amp;lt;code&amp;gt;/home&amp;lt;/code&amp;gt;''' sont correctement montées sur les répertoires associés et qu'il n'y a pas de problème d'espace disque.&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== &amp;lt;big&amp;gt;'''Configuration Reseau'''&amp;lt;/big&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
Tout d'abord nous avons modifier le fichier /etc/xen/SE4.Elf pour y ajouter une nouvelle interface sur le bridge de la promotion SE4.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Afin d’assurer une connectivité IPv6 stable et routée pour un accès direct à Internet, ainsi qu’une communication efficace avec la machine mandataire, nous avons modifié le fichier '''&amp;lt;code&amp;gt;/etc/network/interfaces&amp;lt;/code&amp;gt;'''. De plus, une adresse IPv4 fixe a été attribuée sur le réseau privé afin de garantir une interaction optimale entre les machines de services et leur machine mandataire.&lt;br /&gt;
&lt;br /&gt;
=== '''Mise a jour du fichier'''  /etc/network/interfaces ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
# Interface loopback&lt;br /&gt;
auto lo&lt;br /&gt;
iface lo inet loopback&lt;br /&gt;
&lt;br /&gt;
# Interface principale (eth0) - IPv4 statique + IPv6 automatique&lt;br /&gt;
auto eth0&lt;br /&gt;
iface eth0 inet static&lt;br /&gt;
    address 192.168.50.12&lt;br /&gt;
    netmask 255.255.255.254  # /24 &lt;br /&gt;
    gateway 192.168.50.1     # @mandataire&lt;br /&gt;
&lt;br /&gt;
iface eth0 inet6 auto  # Attribution automatique d'une IPv6&lt;br /&gt;
&lt;br /&gt;
# Interface secondaire (eth1) - IPv6 automatique uniquement&lt;br /&gt;
auto eth1&lt;br /&gt;
iface eth1 inet6 auto&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Il faut ensuite aciver l'interface en faisan'''t  ifdown eth0 &amp;amp;&amp;amp; ifup eth0''' et puis  '''ifdown eth1 &amp;amp;&amp;amp; ifup eth1''' aprés faire le '''systemctl restart networking''' pour mettre a jour les configurations du reseau.&lt;br /&gt;
&lt;br /&gt;
Les commandes : &lt;br /&gt;
&lt;br /&gt;
* ip route show : pour afficher la table de routage.&lt;br /&gt;
* ip -4 addr show : pour afficher l'adresse ipv4   #'''''192.168.50.12'''''&lt;br /&gt;
* ip -6 addr show : pour afficher l'adresse ipv6   #'''''2001:660:4401:60a0:216:3eff:fe83:a3c8'''''&lt;br /&gt;
&lt;br /&gt;
Grace a toute ses configurations, nous pouvons faire un ping sur la machine mandataire RockStar et sur la machine de service Kasav &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:~# ping 192.168.50.13        #ping sur la machine de service Kasav&lt;br /&gt;
PING 192.168.50.13 (192.168.50.13) 56(84) bytes of data.&lt;br /&gt;
64 bytes from 192.168.50.13: icmp_seq=1 ttl=64 time=0.132 ms&lt;br /&gt;
64 bytes from 192.168.50.13: icmp_seq=2 ttl=64 time=0.318 ms&lt;br /&gt;
64 bytes from 192.168.50.13: icmp_seq=3 ttl=64 time=0.369 ms&lt;br /&gt;
64 bytes from 192.168.50.13 icmp_seq=4 ttl=64 time=0.356 ms&lt;br /&gt;
--- 192.168.50.13 ping statistics ---&lt;br /&gt;
4 packets transmitted, 4 received, 0% packet loss, time 3077ms&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== '''Installation des services''' ===&lt;br /&gt;
Installation des services pour la suite du tp, les services a installé sont&lt;br /&gt;
&lt;br /&gt;
* '''Ssh''' : pour permettre l’accès à distance sécurisé à la machine pour l’administration et la maintenance&lt;br /&gt;
* '''Apache2 (Serveur web)''' : pour heberger des applications et sites web accessibles aux utilisateurs&lt;br /&gt;
* '''Bind9''' : pour assurer  la résolution de noms de domaine, essentielle pour le bon fonctionnement des services sur le réseau&lt;br /&gt;
&lt;br /&gt;
La commnde pour installer est '''apt install -y openssh-server apache2 bind9'''Après l'installation :&lt;br /&gt;
&lt;br /&gt;
Vérifiez si les services sont en cours d'exécution  '''systemctl status ssh apache2 bind9.'''&lt;br /&gt;
&lt;br /&gt;
Activez et démarrez les services si nécessaire '''systemctl enable --now ssh apache2 bind9'''&lt;br /&gt;
&lt;br /&gt;
== '''Configuration de la machine mandataire''' ==&lt;br /&gt;
&lt;br /&gt;
=== '''Mise à jour du fichier''' ===&lt;br /&gt;
'''&amp;lt;code&amp;gt;Modification du fichier /etc/network/interfaces&amp;lt;/code&amp;gt;'''&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
# Fichier /etc/network/interfaces&lt;br /&gt;
auto lo&lt;br /&gt;
iface lo inet loopback&lt;br /&gt;
&lt;br /&gt;
# Interface publique (réseau routé)&lt;br /&gt;
auto eth1&lt;br /&gt;
iface eth1 inet static&lt;br /&gt;
    address 193.48.57.172/27&lt;br /&gt;
   &lt;br /&gt;
&lt;br /&gt;
iface eth1 inet6 auto&lt;br /&gt;
&lt;br /&gt;
# Interface privée &lt;br /&gt;
auto eth0&lt;br /&gt;
iface eth0 inet static&lt;br /&gt;
    address 192.168.50.1/24&lt;br /&gt;
&lt;br /&gt;
iface eth0 inet6 auto&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Il faut ensuite aciver l'interface en faisan'''t  ifdown eth0 &amp;amp;&amp;amp; ifup eth0''' et puis  '''ifdown eth1 &amp;amp;&amp;amp; ifup eth1''' aprés faire le '''systemctl restart networking''' pour mettre a jour les configurations du reseau.&lt;br /&gt;
&lt;br /&gt;
=== Mise en place de la mascarade (NAT) ===&lt;br /&gt;
La mise en place de la masquerade (NAT) permet aux machines d’un réseau privé d’accéder au réseau externe en utilisant l’adresse IP publique de la passerelle, tout en masquant l’architecture interne et en améliorant la sécurité.&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
echo &amp;quot;net.ipv4.ip_forward=1&amp;quot; &amp;gt;&amp;gt; /etc/sysctl.conf&lt;br /&gt;
sysctl -p&lt;br /&gt;
&lt;br /&gt;
# Règles iptables pour la mascarade&lt;br /&gt;
iptables -t nat -A POSTROUTING -s 192.168.50.0/24 -o eth1 -j MASQUERADE&lt;br /&gt;
iptables -A FORWARD -i eth0 -o eth1 -j ACCEPT&lt;br /&gt;
iptables -A FORWARD -i eth1 -o eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT&lt;br /&gt;
&lt;br /&gt;
# Sauvegarde pour persistance&lt;br /&gt;
iptables-save &amp;gt; /etc/iptables/rules.v4&lt;br /&gt;
&lt;br /&gt;
# Ajout dans interfaces pour chargement au démarrage&lt;br /&gt;
post-up iptables-restore &amp;lt; /etc/iptables/rules.v4&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== '''Installation des paquetages  :''' ===&lt;br /&gt;
De la même manière que pour Moon et Apollo on installe les paquetages :&lt;br /&gt;
 apt install -y openssh-server apache2 bind9&lt;br /&gt;
Puis après l'installation on vérifie si les services sont en cours d'exécution :&lt;br /&gt;
 systemctl status ssh apache2 bind9&lt;br /&gt;
Activez et démarrez les services si nécessaire :&lt;br /&gt;
 systemctl enable --now ssh apache2 bind9&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==  '''Serveur SSH''' ==&lt;br /&gt;
Notre machine virtuelle doit etre accessible par SSH, on autorise donc l'accès par l'utilisateur '''Root en modifiant le fichier de de configuration &amp;lt;code&amp;gt;/etc/ssh/sshd_config  :&amp;lt;/code&amp;gt;'''&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
PermitRootLogin yes&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Il faut ensuite redemarrer le serveur ssh en faisant :&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/etc/ssh# /etc/init.d/ssh restart&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Pour gérer la redirection du SSH, on doit configurer '''nftables''' sur nos machines de service en redirigeant les ports 2201 et 2202&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
nft add table ip nat&lt;br /&gt;
nft add chain ip nat PREROUTING { type nat hook prerouting priority 0 \; }&lt;br /&gt;
nft add rule ip nat PREROUTING tcp dport 2201 dnat to 192.168.50.12:22                 &lt;br /&gt;
nft add rule ip nat PREROUTING tcp dport 2202 dnat to 192.168.50.3:22              &lt;br /&gt;
nft add chain ip nat POSTROUTING { type nat hook postrouting priority 100 \; }&lt;br /&gt;
nft add rule ip nat POSTROUTING masquerade&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Maintenant, on peut se connecter en SSH sur les machiches virtuelles de services:  De Elf, on peut se connecter a Kasav&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/# ssh root@192.168.50.3&lt;br /&gt;
root@192.168.50.3's password: &lt;br /&gt;
Linux Kasav 4.19.0-26-amd64 #1 SMP Debian 4.19.304-1 (2024-01-09) x86_64&lt;br /&gt;
&lt;br /&gt;
The programs included with the Devuan GNU/Linux system are free software;&lt;br /&gt;
the exact distribution terms for each program are described in the&lt;br /&gt;
individual files in /usr/share/doc/*/copyright.&lt;br /&gt;
&lt;br /&gt;
Devuan GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent&lt;br /&gt;
permitted by applicable law.&lt;br /&gt;
Last login: Tue Feb  3 11:34:45 2026 from 192.168.50.12&lt;br /&gt;
root@Kasav:~# &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Serveur DNS''' ==&lt;br /&gt;
Nous avons configuré un serveur DNS pour gérer les noms de domaine de nos machines virtuelles : '''elvis21.tech''' .&lt;br /&gt;
&lt;br /&gt;
La première étape était d'acquérir les noms de domaine pour '''Elf''' sur https://www.gandi.net/fr '''.''' La seconde étape était d'acquerir les certificats.&lt;br /&gt;
&lt;br /&gt;
Après avoir suivi le tutoriel, nous obtenons deux fichiers : '''myserver.key''' (la clé privée) et '''server.csr''' (la demande de certificat). Ces fichiers nous permettrons de configurer '''DNSSEC''' et sécuriser la zone DNS.&lt;br /&gt;
&lt;br /&gt;
=== Configuration bind9 ===&lt;br /&gt;
&lt;br /&gt;
==== Configuration du Serveur DNS Maître et Secondaire ====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
$TTL 86400&lt;br /&gt;
@ IN SOA ns1.elvis21.tech. admin.elvis21.tech. (&lt;br /&gt;
        3298267246      ;Version&lt;br /&gt;
        3600            ;Refresh&lt;br /&gt;
        1800            ;Retry&lt;br /&gt;
        604800          ;Expire&lt;br /&gt;
        86400 )         ;Minimum TTL&lt;br /&gt;
;&lt;br /&gt;
@  IN NS ns1.elvis21.tech.&lt;br /&gt;
&lt;br /&gt;
ns1 IN A 192.168.50.12&lt;br /&gt;
ns2 IN A 192.168.50.1&lt;br /&gt;
 IN A 192.168.50.12&lt;br /&gt;
      IN AAAA 2001:660:4401:60a0:216:3eff:fe83:a3c8&lt;br /&gt;
www IN A 192.168.50.12&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Dans &amp;lt;code&amp;gt;/etc/bind/named.conf.local&amp;lt;/code&amp;gt; :avons configuré les zones DNS&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/etc/bind# cat named.conf.local &lt;br /&gt;
zone &amp;quot;elvis21.tech&amp;quot; {&lt;br /&gt;
    type primary;&lt;br /&gt;
    file &amp;quot;/etc/bind/zones/db.elvis21.tech&amp;quot;;&lt;br /&gt;
    allow-transfer {&lt;br /&gt;
      2001:660:4401:60a0:216:3eff:fe70:7f1c;&lt;br /&gt;
      2001:660:4401:60a0:216:3eff:fe9a:ea1c;&lt;br /&gt;
      };&lt;br /&gt;
    also-notify { 2001:660:4401:60a0:216:3eff:fe70:7f1c; };&lt;br /&gt;
    inline-signing yes;   // DNSSEC automatique&lt;br /&gt;
    key-directory &amp;quot;/etc/bind/keys&amp;quot;; // répertoire des clefs, attention aux droits&lt;br /&gt;
    dnssec-policy &amp;quot;dnssecpolicy&amp;quot;;  // politique pour les clefs de chiffrement&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
zone &amp;quot;kasav.online&amp;quot; {&lt;br /&gt;
    type secondary;&lt;br /&gt;
    file &amp;quot;/etc/bind/backup/db.kasav.online&amp;quot;;&lt;br /&gt;
    primaries { 2001:660:4401:60a0:216:3eff:fe9a:ea1c; };&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
dnssec-policy &amp;quot;dnssecpolicy&amp;quot; {&lt;br /&gt;
  keys {&lt;br /&gt;
    ksk key-directory lifetime unlimited algorithm 13;&lt;br /&gt;
    zsk key-directory lifetime unlimited algorithm 13;&lt;br /&gt;
  };&lt;br /&gt;
  nsec3param;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/etc/bind# named-checkzone elvis21.tech /etc/bind/db.elvis21.tech&lt;br /&gt;
zone elvis21.tech/IN: loaded serial 3298267246&lt;br /&gt;
OK&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
openssl req -nodes -newkey rsa:2048 -sha256 -keyout elvis21.tech.key -out elvis21.csr&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
[[Fichier:ImageDns.png|vignette|994x994px|centré]]&lt;br /&gt;
&lt;br /&gt;
== '''Mise en place du serveur Apache (http et https)''' ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
apt update&lt;br /&gt;
apt install apache2&lt;br /&gt;
systemctl enable --now apache2&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
[[Fichier:Elvis21.tech-DNS.png|gauche|vignette|863x863px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Installation Fail2ban''' ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/# apt install fail2ban &lt;br /&gt;
Installing:                     &lt;br /&gt;
  fail2ban&lt;br /&gt;
&lt;br /&gt;
root@Elf:/# systemctl status fail2ban&lt;br /&gt;
fail2ban.service - Fail2Ban Service&lt;br /&gt;
    Loaded: loaded (/usr/lib/systemd/system/fail2ban.service, disabled)&lt;br /&gt;
    Active: active (running)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/# service fail2ban status                             &lt;br /&gt;
Status of Authentication failure monitor: fail2ban is running.&lt;br /&gt;
 root@Elf:/# fail2ban-client status&lt;br /&gt;
Status&lt;br /&gt;
|- Number of jail:	1&lt;br /&gt;
`- Jail list:	sshd&lt;br /&gt;
&lt;br /&gt;
root@Elf:/# fail2ban-client status sshd&lt;br /&gt;
Status for the jail: sshd&lt;br /&gt;
|- Filter&lt;br /&gt;
|  |- Currently failed:	0&lt;br /&gt;
|  |- Total failed:	0&lt;br /&gt;
|  `- File list:	/var/log/auth.log&lt;br /&gt;
`- Actions&lt;br /&gt;
   |- Currently banned:	0&lt;br /&gt;
   |- Total banned:	0&lt;br /&gt;
   `- Banned IP list:	&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Mise en place du serveur Apache (http et https) ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/# service apache2 status&lt;br /&gt;
apache2 is running.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''WIFI''' ==&lt;br /&gt;
Faire ip link&lt;br /&gt;
&lt;br /&gt;
ensuite sudo airodump-ng wlanx  -- Remplacer x par le numero du wlan present &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
BSSID              PWR  Beacons    #Data, #/s  CH   MB   ENC CIPHER  AUTH ESSID&lt;br /&gt;
04:DA:D2:9C:50:54  -62       23       11    0   4   54e. WEP  WEP         cracotte05                         &lt;br /&gt;
04:DA:D2:9C:50:5A  -61        2        1    0   4   54e. WEP  WEP         cracotte11    &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;sudo airodump-ng wlan1 --bssid 04:DA:D2:9C:50:5A  -c4 --write log_airdump&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
sudo airodump-ng wlan1 --write airdump --bssid 04:DA:D2:9C:50:5A -c4&lt;br /&gt;
17:31:10  Created capture file &amp;quot;airdump-04.cap&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
 CH  4 ][ Elapsed: 39 mins ][ 2026-02-10 18:11 ][ fixed channel wlan1: 13 &lt;br /&gt;
&lt;br /&gt;
 BSSID              PWR RXQ  Beacons    #Data, #/s  CH   MB   ENC CIPHER  AUTH ESSID&lt;br /&gt;
&lt;br /&gt;
 04:DA:D2:9C:50:5A  -58   3     9766    43771   21   4   54e. WEP  WEP         cracotte11                                                                                                   &lt;br /&gt;
&lt;br /&gt;
 BSSID              STATION            PWR    Rate    Lost   Frames  Notes  Probes&lt;br /&gt;
&lt;br /&gt;
 04:DA:D2:9C:50:5A  40:A5:EF:01:2E:FA  -77    0 -48e   127    46300                                                                                                                          &lt;br /&gt;
Quitting...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
aircrack-ng airdump-05.cap &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
           Aircrack-ng 1.7 &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                 [00:25:47] Tested 869 keys (got 34546 IVs)&lt;br /&gt;
                          Got 35002 out of 35000 IVsStarting PTW attack with 35002 KB    depth   byte(vote)&lt;br /&gt;
    0    0/  2   FF(50176) 1C(43520) E6(42752) 3F(42496) B6(42496) &lt;br /&gt;
    1    0/  6   FF(48128) AC(46336) 90(42752) 8E(42496) 04(42240) &lt;br /&gt;
    2    0/  1   BD(50688) 7F(43776) 75(42752) E6(41216) F2(41216) &lt;br /&gt;
    3    9/  3   CE(39936) 05(39680) 5C(39680) 9A(39168) F4(39168) &lt;br /&gt;
    4   41/  4   6C(37376) 1E(37120) 80(37120) 88(37120) A7(37120) &lt;br /&gt;
&lt;br /&gt;
             KEY FOUND! [ FF:FF:FF:FF:FA:BC:12:CB:AE:EE:EE:EE:EE ]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
ssh -oKexAlgorithms=+diffie-hellman-group14-sha1 -oHostKeyAlgorithms=+ssh-rsa -oCiphers=+aes128-cbc admin@172.27.0.1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
C9200-E304&amp;gt;en&lt;br /&gt;
Password: &lt;br /&gt;
C9200-E304#config t&lt;br /&gt;
Enter configuration commands, one per line.  End with CNTL/Z.&lt;br /&gt;
C9200-E304(config)#vlan 28&lt;br /&gt;
C9200-E304(config-vlan)#name PoolEvora&lt;br /&gt;
C9200-E304(config-vlan)#exit &lt;br /&gt;
C9200-E304(config)#exit&lt;br /&gt;
C9200-E304#write&lt;br /&gt;
Building configuration...&lt;br /&gt;
[OK]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
C9200-E304#en&lt;br /&gt;
C9200-E304#config t&lt;br /&gt;
Enter configuration commands, one per line.  End with CNTL/Z.&lt;br /&gt;
C9200-E304(config)#ip dhcp pool PoolEvora  &lt;br /&gt;
C9200-E304(dhcp-config)#network 10.60.11.0 255.255.255.0&lt;br /&gt;
C9200-E304(dhcp-config)#dns-server 193.48.57.172&lt;br /&gt;
C9200-E304(dhcp-config)#default-router 10.60.11.254&lt;br /&gt;
C9200-E304(dhcp-config)#exit&lt;br /&gt;
C9200-E304(config)#exit&lt;br /&gt;
C9200-E304#write&lt;br /&gt;
Building configuration...&lt;br /&gt;
[OK]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
ip dhcp pool PoolTom&lt;br /&gt;
 network 10.60.10.0 255.255.255.0&lt;br /&gt;
 dns-server 193.48.57.168 &lt;br /&gt;
 default-router 10.60.10.254 &lt;br /&gt;
!         &lt;br /&gt;
ip dhcp pool PoolEvora&lt;br /&gt;
 network 10.60.11.0 255.255.255.0&lt;br /&gt;
 dns-server 193.48.57.172 &lt;br /&gt;
 default-router 10.60.11.254 &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;VRRP&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
C9200-E304&amp;gt;en &lt;br /&gt;
Password: &lt;br /&gt;
C9200-E304#config t&lt;br /&gt;
Enter configuration commands, one per line.  End with CNTL/Z.&lt;br /&gt;
C9200-E304(config)#interface vlan 28&lt;br /&gt;
C9200-E304(config-if)#ip address 10.60.11.2 255.255.255.0&lt;br /&gt;
C9200-E304(config-if)#ipv6 address 2001:660:4401:60ab::2/64&lt;br /&gt;
C9200-E304(config-if)#vrrp 28 address-family ipv4        &lt;br /&gt;
C9200-E304(config-if-vrrp)#priority 110&lt;br /&gt;
C9200-E304(config-if-vrrp)#address 10.60.11.1 primary&lt;br /&gt;
C9200-E304(config-if-vrrp)#exit&lt;br /&gt;
C9200-E304(config-if)#exit&lt;br /&gt;
C9200-E304(config)#exit&lt;br /&gt;
C9200-E304#write&lt;br /&gt;
Building configuration...&lt;br /&gt;
[OK]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;WIFI e304&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
ssh admin@172.27.0.4 \&lt;br /&gt;
  -o KexAlgorithms=+diffie-hellman-group1-sha1 \&lt;br /&gt;
  -o HostKeyAlgorithms=+ssh-rsa \&lt;br /&gt;
  -o Ciphers=+aes128-cbc \&lt;br /&gt;
  -o MACs=+hmac-sha1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Vsouopme</name></author>
	</entry>
	<entry>
		<id>https://wiki-se.plil.fr/mediawiki/index.php?title=Atelier_SysRes_SE4_2025/2026_E11&amp;diff=12307</id>
		<title>Atelier SysRes SE4 2025/2026 E11</title>
		<link rel="alternate" type="text/html" href="https://wiki-se.plil.fr/mediawiki/index.php?title=Atelier_SysRes_SE4_2025/2026_E11&amp;diff=12307"/>
		<updated>2026-02-21T20:28:51Z</updated>

		<summary type="html">&lt;p&gt;Vsouopme : /* Serveur DNS */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Projet Virtualisation /Administration Systeme-Réseau - Machine SE4.Elf =&lt;br /&gt;
Dans le cadre de ce projet, nnous avons déployés une infrastructure composée de '''deux machines dédiées aux services''' et d’une '''machine mandataire''', le tout à l’aide de l'environnement  '''Xen.'''&lt;br /&gt;
&lt;br /&gt;
== Création des machines virtuelles ==&lt;br /&gt;
Les machines sont créées  sur le Dom0 '''Capbreton.plil.info''' en faisant un '''ssh root@capbreton.plil.info''' &lt;br /&gt;
&lt;br /&gt;
Sur la capbreton.plil.info, &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
xen create-image --hostname=SE4.Elf --dhcp --dir=/usr/local/xen --size=10G --dist=excalibur --memory=2G --bridge=Styx --force&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; '''Xen-create-image''' :  Commande permettant de créer une nouvelle machine virtuelle Xen&lt;br /&gt;
&lt;br /&gt;
'''--hostname=SE4.Elf :''' Pour le nom de la machine &lt;br /&gt;
&lt;br /&gt;
'''--size=10G''' : La taille du disque &lt;br /&gt;
&lt;br /&gt;
'''--bridge=Styx''' : Le nom du bridge &lt;br /&gt;
&lt;br /&gt;
Par la suite il faut creer un fichier dans le répertoire &amp;lt;code&amp;gt;/etc/network/interfaces.d&amp;lt;/code&amp;gt; du Dom0 pour créer notre pont. (NB: Il faut noter que cette etape on peut la faire avant la creation de notre VM&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
auto Styx&lt;br /&gt;
&lt;br /&gt;
iface Styx inet manual&lt;br /&gt;
   bridge_ports none&lt;br /&gt;
   up ip link set $IFACE up&lt;br /&gt;
   down ip link set $IFACE down&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;La commande '''xen list :''' Affiche les '''machines virtuelles''' (VM) qui sont actuellement gérées par Xen (Elle fait la liste des VM allumée).&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
root@capbreton:~# xen list&lt;br /&gt;
SE4.batman                                 322  2048     1     -b----      37.5&lt;br /&gt;
SE4.Moon                                   326  2048     1     -b----      41.1&lt;br /&gt;
SE4.C2                                     332  1024     1     -b----      18.1&lt;br /&gt;
SE4.Tension                                343  2048     1     -b----       7.8&lt;br /&gt;
SE4.CachyOS                                365  2048     1     -b----      10.2&lt;br /&gt;
SE4.RockStar                               367  2048     1     -b----       6.1&lt;br /&gt;
SE4.Kasav                                  368  2048     1     -b----       5.9&lt;br /&gt;
SE4.Elf                                    369  2048     1     -b----       5.6&lt;br /&gt;
SE4.catwoman                               370  2048     1     -b----       6.1&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;-La commande '''xen create /etc/xen/SE4.Elf.cfg''' permet d'allumer la Machine virtuellle.&lt;br /&gt;
&lt;br /&gt;
-La commande xen '''console SE4.Elf''' permet d'acceder  / de se connecter  a la VM.&lt;br /&gt;
&lt;br /&gt;
-La commande '''xen shutdown''' '''SE4.Elf''' permet d'eteindre la machine virtuelle.&lt;br /&gt;
&lt;br /&gt;
Lors de la tentative de connexion, il y'a une un probleme , pour y remedier,  '''Ctrl + AltGr + ] =&amp;gt; vi =&amp;gt; :q! =&amp;gt; reconnexion'''&lt;br /&gt;
&lt;br /&gt;
Pour voir le mot de passe de la VM, '''cat /var/log/xen-tools/SE4.Elf.log'''&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
Installation Summary&lt;br /&gt;
---------------------&lt;br /&gt;
Hostname        :  SE4.Elf&lt;br /&gt;
Distribution    :  excalibur&lt;br /&gt;
MAC Address     :  00:16:3E:83:A3:C7&lt;br /&gt;
IP Address(es)  :  dynamic&lt;br /&gt;
SSH Fingerprint :  SHA256:IrPhxhB4m1s+eaPaLynS6NlE/HfL78+y3ba3DPuHFQU (DSA)&lt;br /&gt;
SSH Fingerprint :  SHA256:RT+MZtlFxC7BrdYORzOcxDX+SKsJrLzOGWWngX2pKz4 (ECDSA)&lt;br /&gt;
SSH Fingerprint :  SHA256:aLYvYqUPX2Q/J5P0nTpdpMyrFD5xopRqkFKuYb7QUo4 (ED25519)&lt;br /&gt;
SSH Fingerprint :  SHA256:b0ddm9FYx4/losJU8/pE9MXx7102ygkAMjChOvPlNhE (RSA)&lt;br /&gt;
Root Password   :  X&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;- La commande '''vi /etc/hostname''' pour changer le nom de la VM&lt;br /&gt;
&lt;br /&gt;
== '''Configuration de la Machine de Services''' ==&lt;br /&gt;
Il faut creer deux partitions LVM de 10G pour votre machine virtuelle et modifiez le fichier de configuration de la machine virtuelle de services pour faire en sorte que les répertoires &amp;lt;code&amp;gt;/'''var'''&amp;lt;/code&amp;gt; et &amp;lt;code&amp;gt;'''/home'''&amp;lt;/code&amp;gt; de la machine virtuelle soient implantés sur ces partitions LVM&lt;br /&gt;
&lt;br /&gt;
=== '''Création des volumes logiques''' ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
lvcreate -L 10G -n lv_var_SE4Elf &lt;br /&gt;
lvcreate -L 10G -n lv_home_SE4Elf &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Faire '''lvdisplay''' pour faire la verification&lt;br /&gt;
&lt;br /&gt;
Depuis le serveur Capbreton, on a créé 2 fichiers de partitions dans &amp;lt;code&amp;gt;/dev/virtual&amp;lt;/code&amp;gt; pour chaque machines de services &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@capbreton:/dev/virtual# ls &lt;br /&gt;
SE4.Poseidon.home lv_home_SE4Elf lv_var_SE4Elf  SE4.Gaby.home SE4.Poseidon.var SE4.Gaby.var &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Apres nous avons modifié le fichier /etc/xen/SE4.Elf.cfg piur y ajouter deux répertoires&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
disk = [&lt;br /&gt;
  'file:/usr/local/xen/domains/SE4.Elf/disk.img,xvda2,w',&lt;br /&gt;
  'file:/usr/local/xen/domains/SE4.Elf/swap.img,xvda1,w',&lt;br /&gt;
  'phy:/dev/vg0/lv_var_SE4Elf,xvdb,w',&lt;br /&gt;
  'phy:/dev/vg0/lv_home_SE4Elf,xvdc,w'&lt;br /&gt;
]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== ''' Création et formatage des partitions''' ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
mkfs -t ext4 /dev/xvdb  # Formatage de la partition pour /var &lt;br /&gt;
mkfs -t ext4 /dev/xvdc  # Formatage de la partition pour /home&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== '''Préparer les partitions et déplacer les données :''' ===&lt;br /&gt;
&lt;br /&gt;
* '''Montage temporaire des partitions dans &amp;lt;code&amp;gt;/mnt&amp;lt;/code&amp;gt; :'''&lt;br /&gt;
&lt;br /&gt;
Pour pouvoir déplacer les données, nous avons du monter les nouvelles partitions LVM dans un répertoire temporaire &amp;lt;code&amp;gt;/mnt&amp;lt;/code&amp;gt;.  On a créé 2 partitions une pour &amp;lt;code&amp;gt;/var&amp;lt;/code&amp;gt; et une &amp;lt;code&amp;gt;/home&amp;lt;/code&amp;gt; sous les noms xvdb et xvdc dans  &amp;lt;code&amp;gt;/dev&amp;lt;/code&amp;gt;  ,que l'on monte avec  :&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
mount /dev/xvdb /mnt&lt;br /&gt;
mount /dev/xvdc /mnt&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* '''Déplacement des fichiers existants'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
mv /var/* /mnt # Déplacement des fichiers de /var vers la nouvelle partition&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== '''Démonter les partitions temporaires :''' ===&lt;br /&gt;
Avant de configurer les montages permanents, on démonte les partitions des répertoires temporaires (&amp;lt;code&amp;gt;/mnt&amp;lt;/code&amp;gt;)&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
umount /mnt # Démontage après transfert des données&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== '''Modification du fichier &amp;lt;code&amp;gt;/etc/fstab&amp;lt;/code&amp;gt; pour un montage automatique au démarrage :''' ===&lt;br /&gt;
On modifie le fichier &amp;lt;code&amp;gt;'''/etc/fstab'''&amp;lt;/code&amp;gt;, qui contient la liste des partitions.&lt;br /&gt;
&lt;br /&gt;
Ajout des nouvelles partitions LVM au fichier &amp;lt;code&amp;gt;/etc/fstab&amp;lt;/code&amp;gt; :&lt;br /&gt;
&lt;br /&gt;
* '''/dev/xvdb /var ext4 defaults 0 2'''&lt;br /&gt;
* '''/dev/xvdc /home ext4 defaults 0''' &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
# /etc/fstab: static file system information.&lt;br /&gt;
#&lt;br /&gt;
# &amp;lt;file system&amp;gt; &amp;lt;mount point&amp;gt; &amp;lt;type&amp;gt; &amp;lt;options&amp;gt; &amp;lt;dump&amp;gt; &amp;lt;pass&amp;gt;&lt;br /&gt;
proc             /proc           proc  defaults   0     0&lt;br /&gt;
devpts            /dev/pts       devpts rw,noexec,nosuid,gid=5,mode=620 0 0 /dev/xvda1 none swap sw 0 0&lt;br /&gt;
/dev/xvda1 none swap sw 0 0&lt;br /&gt;
/dev/xvda2 / ext4 noatime,nodiratime,errors=remount-ro 0 1&lt;br /&gt;
/dev/xvdb /var ext4 defaults 0 2 &lt;br /&gt;
/dev/xvdc /home ext4 defaults 0 2&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== '''Monter les partitions définies dans &amp;lt;code&amp;gt;fstab&amp;lt;/code&amp;gt; :''' ===&lt;br /&gt;
Pour monter toutes les partitions définies dans le fichier &amp;lt;code&amp;gt;/etc/fstab&amp;lt;/code&amp;gt;  :&lt;br /&gt;
 mount -a  # Remontage des partitions définies dans fstab&lt;br /&gt;
Cette commande monte toutes les partitions qui ne sont pas encore montées et qui sont définies dans &amp;lt;code&amp;gt;/etc/fstab&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
remet les données dans le fichier déplacer.&lt;br /&gt;
&lt;br /&gt;
Puis, pour appliquer les changement nous avons redémarré la VM en faisant le '''xen shutdown SE4.Elf''' ,  '''xen create /etc/xen/SE4.Elf.cfg''',  '''xen console SE4.Elf'''&lt;br /&gt;
&lt;br /&gt;
=== '''Vérification des partitions montées''' ===&lt;br /&gt;
Après avoir configuré le montage automatique et remonté les partitions, nous devons vérifier que les partitions sont correctement montées. Nous avons utilisé la commande '''&amp;lt;code&amp;gt;df -h&amp;lt;/code&amp;gt;''' pour afficher l'espace disque utilisé et disponible sur les partitions montées.&lt;br /&gt;
&lt;br /&gt;
Cela nous permet de confirmer que les partitions '''&amp;lt;code&amp;gt;/var&amp;lt;/code&amp;gt;''' et '''&amp;lt;code&amp;gt;/home&amp;lt;/code&amp;gt;''' sont correctement montées sur les répertoires associés et qu'il n'y a pas de problème d'espace disque.&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== &amp;lt;big&amp;gt;'''Configuration Reseau'''&amp;lt;/big&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
Tout d'abord nous avons modifier le fichier /etc/xen/SE4.Elf pour y ajouter une nouvelle interface sur le bridge de la promotion SE4.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Afin d’assurer une connectivité IPv6 stable et routée pour un accès direct à Internet, ainsi qu’une communication efficace avec la machine mandataire, nous avons modifié le fichier '''&amp;lt;code&amp;gt;/etc/network/interfaces&amp;lt;/code&amp;gt;'''. De plus, une adresse IPv4 fixe a été attribuée sur le réseau privé afin de garantir une interaction optimale entre les machines de services et leur machine mandataire.&lt;br /&gt;
&lt;br /&gt;
=== '''Mise a jour du fichier'''  /etc/network/interfaces ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
# Interface loopback&lt;br /&gt;
auto lo&lt;br /&gt;
iface lo inet loopback&lt;br /&gt;
&lt;br /&gt;
# Interface principale (eth0) - IPv4 statique + IPv6 automatique&lt;br /&gt;
auto eth0&lt;br /&gt;
iface eth0 inet static&lt;br /&gt;
    address 192.168.50.12&lt;br /&gt;
    netmask 255.255.255.254  # /24 &lt;br /&gt;
    gateway 192.168.50.1     # @mandataire&lt;br /&gt;
&lt;br /&gt;
iface eth0 inet6 auto  # Attribution automatique d'une IPv6&lt;br /&gt;
&lt;br /&gt;
# Interface secondaire (eth1) - IPv6 automatique uniquement&lt;br /&gt;
auto eth1&lt;br /&gt;
iface eth1 inet6 auto&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Il faut ensuite aciver l'interface en faisan'''t  ifdown eth0 &amp;amp;&amp;amp; ifup eth0''' et puis  '''ifdown eth1 &amp;amp;&amp;amp; ifup eth1''' aprés faire le '''systemctl restart networking''' pour mettre a jour les configurations du reseau.&lt;br /&gt;
&lt;br /&gt;
Les commandes : &lt;br /&gt;
&lt;br /&gt;
* ip route show : pour afficher la table de routage.&lt;br /&gt;
* ip -4 addr show : pour afficher l'adresse ipv4   #'''''192.168.50.12'''''&lt;br /&gt;
* ip -6 addr show : pour afficher l'adresse ipv6   #'''''2001:660:4401:60a0:216:3eff:fe83:a3c8'''''&lt;br /&gt;
&lt;br /&gt;
Grace a toute ses configurations, nous pouvons faire un ping sur la machine mandataire RockStar et sur la machine de service Kasav &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:~# ping 192.168.50.13        #ping sur la machine de service Kasav&lt;br /&gt;
PING 192.168.50.13 (192.168.50.13) 56(84) bytes of data.&lt;br /&gt;
64 bytes from 192.168.50.13: icmp_seq=1 ttl=64 time=0.132 ms&lt;br /&gt;
64 bytes from 192.168.50.13: icmp_seq=2 ttl=64 time=0.318 ms&lt;br /&gt;
64 bytes from 192.168.50.13: icmp_seq=3 ttl=64 time=0.369 ms&lt;br /&gt;
64 bytes from 192.168.50.13 icmp_seq=4 ttl=64 time=0.356 ms&lt;br /&gt;
--- 192.168.50.13 ping statistics ---&lt;br /&gt;
4 packets transmitted, 4 received, 0% packet loss, time 3077ms&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== '''Installation des services''' ===&lt;br /&gt;
Installation des services pour la suite du tp, les services a installé sont&lt;br /&gt;
&lt;br /&gt;
* '''Ssh''' : pour permettre l’accès à distance sécurisé à la machine pour l’administration et la maintenance&lt;br /&gt;
* '''Apache2 (Serveur web)''' : pour heberger des applications et sites web accessibles aux utilisateurs&lt;br /&gt;
* '''Bind9''' : pour assurer  la résolution de noms de domaine, essentielle pour le bon fonctionnement des services sur le réseau&lt;br /&gt;
&lt;br /&gt;
La commnde pour installer est '''apt install -y openssh-server apache2 bind9'''Après l'installation :&lt;br /&gt;
&lt;br /&gt;
Vérifiez si les services sont en cours d'exécution  '''systemctl status ssh apache2 bind9.'''&lt;br /&gt;
&lt;br /&gt;
Activez et démarrez les services si nécessaire '''systemctl enable --now ssh apache2 bind9'''&lt;br /&gt;
&lt;br /&gt;
== '''Configuration de la machine mandataire''' ==&lt;br /&gt;
&lt;br /&gt;
=== '''Mise à jour du fichier''' ===&lt;br /&gt;
'''&amp;lt;code&amp;gt;Modification du fichier /etc/network/interfaces&amp;lt;/code&amp;gt;'''&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
# Fichier /etc/network/interfaces&lt;br /&gt;
auto lo&lt;br /&gt;
iface lo inet loopback&lt;br /&gt;
&lt;br /&gt;
# Interface publique (réseau routé)&lt;br /&gt;
auto eth1&lt;br /&gt;
iface eth1 inet static&lt;br /&gt;
    address 193.48.57.172/27&lt;br /&gt;
   &lt;br /&gt;
&lt;br /&gt;
iface eth1 inet6 auto&lt;br /&gt;
&lt;br /&gt;
# Interface privée &lt;br /&gt;
auto eth0&lt;br /&gt;
iface eth0 inet static&lt;br /&gt;
    address 192.168.50.1/24&lt;br /&gt;
&lt;br /&gt;
iface eth0 inet6 auto&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Il faut ensuite aciver l'interface en faisan'''t  ifdown eth0 &amp;amp;&amp;amp; ifup eth0''' et puis  '''ifdown eth1 &amp;amp;&amp;amp; ifup eth1''' aprés faire le '''systemctl restart networking''' pour mettre a jour les configurations du reseau.&lt;br /&gt;
&lt;br /&gt;
=== Mise en place de la mascarade (NAT) ===&lt;br /&gt;
La mise en place de la masquerade (NAT) permet aux machines d’un réseau privé d’accéder au réseau externe en utilisant l’adresse IP publique de la passerelle, tout en masquant l’architecture interne et en améliorant la sécurité.&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
echo &amp;quot;net.ipv4.ip_forward=1&amp;quot; &amp;gt;&amp;gt; /etc/sysctl.conf&lt;br /&gt;
sysctl -p&lt;br /&gt;
&lt;br /&gt;
# Règles iptables pour la mascarade&lt;br /&gt;
iptables -t nat -A POSTROUTING -s 192.168.50.0/24 -o eth1 -j MASQUERADE&lt;br /&gt;
iptables -A FORWARD -i eth0 -o eth1 -j ACCEPT&lt;br /&gt;
iptables -A FORWARD -i eth1 -o eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT&lt;br /&gt;
&lt;br /&gt;
# Sauvegarde pour persistance&lt;br /&gt;
iptables-save &amp;gt; /etc/iptables/rules.v4&lt;br /&gt;
&lt;br /&gt;
# Ajout dans interfaces pour chargement au démarrage&lt;br /&gt;
post-up iptables-restore &amp;lt; /etc/iptables/rules.v4&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== '''Installation des paquetages  :''' ===&lt;br /&gt;
De la même manière que pour Moon et Apollo on installe les paquetages :&lt;br /&gt;
 apt install -y openssh-server apache2 bind9&lt;br /&gt;
Puis après l'installation on vérifie si les services sont en cours d'exécution :&lt;br /&gt;
 systemctl status ssh apache2 bind9&lt;br /&gt;
Activez et démarrez les services si nécessaire :&lt;br /&gt;
 systemctl enable --now ssh apache2 bind9&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==  '''Serveur SSH''' ==&lt;br /&gt;
Notre machine virtuelle doit etre accessible par SSH, on autorise donc l'accès par l'utilisateur '''Root en modifiant le fichier de de configuration &amp;lt;code&amp;gt;/etc/ssh/sshd_config  :&amp;lt;/code&amp;gt;'''&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
PermitRootLogin yes&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Il faut ensuite redemarrer le serveur ssh en faisant :&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/etc/ssh# /etc/init.d/ssh restart&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Pour gérer la redirection du SSH, on doit configurer '''nftables''' sur nos machines de service en redirigeant les ports 2201 et 2202&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
nft add table ip nat&lt;br /&gt;
nft add chain ip nat PREROUTING { type nat hook prerouting priority 0 \; }&lt;br /&gt;
nft add rule ip nat PREROUTING tcp dport 2201 dnat to 192.168.50.12:22                 &lt;br /&gt;
nft add rule ip nat PREROUTING tcp dport 2202 dnat to 192.168.50.3:22              &lt;br /&gt;
nft add chain ip nat POSTROUTING { type nat hook postrouting priority 100 \; }&lt;br /&gt;
nft add rule ip nat POSTROUTING masquerade&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Maintenant, on peut se connecter en SSH sur les machiches virtuelles de services:  De Elf, on peut se connecter a Kasav&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/# ssh root@192.168.50.3&lt;br /&gt;
root@192.168.50.3's password: &lt;br /&gt;
Linux Kasav 4.19.0-26-amd64 #1 SMP Debian 4.19.304-1 (2024-01-09) x86_64&lt;br /&gt;
&lt;br /&gt;
The programs included with the Devuan GNU/Linux system are free software;&lt;br /&gt;
the exact distribution terms for each program are described in the&lt;br /&gt;
individual files in /usr/share/doc/*/copyright.&lt;br /&gt;
&lt;br /&gt;
Devuan GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent&lt;br /&gt;
permitted by applicable law.&lt;br /&gt;
Last login: Tue Feb  3 11:34:45 2026 from 192.168.50.12&lt;br /&gt;
root@Kasav:~# &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Serveur DNS''' ==&lt;br /&gt;
Nous avons configuré un serveur DNS pour gérer les noms de domaine de nos machines virtuelles : '''elvis21.tech''' .&lt;br /&gt;
&lt;br /&gt;
La première étape était d'acquérir les noms de domaine pour '''Elf''' sur https://www.gandi.net/fr '''Gandi.''' La seconde étape était d'acquerir les certificats.&lt;br /&gt;
&lt;br /&gt;
Après avoir suivi le tutoriel, nous obtenons deux fichiers : '''myserver.key''' (la clé privée) et '''server.csr''' (la demande de certificat). Ces fichiers nous permettrons de configurer '''DNSSEC''' et sécuriser la zone DNS.&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
$TTL 86400&lt;br /&gt;
@ IN SOA ns1.elvis21.tech. admin.elvis21.tech. (&lt;br /&gt;
        3298267246      ;Version&lt;br /&gt;
        3600            ;Refresh&lt;br /&gt;
        1800            ;Retry&lt;br /&gt;
        604800          ;Expire&lt;br /&gt;
        86400 )         ;Minimum TTL&lt;br /&gt;
;&lt;br /&gt;
@  IN NS ns1.elvis21.tech.&lt;br /&gt;
&lt;br /&gt;
ns1 IN A 192.168.50.12&lt;br /&gt;
ns2 IN A 192.168.50.1&lt;br /&gt;
 IN A 192.168.50.12&lt;br /&gt;
      IN AAAA 2001:660:4401:60a0:216:3eff:fe83:a3c8&lt;br /&gt;
www IN A 192.168.50.12&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/etc/bind# cat named.conf.local &lt;br /&gt;
zone &amp;quot;elvis21.tech&amp;quot; {&lt;br /&gt;
    type primary;&lt;br /&gt;
    file &amp;quot;/etc/bind/zones/db.elvis21.tech&amp;quot;;&lt;br /&gt;
    allow-transfer {&lt;br /&gt;
      2001:660:4401:60a0:216:3eff:fe70:7f1c;&lt;br /&gt;
      2001:660:4401:60a0:216:3eff:fe9a:ea1c;&lt;br /&gt;
      };&lt;br /&gt;
    also-notify { 2001:660:4401:60a0:216:3eff:fe70:7f1c; };&lt;br /&gt;
    inline-signing yes;   // DNSSEC automatique&lt;br /&gt;
    key-directory &amp;quot;/etc/bind/keys&amp;quot;; // répertoire des clefs, attention aux droits&lt;br /&gt;
    dnssec-policy &amp;quot;dnssecpolicy&amp;quot;;  // politique pour les clefs de chiffrement&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
zone &amp;quot;kasav.online&amp;quot; {&lt;br /&gt;
    type secondary;&lt;br /&gt;
    file &amp;quot;/etc/bind/backup/db.kasav.online&amp;quot;;&lt;br /&gt;
    primaries { 2001:660:4401:60a0:216:3eff:fe9a:ea1c; };&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
dnssec-policy &amp;quot;dnssecpolicy&amp;quot; {&lt;br /&gt;
  keys {&lt;br /&gt;
    ksk key-directory lifetime unlimited algorithm 13;&lt;br /&gt;
    zsk key-directory lifetime unlimited algorithm 13;&lt;br /&gt;
  };&lt;br /&gt;
  nsec3param;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/etc/bind# named-checkzone elvis21.tech /etc/bind/db.elvis21.tech&lt;br /&gt;
zone elvis21.tech/IN: loaded serial 3298267246&lt;br /&gt;
OK&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
openssl req -nodes -newkey rsa:2048 -sha256 -keyout elvis21.tech.key -out elvis21.csr&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
[[Fichier:ImageDns.png|vignette|994x994px|centré]]&lt;br /&gt;
&lt;br /&gt;
== '''Mise en place du serveur Apache (http et https)''' ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
apt update&lt;br /&gt;
apt install apache2&lt;br /&gt;
systemctl enable --now apache2&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
[[Fichier:Elvis21.tech-DNS.png|gauche|vignette|863x863px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Installation Fail2ban''' ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/# apt install fail2ban &lt;br /&gt;
Installing:                     &lt;br /&gt;
  fail2ban&lt;br /&gt;
&lt;br /&gt;
root@Elf:/# systemctl status fail2ban&lt;br /&gt;
fail2ban.service - Fail2Ban Service&lt;br /&gt;
    Loaded: loaded (/usr/lib/systemd/system/fail2ban.service, disabled)&lt;br /&gt;
    Active: active (running)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/# service fail2ban status                             &lt;br /&gt;
Status of Authentication failure monitor: fail2ban is running.&lt;br /&gt;
 root@Elf:/# fail2ban-client status&lt;br /&gt;
Status&lt;br /&gt;
|- Number of jail:	1&lt;br /&gt;
`- Jail list:	sshd&lt;br /&gt;
&lt;br /&gt;
root@Elf:/# fail2ban-client status sshd&lt;br /&gt;
Status for the jail: sshd&lt;br /&gt;
|- Filter&lt;br /&gt;
|  |- Currently failed:	0&lt;br /&gt;
|  |- Total failed:	0&lt;br /&gt;
|  `- File list:	/var/log/auth.log&lt;br /&gt;
`- Actions&lt;br /&gt;
   |- Currently banned:	0&lt;br /&gt;
   |- Total banned:	0&lt;br /&gt;
   `- Banned IP list:	&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Mise en place du serveur Apache (http et https) ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/# service apache2 status&lt;br /&gt;
apache2 is running.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''WIFI''' ==&lt;br /&gt;
Faire ip link&lt;br /&gt;
&lt;br /&gt;
ensuite sudo airodump-ng wlanx  -- Remplacer x par le numero du wlan present &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
BSSID              PWR  Beacons    #Data, #/s  CH   MB   ENC CIPHER  AUTH ESSID&lt;br /&gt;
04:DA:D2:9C:50:54  -62       23       11    0   4   54e. WEP  WEP         cracotte05                         &lt;br /&gt;
04:DA:D2:9C:50:5A  -61        2        1    0   4   54e. WEP  WEP         cracotte11    &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;sudo airodump-ng wlan1 --bssid 04:DA:D2:9C:50:5A  -c4 --write log_airdump&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
sudo airodump-ng wlan1 --write airdump --bssid 04:DA:D2:9C:50:5A -c4&lt;br /&gt;
17:31:10  Created capture file &amp;quot;airdump-04.cap&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
 CH  4 ][ Elapsed: 39 mins ][ 2026-02-10 18:11 ][ fixed channel wlan1: 13 &lt;br /&gt;
&lt;br /&gt;
 BSSID              PWR RXQ  Beacons    #Data, #/s  CH   MB   ENC CIPHER  AUTH ESSID&lt;br /&gt;
&lt;br /&gt;
 04:DA:D2:9C:50:5A  -58   3     9766    43771   21   4   54e. WEP  WEP         cracotte11                                                                                                   &lt;br /&gt;
&lt;br /&gt;
 BSSID              STATION            PWR    Rate    Lost   Frames  Notes  Probes&lt;br /&gt;
&lt;br /&gt;
 04:DA:D2:9C:50:5A  40:A5:EF:01:2E:FA  -77    0 -48e   127    46300                                                                                                                          &lt;br /&gt;
Quitting...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
aircrack-ng airdump-05.cap &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
           Aircrack-ng 1.7 &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                 [00:25:47] Tested 869 keys (got 34546 IVs)&lt;br /&gt;
                          Got 35002 out of 35000 IVsStarting PTW attack with 35002 KB    depth   byte(vote)&lt;br /&gt;
    0    0/  2   FF(50176) 1C(43520) E6(42752) 3F(42496) B6(42496) &lt;br /&gt;
    1    0/  6   FF(48128) AC(46336) 90(42752) 8E(42496) 04(42240) &lt;br /&gt;
    2    0/  1   BD(50688) 7F(43776) 75(42752) E6(41216) F2(41216) &lt;br /&gt;
    3    9/  3   CE(39936) 05(39680) 5C(39680) 9A(39168) F4(39168) &lt;br /&gt;
    4   41/  4   6C(37376) 1E(37120) 80(37120) 88(37120) A7(37120) &lt;br /&gt;
&lt;br /&gt;
             KEY FOUND! [ FF:FF:FF:FF:FA:BC:12:CB:AE:EE:EE:EE:EE ]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
ssh -oKexAlgorithms=+diffie-hellman-group14-sha1 -oHostKeyAlgorithms=+ssh-rsa -oCiphers=+aes128-cbc admin@172.27.0.1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
C9200-E304&amp;gt;en&lt;br /&gt;
Password: &lt;br /&gt;
C9200-E304#config t&lt;br /&gt;
Enter configuration commands, one per line.  End with CNTL/Z.&lt;br /&gt;
C9200-E304(config)#vlan 28&lt;br /&gt;
C9200-E304(config-vlan)#name PoolEvora&lt;br /&gt;
C9200-E304(config-vlan)#exit &lt;br /&gt;
C9200-E304(config)#exit&lt;br /&gt;
C9200-E304#write&lt;br /&gt;
Building configuration...&lt;br /&gt;
[OK]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
C9200-E304#en&lt;br /&gt;
C9200-E304#config t&lt;br /&gt;
Enter configuration commands, one per line.  End with CNTL/Z.&lt;br /&gt;
C9200-E304(config)#ip dhcp pool PoolEvora  &lt;br /&gt;
C9200-E304(dhcp-config)#network 10.60.11.0 255.255.255.0&lt;br /&gt;
C9200-E304(dhcp-config)#dns-server 193.48.57.172&lt;br /&gt;
C9200-E304(dhcp-config)#default-router 10.60.11.254&lt;br /&gt;
C9200-E304(dhcp-config)#exit&lt;br /&gt;
C9200-E304(config)#exit&lt;br /&gt;
C9200-E304#write&lt;br /&gt;
Building configuration...&lt;br /&gt;
[OK]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
ip dhcp pool PoolTom&lt;br /&gt;
 network 10.60.10.0 255.255.255.0&lt;br /&gt;
 dns-server 193.48.57.168 &lt;br /&gt;
 default-router 10.60.10.254 &lt;br /&gt;
!         &lt;br /&gt;
ip dhcp pool PoolEvora&lt;br /&gt;
 network 10.60.11.0 255.255.255.0&lt;br /&gt;
 dns-server 193.48.57.172 &lt;br /&gt;
 default-router 10.60.11.254 &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;VRRP&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
C9200-E304&amp;gt;en &lt;br /&gt;
Password: &lt;br /&gt;
C9200-E304#config t&lt;br /&gt;
Enter configuration commands, one per line.  End with CNTL/Z.&lt;br /&gt;
C9200-E304(config)#interface vlan 28&lt;br /&gt;
C9200-E304(config-if)#ip address 10.60.11.2 255.255.255.0&lt;br /&gt;
C9200-E304(config-if)#ipv6 address 2001:660:4401:60ab::2/64&lt;br /&gt;
C9200-E304(config-if)#vrrp 28 address-family ipv4        &lt;br /&gt;
C9200-E304(config-if-vrrp)#priority 110&lt;br /&gt;
C9200-E304(config-if-vrrp)#address 10.60.11.1 primary&lt;br /&gt;
C9200-E304(config-if-vrrp)#exit&lt;br /&gt;
C9200-E304(config-if)#exit&lt;br /&gt;
C9200-E304(config)#exit&lt;br /&gt;
C9200-E304#write&lt;br /&gt;
Building configuration...&lt;br /&gt;
[OK]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;WIFI e304&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
ssh admin@172.27.0.4 \&lt;br /&gt;
  -o KexAlgorithms=+diffie-hellman-group1-sha1 \&lt;br /&gt;
  -o HostKeyAlgorithms=+ssh-rsa \&lt;br /&gt;
  -o Ciphers=+aes128-cbc \&lt;br /&gt;
  -o MACs=+hmac-sha1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Vsouopme</name></author>
	</entry>
	<entry>
		<id>https://wiki-se.plil.fr/mediawiki/index.php?title=Atelier_SysRes_SE4_2025/2026_E11&amp;diff=12306</id>
		<title>Atelier SysRes SE4 2025/2026 E11</title>
		<link rel="alternate" type="text/html" href="https://wiki-se.plil.fr/mediawiki/index.php?title=Atelier_SysRes_SE4_2025/2026_E11&amp;diff=12306"/>
		<updated>2026-02-21T20:26:20Z</updated>

		<summary type="html">&lt;p&gt;Vsouopme : /* Serveur DNS */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Projet Virtualisation /Administration Systeme-Réseau - Machine SE4.Elf =&lt;br /&gt;
Dans le cadre de ce projet, nnous avons déployés une infrastructure composée de '''deux machines dédiées aux services''' et d’une '''machine mandataire''', le tout à l’aide de l'environnement  '''Xen.'''&lt;br /&gt;
&lt;br /&gt;
== Création des machines virtuelles ==&lt;br /&gt;
Les machines sont créées  sur le Dom0 '''Capbreton.plil.info''' en faisant un '''ssh root@capbreton.plil.info''' &lt;br /&gt;
&lt;br /&gt;
Sur la capbreton.plil.info, &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
xen create-image --hostname=SE4.Elf --dhcp --dir=/usr/local/xen --size=10G --dist=excalibur --memory=2G --bridge=Styx --force&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; '''Xen-create-image''' :  Commande permettant de créer une nouvelle machine virtuelle Xen&lt;br /&gt;
&lt;br /&gt;
'''--hostname=SE4.Elf :''' Pour le nom de la machine &lt;br /&gt;
&lt;br /&gt;
'''--size=10G''' : La taille du disque &lt;br /&gt;
&lt;br /&gt;
'''--bridge=Styx''' : Le nom du bridge &lt;br /&gt;
&lt;br /&gt;
Par la suite il faut creer un fichier dans le répertoire &amp;lt;code&amp;gt;/etc/network/interfaces.d&amp;lt;/code&amp;gt; du Dom0 pour créer notre pont. (NB: Il faut noter que cette etape on peut la faire avant la creation de notre VM&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
auto Styx&lt;br /&gt;
&lt;br /&gt;
iface Styx inet manual&lt;br /&gt;
   bridge_ports none&lt;br /&gt;
   up ip link set $IFACE up&lt;br /&gt;
   down ip link set $IFACE down&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;La commande '''xen list :''' Affiche les '''machines virtuelles''' (VM) qui sont actuellement gérées par Xen (Elle fait la liste des VM allumée).&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
root@capbreton:~# xen list&lt;br /&gt;
SE4.batman                                 322  2048     1     -b----      37.5&lt;br /&gt;
SE4.Moon                                   326  2048     1     -b----      41.1&lt;br /&gt;
SE4.C2                                     332  1024     1     -b----      18.1&lt;br /&gt;
SE4.Tension                                343  2048     1     -b----       7.8&lt;br /&gt;
SE4.CachyOS                                365  2048     1     -b----      10.2&lt;br /&gt;
SE4.RockStar                               367  2048     1     -b----       6.1&lt;br /&gt;
SE4.Kasav                                  368  2048     1     -b----       5.9&lt;br /&gt;
SE4.Elf                                    369  2048     1     -b----       5.6&lt;br /&gt;
SE4.catwoman                               370  2048     1     -b----       6.1&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;-La commande '''xen create /etc/xen/SE4.Elf.cfg''' permet d'allumer la Machine virtuellle.&lt;br /&gt;
&lt;br /&gt;
-La commande xen '''console SE4.Elf''' permet d'acceder  / de se connecter  a la VM.&lt;br /&gt;
&lt;br /&gt;
-La commande '''xen shutdown''' '''SE4.Elf''' permet d'eteindre la machine virtuelle.&lt;br /&gt;
&lt;br /&gt;
Lors de la tentative de connexion, il y'a une un probleme , pour y remedier,  '''Ctrl + AltGr + ] =&amp;gt; vi =&amp;gt; :q! =&amp;gt; reconnexion'''&lt;br /&gt;
&lt;br /&gt;
Pour voir le mot de passe de la VM, '''cat /var/log/xen-tools/SE4.Elf.log'''&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
Installation Summary&lt;br /&gt;
---------------------&lt;br /&gt;
Hostname        :  SE4.Elf&lt;br /&gt;
Distribution    :  excalibur&lt;br /&gt;
MAC Address     :  00:16:3E:83:A3:C7&lt;br /&gt;
IP Address(es)  :  dynamic&lt;br /&gt;
SSH Fingerprint :  SHA256:IrPhxhB4m1s+eaPaLynS6NlE/HfL78+y3ba3DPuHFQU (DSA)&lt;br /&gt;
SSH Fingerprint :  SHA256:RT+MZtlFxC7BrdYORzOcxDX+SKsJrLzOGWWngX2pKz4 (ECDSA)&lt;br /&gt;
SSH Fingerprint :  SHA256:aLYvYqUPX2Q/J5P0nTpdpMyrFD5xopRqkFKuYb7QUo4 (ED25519)&lt;br /&gt;
SSH Fingerprint :  SHA256:b0ddm9FYx4/losJU8/pE9MXx7102ygkAMjChOvPlNhE (RSA)&lt;br /&gt;
Root Password   :  X&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;- La commande '''vi /etc/hostname''' pour changer le nom de la VM&lt;br /&gt;
&lt;br /&gt;
== '''Configuration de la Machine de Services''' ==&lt;br /&gt;
Il faut creer deux partitions LVM de 10G pour votre machine virtuelle et modifiez le fichier de configuration de la machine virtuelle de services pour faire en sorte que les répertoires &amp;lt;code&amp;gt;/'''var'''&amp;lt;/code&amp;gt; et &amp;lt;code&amp;gt;'''/home'''&amp;lt;/code&amp;gt; de la machine virtuelle soient implantés sur ces partitions LVM&lt;br /&gt;
&lt;br /&gt;
=== '''Création des volumes logiques''' ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
lvcreate -L 10G -n lv_var_SE4Elf &lt;br /&gt;
lvcreate -L 10G -n lv_home_SE4Elf &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Faire '''lvdisplay''' pour faire la verification&lt;br /&gt;
&lt;br /&gt;
Depuis le serveur Capbreton, on a créé 2 fichiers de partitions dans &amp;lt;code&amp;gt;/dev/virtual&amp;lt;/code&amp;gt; pour chaque machines de services &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@capbreton:/dev/virtual# ls &lt;br /&gt;
SE4.Poseidon.home lv_home_SE4Elf lv_var_SE4Elf  SE4.Gaby.home SE4.Poseidon.var SE4.Gaby.var &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Apres nous avons modifié le fichier /etc/xen/SE4.Elf.cfg piur y ajouter deux répertoires&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
disk = [&lt;br /&gt;
  'file:/usr/local/xen/domains/SE4.Elf/disk.img,xvda2,w',&lt;br /&gt;
  'file:/usr/local/xen/domains/SE4.Elf/swap.img,xvda1,w',&lt;br /&gt;
  'phy:/dev/vg0/lv_var_SE4Elf,xvdb,w',&lt;br /&gt;
  'phy:/dev/vg0/lv_home_SE4Elf,xvdc,w'&lt;br /&gt;
]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== ''' Création et formatage des partitions''' ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
mkfs -t ext4 /dev/xvdb  # Formatage de la partition pour /var &lt;br /&gt;
mkfs -t ext4 /dev/xvdc  # Formatage de la partition pour /home&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== '''Préparer les partitions et déplacer les données :''' ===&lt;br /&gt;
&lt;br /&gt;
* '''Montage temporaire des partitions dans &amp;lt;code&amp;gt;/mnt&amp;lt;/code&amp;gt; :'''&lt;br /&gt;
&lt;br /&gt;
Pour pouvoir déplacer les données, nous avons du monter les nouvelles partitions LVM dans un répertoire temporaire &amp;lt;code&amp;gt;/mnt&amp;lt;/code&amp;gt;.  On a créé 2 partitions une pour &amp;lt;code&amp;gt;/var&amp;lt;/code&amp;gt; et une &amp;lt;code&amp;gt;/home&amp;lt;/code&amp;gt; sous les noms xvdb et xvdc dans  &amp;lt;code&amp;gt;/dev&amp;lt;/code&amp;gt;  ,que l'on monte avec  :&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
mount /dev/xvdb /mnt&lt;br /&gt;
mount /dev/xvdc /mnt&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* '''Déplacement des fichiers existants'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
mv /var/* /mnt # Déplacement des fichiers de /var vers la nouvelle partition&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== '''Démonter les partitions temporaires :''' ===&lt;br /&gt;
Avant de configurer les montages permanents, on démonte les partitions des répertoires temporaires (&amp;lt;code&amp;gt;/mnt&amp;lt;/code&amp;gt;)&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
umount /mnt # Démontage après transfert des données&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== '''Modification du fichier &amp;lt;code&amp;gt;/etc/fstab&amp;lt;/code&amp;gt; pour un montage automatique au démarrage :''' ===&lt;br /&gt;
On modifie le fichier &amp;lt;code&amp;gt;'''/etc/fstab'''&amp;lt;/code&amp;gt;, qui contient la liste des partitions.&lt;br /&gt;
&lt;br /&gt;
Ajout des nouvelles partitions LVM au fichier &amp;lt;code&amp;gt;/etc/fstab&amp;lt;/code&amp;gt; :&lt;br /&gt;
&lt;br /&gt;
* '''/dev/xvdb /var ext4 defaults 0 2'''&lt;br /&gt;
* '''/dev/xvdc /home ext4 defaults 0''' &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
# /etc/fstab: static file system information.&lt;br /&gt;
#&lt;br /&gt;
# &amp;lt;file system&amp;gt; &amp;lt;mount point&amp;gt; &amp;lt;type&amp;gt; &amp;lt;options&amp;gt; &amp;lt;dump&amp;gt; &amp;lt;pass&amp;gt;&lt;br /&gt;
proc             /proc           proc  defaults   0     0&lt;br /&gt;
devpts            /dev/pts       devpts rw,noexec,nosuid,gid=5,mode=620 0 0 /dev/xvda1 none swap sw 0 0&lt;br /&gt;
/dev/xvda1 none swap sw 0 0&lt;br /&gt;
/dev/xvda2 / ext4 noatime,nodiratime,errors=remount-ro 0 1&lt;br /&gt;
/dev/xvdb /var ext4 defaults 0 2 &lt;br /&gt;
/dev/xvdc /home ext4 defaults 0 2&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== '''Monter les partitions définies dans &amp;lt;code&amp;gt;fstab&amp;lt;/code&amp;gt; :''' ===&lt;br /&gt;
Pour monter toutes les partitions définies dans le fichier &amp;lt;code&amp;gt;/etc/fstab&amp;lt;/code&amp;gt;  :&lt;br /&gt;
 mount -a  # Remontage des partitions définies dans fstab&lt;br /&gt;
Cette commande monte toutes les partitions qui ne sont pas encore montées et qui sont définies dans &amp;lt;code&amp;gt;/etc/fstab&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
remet les données dans le fichier déplacer.&lt;br /&gt;
&lt;br /&gt;
Puis, pour appliquer les changement nous avons redémarré la VM en faisant le '''xen shutdown SE4.Elf''' ,  '''xen create /etc/xen/SE4.Elf.cfg''',  '''xen console SE4.Elf'''&lt;br /&gt;
&lt;br /&gt;
=== '''Vérification des partitions montées''' ===&lt;br /&gt;
Après avoir configuré le montage automatique et remonté les partitions, nous devons vérifier que les partitions sont correctement montées. Nous avons utilisé la commande '''&amp;lt;code&amp;gt;df -h&amp;lt;/code&amp;gt;''' pour afficher l'espace disque utilisé et disponible sur les partitions montées.&lt;br /&gt;
&lt;br /&gt;
Cela nous permet de confirmer que les partitions '''&amp;lt;code&amp;gt;/var&amp;lt;/code&amp;gt;''' et '''&amp;lt;code&amp;gt;/home&amp;lt;/code&amp;gt;''' sont correctement montées sur les répertoires associés et qu'il n'y a pas de problème d'espace disque.&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== &amp;lt;big&amp;gt;'''Configuration Reseau'''&amp;lt;/big&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
Tout d'abord nous avons modifier le fichier /etc/xen/SE4.Elf pour y ajouter une nouvelle interface sur le bridge de la promotion SE4.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Afin d’assurer une connectivité IPv6 stable et routée pour un accès direct à Internet, ainsi qu’une communication efficace avec la machine mandataire, nous avons modifié le fichier '''&amp;lt;code&amp;gt;/etc/network/interfaces&amp;lt;/code&amp;gt;'''. De plus, une adresse IPv4 fixe a été attribuée sur le réseau privé afin de garantir une interaction optimale entre les machines de services et leur machine mandataire.&lt;br /&gt;
&lt;br /&gt;
=== '''Mise a jour du fichier'''  /etc/network/interfaces ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
# Interface loopback&lt;br /&gt;
auto lo&lt;br /&gt;
iface lo inet loopback&lt;br /&gt;
&lt;br /&gt;
# Interface principale (eth0) - IPv4 statique + IPv6 automatique&lt;br /&gt;
auto eth0&lt;br /&gt;
iface eth0 inet static&lt;br /&gt;
    address 192.168.50.12&lt;br /&gt;
    netmask 255.255.255.254  # /24 &lt;br /&gt;
    gateway 192.168.50.1     # @mandataire&lt;br /&gt;
&lt;br /&gt;
iface eth0 inet6 auto  # Attribution automatique d'une IPv6&lt;br /&gt;
&lt;br /&gt;
# Interface secondaire (eth1) - IPv6 automatique uniquement&lt;br /&gt;
auto eth1&lt;br /&gt;
iface eth1 inet6 auto&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Il faut ensuite aciver l'interface en faisan'''t  ifdown eth0 &amp;amp;&amp;amp; ifup eth0''' et puis  '''ifdown eth1 &amp;amp;&amp;amp; ifup eth1''' aprés faire le '''systemctl restart networking''' pour mettre a jour les configurations du reseau.&lt;br /&gt;
&lt;br /&gt;
Les commandes : &lt;br /&gt;
&lt;br /&gt;
* ip route show : pour afficher la table de routage.&lt;br /&gt;
* ip -4 addr show : pour afficher l'adresse ipv4   #'''''192.168.50.12'''''&lt;br /&gt;
* ip -6 addr show : pour afficher l'adresse ipv6   #'''''2001:660:4401:60a0:216:3eff:fe83:a3c8'''''&lt;br /&gt;
&lt;br /&gt;
Grace a toute ses configurations, nous pouvons faire un ping sur la machine mandataire RockStar et sur la machine de service Kasav &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:~# ping 192.168.50.13        #ping sur la machine de service Kasav&lt;br /&gt;
PING 192.168.50.13 (192.168.50.13) 56(84) bytes of data.&lt;br /&gt;
64 bytes from 192.168.50.13: icmp_seq=1 ttl=64 time=0.132 ms&lt;br /&gt;
64 bytes from 192.168.50.13: icmp_seq=2 ttl=64 time=0.318 ms&lt;br /&gt;
64 bytes from 192.168.50.13: icmp_seq=3 ttl=64 time=0.369 ms&lt;br /&gt;
64 bytes from 192.168.50.13 icmp_seq=4 ttl=64 time=0.356 ms&lt;br /&gt;
--- 192.168.50.13 ping statistics ---&lt;br /&gt;
4 packets transmitted, 4 received, 0% packet loss, time 3077ms&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== '''Installation des services''' ===&lt;br /&gt;
Installation des services pour la suite du tp, les services a installé sont&lt;br /&gt;
&lt;br /&gt;
* '''Ssh''' : pour permettre l’accès à distance sécurisé à la machine pour l’administration et la maintenance&lt;br /&gt;
* '''Apache2 (Serveur web)''' : pour heberger des applications et sites web accessibles aux utilisateurs&lt;br /&gt;
* '''Bind9''' : pour assurer  la résolution de noms de domaine, essentielle pour le bon fonctionnement des services sur le réseau&lt;br /&gt;
&lt;br /&gt;
La commnde pour installer est '''apt install -y openssh-server apache2 bind9'''Après l'installation :&lt;br /&gt;
&lt;br /&gt;
Vérifiez si les services sont en cours d'exécution  '''systemctl status ssh apache2 bind9.'''&lt;br /&gt;
&lt;br /&gt;
Activez et démarrez les services si nécessaire '''systemctl enable --now ssh apache2 bind9'''&lt;br /&gt;
&lt;br /&gt;
== '''Configuration de la machine mandataire''' ==&lt;br /&gt;
&lt;br /&gt;
=== '''Mise à jour du fichier''' ===&lt;br /&gt;
'''&amp;lt;code&amp;gt;Modification du fichier /etc/network/interfaces&amp;lt;/code&amp;gt;'''&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
# Fichier /etc/network/interfaces&lt;br /&gt;
auto lo&lt;br /&gt;
iface lo inet loopback&lt;br /&gt;
&lt;br /&gt;
# Interface publique (réseau routé)&lt;br /&gt;
auto eth1&lt;br /&gt;
iface eth1 inet static&lt;br /&gt;
    address 193.48.57.172/27&lt;br /&gt;
   &lt;br /&gt;
&lt;br /&gt;
iface eth1 inet6 auto&lt;br /&gt;
&lt;br /&gt;
# Interface privée &lt;br /&gt;
auto eth0&lt;br /&gt;
iface eth0 inet static&lt;br /&gt;
    address 192.168.50.1/24&lt;br /&gt;
&lt;br /&gt;
iface eth0 inet6 auto&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Il faut ensuite aciver l'interface en faisan'''t  ifdown eth0 &amp;amp;&amp;amp; ifup eth0''' et puis  '''ifdown eth1 &amp;amp;&amp;amp; ifup eth1''' aprés faire le '''systemctl restart networking''' pour mettre a jour les configurations du reseau.&lt;br /&gt;
&lt;br /&gt;
=== Mise en place de la mascarade (NAT) ===&lt;br /&gt;
La mise en place de la masquerade (NAT) permet aux machines d’un réseau privé d’accéder au réseau externe en utilisant l’adresse IP publique de la passerelle, tout en masquant l’architecture interne et en améliorant la sécurité.&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
echo &amp;quot;net.ipv4.ip_forward=1&amp;quot; &amp;gt;&amp;gt; /etc/sysctl.conf&lt;br /&gt;
sysctl -p&lt;br /&gt;
&lt;br /&gt;
# Règles iptables pour la mascarade&lt;br /&gt;
iptables -t nat -A POSTROUTING -s 192.168.50.0/24 -o eth1 -j MASQUERADE&lt;br /&gt;
iptables -A FORWARD -i eth0 -o eth1 -j ACCEPT&lt;br /&gt;
iptables -A FORWARD -i eth1 -o eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT&lt;br /&gt;
&lt;br /&gt;
# Sauvegarde pour persistance&lt;br /&gt;
iptables-save &amp;gt; /etc/iptables/rules.v4&lt;br /&gt;
&lt;br /&gt;
# Ajout dans interfaces pour chargement au démarrage&lt;br /&gt;
post-up iptables-restore &amp;lt; /etc/iptables/rules.v4&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== '''Installation des paquetages  :''' ===&lt;br /&gt;
De la même manière que pour Moon et Apollo on installe les paquetages :&lt;br /&gt;
 apt install -y openssh-server apache2 bind9&lt;br /&gt;
Puis après l'installation on vérifie si les services sont en cours d'exécution :&lt;br /&gt;
 systemctl status ssh apache2 bind9&lt;br /&gt;
Activez et démarrez les services si nécessaire :&lt;br /&gt;
 systemctl enable --now ssh apache2 bind9&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==  '''Serveur SSH''' ==&lt;br /&gt;
Notre machine virtuelle doit etre accessible par SSH, on autorise donc l'accès par l'utilisateur '''Root en modifiant le fichier de de configuration &amp;lt;code&amp;gt;/etc/ssh/sshd_config  :&amp;lt;/code&amp;gt;'''&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
PermitRootLogin yes&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Il faut ensuite redemarrer le serveur ssh en faisant :&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/etc/ssh# /etc/init.d/ssh restart&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Pour gérer la redirection du SSH, on doit configurer '''nftables''' sur nos machines de service en redirigeant les ports 2201 et 2202&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
nft add table ip nat&lt;br /&gt;
nft add chain ip nat PREROUTING { type nat hook prerouting priority 0 \; }&lt;br /&gt;
nft add rule ip nat PREROUTING tcp dport 2201 dnat to 192.168.50.12:22                 &lt;br /&gt;
nft add rule ip nat PREROUTING tcp dport 2202 dnat to 192.168.50.3:22              &lt;br /&gt;
nft add chain ip nat POSTROUTING { type nat hook postrouting priority 100 \; }&lt;br /&gt;
nft add rule ip nat POSTROUTING masquerade&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Maintenant, on peut se connecter en SSH sur les machiches virtuelles de services:  De Elf, on peut se connecter a Kasav&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/# ssh root@192.168.50.3&lt;br /&gt;
root@192.168.50.3's password: &lt;br /&gt;
Linux Kasav 4.19.0-26-amd64 #1 SMP Debian 4.19.304-1 (2024-01-09) x86_64&lt;br /&gt;
&lt;br /&gt;
The programs included with the Devuan GNU/Linux system are free software;&lt;br /&gt;
the exact distribution terms for each program are described in the&lt;br /&gt;
individual files in /usr/share/doc/*/copyright.&lt;br /&gt;
&lt;br /&gt;
Devuan GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent&lt;br /&gt;
permitted by applicable law.&lt;br /&gt;
Last login: Tue Feb  3 11:34:45 2026 from 192.168.50.12&lt;br /&gt;
root@Kasav:~# &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Serveur DNS''' ==&lt;br /&gt;
Nous avons configuré un serveur DNS pour gérer les noms de domaine de nos machines virtuelles : '''elvis21.tech''' .&lt;br /&gt;
&lt;br /&gt;
La première étape était d'acquérir les noms de domaine pour '''Elf''' sur '''Gandi.''' La seconde étape était d'acquerir les certificats.&lt;br /&gt;
&lt;br /&gt;
Après avoir suivi le tutoriel, nous obtenons deux fichiers : '''myserver.key''' (la clé privée) et '''server.csr''' (la demande de certificat). Ces fichiers nous permettrons de configurer '''DNSSEC''' et sécuriser la zone DNS.&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
$TTL 86400&lt;br /&gt;
@ IN SOA ns1.elvis21.tech. admin.elvis21.tech. (&lt;br /&gt;
        3298267246      ;Version&lt;br /&gt;
        3600            ;Refresh&lt;br /&gt;
        1800            ;Retry&lt;br /&gt;
        604800          ;Expire&lt;br /&gt;
        86400 )         ;Minimum TTL&lt;br /&gt;
;&lt;br /&gt;
@  IN NS ns1.elvis21.tech.&lt;br /&gt;
&lt;br /&gt;
ns1 IN A 192.168.50.12&lt;br /&gt;
ns2 IN A 192.168.50.1&lt;br /&gt;
 IN A 192.168.50.12&lt;br /&gt;
      IN AAAA 2001:660:4401:60a0:216:3eff:fe83:a3c8&lt;br /&gt;
www IN A 192.168.50.12&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/etc/bind# cat named.conf.local &lt;br /&gt;
zone &amp;quot;elvis21.tech&amp;quot; {&lt;br /&gt;
    type primary;&lt;br /&gt;
    file &amp;quot;/etc/bind/zones/db.elvis21.tech&amp;quot;;&lt;br /&gt;
    allow-transfer {&lt;br /&gt;
      2001:660:4401:60a0:216:3eff:fe70:7f1c;&lt;br /&gt;
      2001:660:4401:60a0:216:3eff:fe9a:ea1c;&lt;br /&gt;
      };&lt;br /&gt;
    also-notify { 2001:660:4401:60a0:216:3eff:fe70:7f1c; };&lt;br /&gt;
    inline-signing yes;   // DNSSEC automatique&lt;br /&gt;
    key-directory &amp;quot;/etc/bind/keys&amp;quot;; // répertoire des clefs, attention aux droits&lt;br /&gt;
    dnssec-policy &amp;quot;dnssecpolicy&amp;quot;;  // politique pour les clefs de chiffrement&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
zone &amp;quot;kasav.online&amp;quot; {&lt;br /&gt;
    type secondary;&lt;br /&gt;
    file &amp;quot;/etc/bind/backup/db.kasav.online&amp;quot;;&lt;br /&gt;
    primaries { 2001:660:4401:60a0:216:3eff:fe9a:ea1c; };&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
dnssec-policy &amp;quot;dnssecpolicy&amp;quot; {&lt;br /&gt;
  keys {&lt;br /&gt;
    ksk key-directory lifetime unlimited algorithm 13;&lt;br /&gt;
    zsk key-directory lifetime unlimited algorithm 13;&lt;br /&gt;
  };&lt;br /&gt;
  nsec3param;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/etc/bind# named-checkzone elvis21.tech /etc/bind/db.elvis21.tech&lt;br /&gt;
zone elvis21.tech/IN: loaded serial 3298267246&lt;br /&gt;
OK&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
openssl req -nodes -newkey rsa:2048 -sha256 -keyout elvis21.tech.key -out elvis21.csr&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
[[Fichier:ImageDns.png|vignette|994x994px|centré]]&lt;br /&gt;
&lt;br /&gt;
== '''Mise en place du serveur Apache (http et https)''' ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
apt update&lt;br /&gt;
apt install apache2&lt;br /&gt;
systemctl enable --now apache2&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
[[Fichier:Elvis21.tech-DNS.png|gauche|vignette|863x863px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Installation Fail2ban''' ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/# apt install fail2ban &lt;br /&gt;
Installing:                     &lt;br /&gt;
  fail2ban&lt;br /&gt;
&lt;br /&gt;
root@Elf:/# systemctl status fail2ban&lt;br /&gt;
fail2ban.service - Fail2Ban Service&lt;br /&gt;
    Loaded: loaded (/usr/lib/systemd/system/fail2ban.service, disabled)&lt;br /&gt;
    Active: active (running)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/# service fail2ban status                             &lt;br /&gt;
Status of Authentication failure monitor: fail2ban is running.&lt;br /&gt;
 root@Elf:/# fail2ban-client status&lt;br /&gt;
Status&lt;br /&gt;
|- Number of jail:	1&lt;br /&gt;
`- Jail list:	sshd&lt;br /&gt;
&lt;br /&gt;
root@Elf:/# fail2ban-client status sshd&lt;br /&gt;
Status for the jail: sshd&lt;br /&gt;
|- Filter&lt;br /&gt;
|  |- Currently failed:	0&lt;br /&gt;
|  |- Total failed:	0&lt;br /&gt;
|  `- File list:	/var/log/auth.log&lt;br /&gt;
`- Actions&lt;br /&gt;
   |- Currently banned:	0&lt;br /&gt;
   |- Total banned:	0&lt;br /&gt;
   `- Banned IP list:	&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Mise en place du serveur Apache (http et https) ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/# service apache2 status&lt;br /&gt;
apache2 is running.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''WIFI''' ==&lt;br /&gt;
Faire ip link&lt;br /&gt;
&lt;br /&gt;
ensuite sudo airodump-ng wlanx  -- Remplacer x par le numero du wlan present &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
BSSID              PWR  Beacons    #Data, #/s  CH   MB   ENC CIPHER  AUTH ESSID&lt;br /&gt;
04:DA:D2:9C:50:54  -62       23       11    0   4   54e. WEP  WEP         cracotte05                         &lt;br /&gt;
04:DA:D2:9C:50:5A  -61        2        1    0   4   54e. WEP  WEP         cracotte11    &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;sudo airodump-ng wlan1 --bssid 04:DA:D2:9C:50:5A  -c4 --write log_airdump&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
sudo airodump-ng wlan1 --write airdump --bssid 04:DA:D2:9C:50:5A -c4&lt;br /&gt;
17:31:10  Created capture file &amp;quot;airdump-04.cap&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
 CH  4 ][ Elapsed: 39 mins ][ 2026-02-10 18:11 ][ fixed channel wlan1: 13 &lt;br /&gt;
&lt;br /&gt;
 BSSID              PWR RXQ  Beacons    #Data, #/s  CH   MB   ENC CIPHER  AUTH ESSID&lt;br /&gt;
&lt;br /&gt;
 04:DA:D2:9C:50:5A  -58   3     9766    43771   21   4   54e. WEP  WEP         cracotte11                                                                                                   &lt;br /&gt;
&lt;br /&gt;
 BSSID              STATION            PWR    Rate    Lost   Frames  Notes  Probes&lt;br /&gt;
&lt;br /&gt;
 04:DA:D2:9C:50:5A  40:A5:EF:01:2E:FA  -77    0 -48e   127    46300                                                                                                                          &lt;br /&gt;
Quitting...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
aircrack-ng airdump-05.cap &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
           Aircrack-ng 1.7 &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                 [00:25:47] Tested 869 keys (got 34546 IVs)&lt;br /&gt;
                          Got 35002 out of 35000 IVsStarting PTW attack with 35002 KB    depth   byte(vote)&lt;br /&gt;
    0    0/  2   FF(50176) 1C(43520) E6(42752) 3F(42496) B6(42496) &lt;br /&gt;
    1    0/  6   FF(48128) AC(46336) 90(42752) 8E(42496) 04(42240) &lt;br /&gt;
    2    0/  1   BD(50688) 7F(43776) 75(42752) E6(41216) F2(41216) &lt;br /&gt;
    3    9/  3   CE(39936) 05(39680) 5C(39680) 9A(39168) F4(39168) &lt;br /&gt;
    4   41/  4   6C(37376) 1E(37120) 80(37120) 88(37120) A7(37120) &lt;br /&gt;
&lt;br /&gt;
             KEY FOUND! [ FF:FF:FF:FF:FA:BC:12:CB:AE:EE:EE:EE:EE ]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
ssh -oKexAlgorithms=+diffie-hellman-group14-sha1 -oHostKeyAlgorithms=+ssh-rsa -oCiphers=+aes128-cbc admin@172.27.0.1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
C9200-E304&amp;gt;en&lt;br /&gt;
Password: &lt;br /&gt;
C9200-E304#config t&lt;br /&gt;
Enter configuration commands, one per line.  End with CNTL/Z.&lt;br /&gt;
C9200-E304(config)#vlan 28&lt;br /&gt;
C9200-E304(config-vlan)#name PoolEvora&lt;br /&gt;
C9200-E304(config-vlan)#exit &lt;br /&gt;
C9200-E304(config)#exit&lt;br /&gt;
C9200-E304#write&lt;br /&gt;
Building configuration...&lt;br /&gt;
[OK]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
C9200-E304#en&lt;br /&gt;
C9200-E304#config t&lt;br /&gt;
Enter configuration commands, one per line.  End with CNTL/Z.&lt;br /&gt;
C9200-E304(config)#ip dhcp pool PoolEvora  &lt;br /&gt;
C9200-E304(dhcp-config)#network 10.60.11.0 255.255.255.0&lt;br /&gt;
C9200-E304(dhcp-config)#dns-server 193.48.57.172&lt;br /&gt;
C9200-E304(dhcp-config)#default-router 10.60.11.254&lt;br /&gt;
C9200-E304(dhcp-config)#exit&lt;br /&gt;
C9200-E304(config)#exit&lt;br /&gt;
C9200-E304#write&lt;br /&gt;
Building configuration...&lt;br /&gt;
[OK]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
ip dhcp pool PoolTom&lt;br /&gt;
 network 10.60.10.0 255.255.255.0&lt;br /&gt;
 dns-server 193.48.57.168 &lt;br /&gt;
 default-router 10.60.10.254 &lt;br /&gt;
!         &lt;br /&gt;
ip dhcp pool PoolEvora&lt;br /&gt;
 network 10.60.11.0 255.255.255.0&lt;br /&gt;
 dns-server 193.48.57.172 &lt;br /&gt;
 default-router 10.60.11.254 &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;VRRP&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
C9200-E304&amp;gt;en &lt;br /&gt;
Password: &lt;br /&gt;
C9200-E304#config t&lt;br /&gt;
Enter configuration commands, one per line.  End with CNTL/Z.&lt;br /&gt;
C9200-E304(config)#interface vlan 28&lt;br /&gt;
C9200-E304(config-if)#ip address 10.60.11.2 255.255.255.0&lt;br /&gt;
C9200-E304(config-if)#ipv6 address 2001:660:4401:60ab::2/64&lt;br /&gt;
C9200-E304(config-if)#vrrp 28 address-family ipv4        &lt;br /&gt;
C9200-E304(config-if-vrrp)#priority 110&lt;br /&gt;
C9200-E304(config-if-vrrp)#address 10.60.11.1 primary&lt;br /&gt;
C9200-E304(config-if-vrrp)#exit&lt;br /&gt;
C9200-E304(config-if)#exit&lt;br /&gt;
C9200-E304(config)#exit&lt;br /&gt;
C9200-E304#write&lt;br /&gt;
Building configuration...&lt;br /&gt;
[OK]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;WIFI e304&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
ssh admin@172.27.0.4 \&lt;br /&gt;
  -o KexAlgorithms=+diffie-hellman-group1-sha1 \&lt;br /&gt;
  -o HostKeyAlgorithms=+ssh-rsa \&lt;br /&gt;
  -o Ciphers=+aes128-cbc \&lt;br /&gt;
  -o MACs=+hmac-sha1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Vsouopme</name></author>
	</entry>
	<entry>
		<id>https://wiki-se.plil.fr/mediawiki/index.php?title=Atelier_SysRes_SE4_2025/2026_E11&amp;diff=12305</id>
		<title>Atelier SysRes SE4 2025/2026 E11</title>
		<link rel="alternate" type="text/html" href="https://wiki-se.plil.fr/mediawiki/index.php?title=Atelier_SysRes_SE4_2025/2026_E11&amp;diff=12305"/>
		<updated>2026-02-21T20:15:13Z</updated>

		<summary type="html">&lt;p&gt;Vsouopme : /* Mise a jour du fichier  /etc/network/interfaces */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Projet Virtualisation /Administration Systeme-Réseau - Machine SE4.Elf =&lt;br /&gt;
Dans le cadre de ce projet, nnous avons déployés une infrastructure composée de '''deux machines dédiées aux services''' et d’une '''machine mandataire''', le tout à l’aide de l'environnement  '''Xen.'''&lt;br /&gt;
&lt;br /&gt;
== Création des machines virtuelles ==&lt;br /&gt;
Les machines sont créées  sur le Dom0 '''Capbreton.plil.info''' en faisant un '''ssh root@capbreton.plil.info''' &lt;br /&gt;
&lt;br /&gt;
Sur la capbreton.plil.info, &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
xen create-image --hostname=SE4.Elf --dhcp --dir=/usr/local/xen --size=10G --dist=excalibur --memory=2G --bridge=Styx --force&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; '''Xen-create-image''' :  Commande permettant de créer une nouvelle machine virtuelle Xen&lt;br /&gt;
&lt;br /&gt;
'''--hostname=SE4.Elf :''' Pour le nom de la machine &lt;br /&gt;
&lt;br /&gt;
'''--size=10G''' : La taille du disque &lt;br /&gt;
&lt;br /&gt;
'''--bridge=Styx''' : Le nom du bridge &lt;br /&gt;
&lt;br /&gt;
Par la suite il faut creer un fichier dans le répertoire &amp;lt;code&amp;gt;/etc/network/interfaces.d&amp;lt;/code&amp;gt; du Dom0 pour créer notre pont. (NB: Il faut noter que cette etape on peut la faire avant la creation de notre VM&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
auto Styx&lt;br /&gt;
&lt;br /&gt;
iface Styx inet manual&lt;br /&gt;
   bridge_ports none&lt;br /&gt;
   up ip link set $IFACE up&lt;br /&gt;
   down ip link set $IFACE down&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;La commande '''xen list :''' Affiche les '''machines virtuelles''' (VM) qui sont actuellement gérées par Xen (Elle fait la liste des VM allumée).&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
root@capbreton:~# xen list&lt;br /&gt;
SE4.batman                                 322  2048     1     -b----      37.5&lt;br /&gt;
SE4.Moon                                   326  2048     1     -b----      41.1&lt;br /&gt;
SE4.C2                                     332  1024     1     -b----      18.1&lt;br /&gt;
SE4.Tension                                343  2048     1     -b----       7.8&lt;br /&gt;
SE4.CachyOS                                365  2048     1     -b----      10.2&lt;br /&gt;
SE4.RockStar                               367  2048     1     -b----       6.1&lt;br /&gt;
SE4.Kasav                                  368  2048     1     -b----       5.9&lt;br /&gt;
SE4.Elf                                    369  2048     1     -b----       5.6&lt;br /&gt;
SE4.catwoman                               370  2048     1     -b----       6.1&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;-La commande '''xen create /etc/xen/SE4.Elf.cfg''' permet d'allumer la Machine virtuellle.&lt;br /&gt;
&lt;br /&gt;
-La commande xen '''console SE4.Elf''' permet d'acceder  / de se connecter  a la VM.&lt;br /&gt;
&lt;br /&gt;
-La commande '''xen shutdown''' '''SE4.Elf''' permet d'eteindre la machine virtuelle.&lt;br /&gt;
&lt;br /&gt;
Lors de la tentative de connexion, il y'a une un probleme , pour y remedier,  '''Ctrl + AltGr + ] =&amp;gt; vi =&amp;gt; :q! =&amp;gt; reconnexion'''&lt;br /&gt;
&lt;br /&gt;
Pour voir le mot de passe de la VM, '''cat /var/log/xen-tools/SE4.Elf.log'''&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
Installation Summary&lt;br /&gt;
---------------------&lt;br /&gt;
Hostname        :  SE4.Elf&lt;br /&gt;
Distribution    :  excalibur&lt;br /&gt;
MAC Address     :  00:16:3E:83:A3:C7&lt;br /&gt;
IP Address(es)  :  dynamic&lt;br /&gt;
SSH Fingerprint :  SHA256:IrPhxhB4m1s+eaPaLynS6NlE/HfL78+y3ba3DPuHFQU (DSA)&lt;br /&gt;
SSH Fingerprint :  SHA256:RT+MZtlFxC7BrdYORzOcxDX+SKsJrLzOGWWngX2pKz4 (ECDSA)&lt;br /&gt;
SSH Fingerprint :  SHA256:aLYvYqUPX2Q/J5P0nTpdpMyrFD5xopRqkFKuYb7QUo4 (ED25519)&lt;br /&gt;
SSH Fingerprint :  SHA256:b0ddm9FYx4/losJU8/pE9MXx7102ygkAMjChOvPlNhE (RSA)&lt;br /&gt;
Root Password   :  X&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;- La commande '''vi /etc/hostname''' pour changer le nom de la VM&lt;br /&gt;
&lt;br /&gt;
== '''Configuration de la Machine de Services''' ==&lt;br /&gt;
Il faut creer deux partitions LVM de 10G pour votre machine virtuelle et modifiez le fichier de configuration de la machine virtuelle de services pour faire en sorte que les répertoires &amp;lt;code&amp;gt;/'''var'''&amp;lt;/code&amp;gt; et &amp;lt;code&amp;gt;'''/home'''&amp;lt;/code&amp;gt; de la machine virtuelle soient implantés sur ces partitions LVM&lt;br /&gt;
&lt;br /&gt;
=== '''Création des volumes logiques''' ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
lvcreate -L 10G -n lv_var_SE4Elf &lt;br /&gt;
lvcreate -L 10G -n lv_home_SE4Elf &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Faire '''lvdisplay''' pour faire la verification&lt;br /&gt;
&lt;br /&gt;
Depuis le serveur Capbreton, on a créé 2 fichiers de partitions dans &amp;lt;code&amp;gt;/dev/virtual&amp;lt;/code&amp;gt; pour chaque machines de services &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@capbreton:/dev/virtual# ls &lt;br /&gt;
SE4.Poseidon.home lv_home_SE4Elf lv_var_SE4Elf  SE4.Gaby.home SE4.Poseidon.var SE4.Gaby.var &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Apres nous avons modifié le fichier /etc/xen/SE4.Elf.cfg piur y ajouter deux répertoires&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
disk = [&lt;br /&gt;
  'file:/usr/local/xen/domains/SE4.Elf/disk.img,xvda2,w',&lt;br /&gt;
  'file:/usr/local/xen/domains/SE4.Elf/swap.img,xvda1,w',&lt;br /&gt;
  'phy:/dev/vg0/lv_var_SE4Elf,xvdb,w',&lt;br /&gt;
  'phy:/dev/vg0/lv_home_SE4Elf,xvdc,w'&lt;br /&gt;
]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== ''' Création et formatage des partitions''' ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
mkfs -t ext4 /dev/xvdb  # Formatage de la partition pour /var &lt;br /&gt;
mkfs -t ext4 /dev/xvdc  # Formatage de la partition pour /home&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== '''Préparer les partitions et déplacer les données :''' ===&lt;br /&gt;
&lt;br /&gt;
* '''Montage temporaire des partitions dans &amp;lt;code&amp;gt;/mnt&amp;lt;/code&amp;gt; :'''&lt;br /&gt;
&lt;br /&gt;
Pour pouvoir déplacer les données, nous avons du monter les nouvelles partitions LVM dans un répertoire temporaire &amp;lt;code&amp;gt;/mnt&amp;lt;/code&amp;gt;.  On a créé 2 partitions une pour &amp;lt;code&amp;gt;/var&amp;lt;/code&amp;gt; et une &amp;lt;code&amp;gt;/home&amp;lt;/code&amp;gt; sous les noms xvdb et xvdc dans  &amp;lt;code&amp;gt;/dev&amp;lt;/code&amp;gt;  ,que l'on monte avec  :&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
mount /dev/xvdb /mnt&lt;br /&gt;
mount /dev/xvdc /mnt&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* '''Déplacement des fichiers existants'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
mv /var/* /mnt # Déplacement des fichiers de /var vers la nouvelle partition&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== '''Démonter les partitions temporaires :''' ===&lt;br /&gt;
Avant de configurer les montages permanents, on démonte les partitions des répertoires temporaires (&amp;lt;code&amp;gt;/mnt&amp;lt;/code&amp;gt;)&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
umount /mnt # Démontage après transfert des données&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== '''Modification du fichier &amp;lt;code&amp;gt;/etc/fstab&amp;lt;/code&amp;gt; pour un montage automatique au démarrage :''' ===&lt;br /&gt;
On modifie le fichier &amp;lt;code&amp;gt;'''/etc/fstab'''&amp;lt;/code&amp;gt;, qui contient la liste des partitions.&lt;br /&gt;
&lt;br /&gt;
Ajout des nouvelles partitions LVM au fichier &amp;lt;code&amp;gt;/etc/fstab&amp;lt;/code&amp;gt; :&lt;br /&gt;
&lt;br /&gt;
* '''/dev/xvdb /var ext4 defaults 0 2'''&lt;br /&gt;
* '''/dev/xvdc /home ext4 defaults 0''' &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
# /etc/fstab: static file system information.&lt;br /&gt;
#&lt;br /&gt;
# &amp;lt;file system&amp;gt; &amp;lt;mount point&amp;gt; &amp;lt;type&amp;gt; &amp;lt;options&amp;gt; &amp;lt;dump&amp;gt; &amp;lt;pass&amp;gt;&lt;br /&gt;
proc             /proc           proc  defaults   0     0&lt;br /&gt;
devpts            /dev/pts       devpts rw,noexec,nosuid,gid=5,mode=620 0 0 /dev/xvda1 none swap sw 0 0&lt;br /&gt;
/dev/xvda1 none swap sw 0 0&lt;br /&gt;
/dev/xvda2 / ext4 noatime,nodiratime,errors=remount-ro 0 1&lt;br /&gt;
/dev/xvdb /var ext4 defaults 0 2 &lt;br /&gt;
/dev/xvdc /home ext4 defaults 0 2&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== '''Monter les partitions définies dans &amp;lt;code&amp;gt;fstab&amp;lt;/code&amp;gt; :''' ===&lt;br /&gt;
Pour monter toutes les partitions définies dans le fichier &amp;lt;code&amp;gt;/etc/fstab&amp;lt;/code&amp;gt;  :&lt;br /&gt;
 mount -a  # Remontage des partitions définies dans fstab&lt;br /&gt;
Cette commande monte toutes les partitions qui ne sont pas encore montées et qui sont définies dans &amp;lt;code&amp;gt;/etc/fstab&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
remet les données dans le fichier déplacer.&lt;br /&gt;
&lt;br /&gt;
Puis, pour appliquer les changement nous avons redémarré la VM en faisant le '''xen shutdown SE4.Elf''' ,  '''xen create /etc/xen/SE4.Elf.cfg''',  '''xen console SE4.Elf'''&lt;br /&gt;
&lt;br /&gt;
=== '''Vérification des partitions montées''' ===&lt;br /&gt;
Après avoir configuré le montage automatique et remonté les partitions, nous devons vérifier que les partitions sont correctement montées. Nous avons utilisé la commande '''&amp;lt;code&amp;gt;df -h&amp;lt;/code&amp;gt;''' pour afficher l'espace disque utilisé et disponible sur les partitions montées.&lt;br /&gt;
&lt;br /&gt;
Cela nous permet de confirmer que les partitions '''&amp;lt;code&amp;gt;/var&amp;lt;/code&amp;gt;''' et '''&amp;lt;code&amp;gt;/home&amp;lt;/code&amp;gt;''' sont correctement montées sur les répertoires associés et qu'il n'y a pas de problème d'espace disque.&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== &amp;lt;big&amp;gt;'''Configuration Reseau'''&amp;lt;/big&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
Tout d'abord nous avons modifier le fichier /etc/xen/SE4.Elf pour y ajouter une nouvelle interface sur le bridge de la promotion SE4.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Afin d’assurer une connectivité IPv6 stable et routée pour un accès direct à Internet, ainsi qu’une communication efficace avec la machine mandataire, nous avons modifié le fichier '''&amp;lt;code&amp;gt;/etc/network/interfaces&amp;lt;/code&amp;gt;'''. De plus, une adresse IPv4 fixe a été attribuée sur le réseau privé afin de garantir une interaction optimale entre les machines de services et leur machine mandataire.&lt;br /&gt;
&lt;br /&gt;
=== '''Mise a jour du fichier'''  /etc/network/interfaces ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
# Interface loopback&lt;br /&gt;
auto lo&lt;br /&gt;
iface lo inet loopback&lt;br /&gt;
&lt;br /&gt;
# Interface principale (eth0) - IPv4 statique + IPv6 automatique&lt;br /&gt;
auto eth0&lt;br /&gt;
iface eth0 inet static&lt;br /&gt;
    address 192.168.50.12&lt;br /&gt;
    netmask 255.255.255.254  # /24 &lt;br /&gt;
    gateway 192.168.50.1     # @mandataire&lt;br /&gt;
&lt;br /&gt;
iface eth0 inet6 auto  # Attribution automatique d'une IPv6&lt;br /&gt;
&lt;br /&gt;
# Interface secondaire (eth1) - IPv6 automatique uniquement&lt;br /&gt;
auto eth1&lt;br /&gt;
iface eth1 inet6 auto&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Il faut ensuite aciver l'interface en faisan'''t  ifdown eth0 &amp;amp;&amp;amp; ifup eth0''' et puis  '''ifdown eth1 &amp;amp;&amp;amp; ifup eth1''' aprés faire le '''systemctl restart networking''' pour mettre a jour les configurations du reseau.&lt;br /&gt;
&lt;br /&gt;
Les commandes : &lt;br /&gt;
&lt;br /&gt;
* ip route show : pour afficher la table de routage.&lt;br /&gt;
* ip -4 addr show : pour afficher l'adresse ipv4   #'''''192.168.50.12'''''&lt;br /&gt;
* ip -6 addr show : pour afficher l'adresse ipv6   #'''''2001:660:4401:60a0:216:3eff:fe83:a3c8'''''&lt;br /&gt;
&lt;br /&gt;
Grace a toute ses configurations, nous pouvons faire un ping sur la machine mandataire RockStar et sur la machine de service Kasav &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:~# ping 192.168.50.13        #ping sur la machine de service Kasav&lt;br /&gt;
PING 192.168.50.13 (192.168.50.13) 56(84) bytes of data.&lt;br /&gt;
64 bytes from 192.168.50.13: icmp_seq=1 ttl=64 time=0.132 ms&lt;br /&gt;
64 bytes from 192.168.50.13: icmp_seq=2 ttl=64 time=0.318 ms&lt;br /&gt;
64 bytes from 192.168.50.13: icmp_seq=3 ttl=64 time=0.369 ms&lt;br /&gt;
64 bytes from 192.168.50.13 icmp_seq=4 ttl=64 time=0.356 ms&lt;br /&gt;
--- 192.168.50.13 ping statistics ---&lt;br /&gt;
4 packets transmitted, 4 received, 0% packet loss, time 3077ms&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== '''Installation des services''' ===&lt;br /&gt;
Installation des services pour la suite du tp, les services a installé sont&lt;br /&gt;
&lt;br /&gt;
* '''Ssh''' : pour permettre l’accès à distance sécurisé à la machine pour l’administration et la maintenance&lt;br /&gt;
* '''Apache2 (Serveur web)''' : pour heberger des applications et sites web accessibles aux utilisateurs&lt;br /&gt;
* '''Bind9''' : pour assurer  la résolution de noms de domaine, essentielle pour le bon fonctionnement des services sur le réseau&lt;br /&gt;
&lt;br /&gt;
La commnde pour installer est '''apt install -y openssh-server apache2 bind9'''Après l'installation :&lt;br /&gt;
&lt;br /&gt;
Vérifiez si les services sont en cours d'exécution  '''systemctl status ssh apache2 bind9.'''&lt;br /&gt;
&lt;br /&gt;
Activez et démarrez les services si nécessaire '''systemctl enable --now ssh apache2 bind9'''&lt;br /&gt;
&lt;br /&gt;
== '''Configuration de la machine mandataire''' ==&lt;br /&gt;
&lt;br /&gt;
=== '''Mise à jour du fichier''' ===&lt;br /&gt;
'''&amp;lt;code&amp;gt;Modification du fichier /etc/network/interfaces&amp;lt;/code&amp;gt;'''&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
# Fichier /etc/network/interfaces&lt;br /&gt;
auto lo&lt;br /&gt;
iface lo inet loopback&lt;br /&gt;
&lt;br /&gt;
# Interface publique (réseau routé)&lt;br /&gt;
auto eth1&lt;br /&gt;
iface eth1 inet static&lt;br /&gt;
    address 193.48.57.172/27&lt;br /&gt;
   &lt;br /&gt;
&lt;br /&gt;
iface eth1 inet6 auto&lt;br /&gt;
&lt;br /&gt;
# Interface privée &lt;br /&gt;
auto eth0&lt;br /&gt;
iface eth0 inet static&lt;br /&gt;
    address 192.168.50.1/24&lt;br /&gt;
&lt;br /&gt;
iface eth0 inet6 auto&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Il faut ensuite aciver l'interface en faisan'''t  ifdown eth0 &amp;amp;&amp;amp; ifup eth0''' et puis  '''ifdown eth1 &amp;amp;&amp;amp; ifup eth1''' aprés faire le '''systemctl restart networking''' pour mettre a jour les configurations du reseau.&lt;br /&gt;
&lt;br /&gt;
=== Mise en place de la mascarade (NAT) ===&lt;br /&gt;
La mise en place de la masquerade (NAT) permet aux machines d’un réseau privé d’accéder au réseau externe en utilisant l’adresse IP publique de la passerelle, tout en masquant l’architecture interne et en améliorant la sécurité.&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
echo &amp;quot;net.ipv4.ip_forward=1&amp;quot; &amp;gt;&amp;gt; /etc/sysctl.conf&lt;br /&gt;
sysctl -p&lt;br /&gt;
&lt;br /&gt;
# Règles iptables pour la mascarade&lt;br /&gt;
iptables -t nat -A POSTROUTING -s 192.168.50.0/24 -o eth1 -j MASQUERADE&lt;br /&gt;
iptables -A FORWARD -i eth0 -o eth1 -j ACCEPT&lt;br /&gt;
iptables -A FORWARD -i eth1 -o eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT&lt;br /&gt;
&lt;br /&gt;
# Sauvegarde pour persistance&lt;br /&gt;
iptables-save &amp;gt; /etc/iptables/rules.v4&lt;br /&gt;
&lt;br /&gt;
# Ajout dans interfaces pour chargement au démarrage&lt;br /&gt;
post-up iptables-restore &amp;lt; /etc/iptables/rules.v4&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== '''Installation des paquetages  :''' ===&lt;br /&gt;
De la même manière que pour Moon et Apollo on installe les paquetages :&lt;br /&gt;
 apt install -y openssh-server apache2 bind9&lt;br /&gt;
Puis après l'installation on vérifie si les services sont en cours d'exécution :&lt;br /&gt;
 systemctl status ssh apache2 bind9&lt;br /&gt;
Activez et démarrez les services si nécessaire :&lt;br /&gt;
 systemctl enable --now ssh apache2 bind9&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==  '''Serveur SSH''' ==&lt;br /&gt;
Notre machine virtuelle doit etre accessible par SSH, on autorise donc l'accès par l'utilisateur '''Root en modifiant le fichier de de configuration &amp;lt;code&amp;gt;/etc/ssh/sshd_config  :&amp;lt;/code&amp;gt;'''&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
PermitRootLogin yes&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Il faut ensuite redemarrer le serveur ssh en faisant :&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/etc/ssh# /etc/init.d/ssh restart&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Pour gérer la redirection du SSH, on doit configurer '''nftables''' sur nos machines de service en redirigeant les ports 2201 et 2202&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
nft add table ip nat&lt;br /&gt;
nft add chain ip nat PREROUTING { type nat hook prerouting priority 0 \; }&lt;br /&gt;
nft add rule ip nat PREROUTING tcp dport 2201 dnat to 192.168.50.12:22                 &lt;br /&gt;
nft add rule ip nat PREROUTING tcp dport 2202 dnat to 192.168.50.3:22              &lt;br /&gt;
nft add chain ip nat POSTROUTING { type nat hook postrouting priority 100 \; }&lt;br /&gt;
nft add rule ip nat POSTROUTING masquerade&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Maintenant, on peut se connecter en SSH sur les machiches virtuelles de services:  De Elf, on peut se connecter a Kasav&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/# ssh root@192.168.50.3&lt;br /&gt;
root@192.168.50.3's password: &lt;br /&gt;
Linux Kasav 4.19.0-26-amd64 #1 SMP Debian 4.19.304-1 (2024-01-09) x86_64&lt;br /&gt;
&lt;br /&gt;
The programs included with the Devuan GNU/Linux system are free software;&lt;br /&gt;
the exact distribution terms for each program are described in the&lt;br /&gt;
individual files in /usr/share/doc/*/copyright.&lt;br /&gt;
&lt;br /&gt;
Devuan GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent&lt;br /&gt;
permitted by applicable law.&lt;br /&gt;
Last login: Tue Feb  3 11:34:45 2026 from 192.168.50.12&lt;br /&gt;
root@Kasav:~# &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Serveur DNS''' ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
$TTL 86400&lt;br /&gt;
@ IN SOA ns1.elvis21.tech. admin.elvis21.tech. (&lt;br /&gt;
        3298267246      ;Version&lt;br /&gt;
        3600            ;Refresh&lt;br /&gt;
        1800            ;Retry&lt;br /&gt;
        604800          ;Expire&lt;br /&gt;
        86400 )         ;Minimum TTL&lt;br /&gt;
;&lt;br /&gt;
@  IN NS ns1.elvis21.tech.&lt;br /&gt;
&lt;br /&gt;
ns1 IN A 192.168.50.12&lt;br /&gt;
ns2 IN A 192.168.50.1&lt;br /&gt;
 IN A 192.168.50.12&lt;br /&gt;
      IN AAAA 2001:660:4401:60a0:216:3eff:fe83:a3c8&lt;br /&gt;
www IN A 192.168.50.12&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/etc/bind# cat named.conf.local &lt;br /&gt;
zone &amp;quot;elvis21.tech&amp;quot; {&lt;br /&gt;
    type primary;&lt;br /&gt;
    file &amp;quot;/etc/bind/zones/db.elvis21.tech&amp;quot;;&lt;br /&gt;
    allow-transfer {&lt;br /&gt;
      2001:660:4401:60a0:216:3eff:fe70:7f1c;&lt;br /&gt;
      2001:660:4401:60a0:216:3eff:fe9a:ea1c;&lt;br /&gt;
      };&lt;br /&gt;
    also-notify { 2001:660:4401:60a0:216:3eff:fe70:7f1c; };&lt;br /&gt;
    inline-signing yes;   // DNSSEC automatique&lt;br /&gt;
    key-directory &amp;quot;/etc/bind/keys&amp;quot;; // répertoire des clefs, attention aux droits&lt;br /&gt;
    dnssec-policy &amp;quot;dnssecpolicy&amp;quot;;  // politique pour les clefs de chiffrement&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
zone &amp;quot;kasav.online&amp;quot; {&lt;br /&gt;
    type secondary;&lt;br /&gt;
    file &amp;quot;/etc/bind/backup/db.kasav.online&amp;quot;;&lt;br /&gt;
    primaries { 2001:660:4401:60a0:216:3eff:fe9a:ea1c; };&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
dnssec-policy &amp;quot;dnssecpolicy&amp;quot; {&lt;br /&gt;
  keys {&lt;br /&gt;
    ksk key-directory lifetime unlimited algorithm 13;&lt;br /&gt;
    zsk key-directory lifetime unlimited algorithm 13;&lt;br /&gt;
  };&lt;br /&gt;
  nsec3param;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/etc/bind# named-checkzone elvis21.tech /etc/bind/db.elvis21.tech&lt;br /&gt;
zone elvis21.tech/IN: loaded serial 3298267246&lt;br /&gt;
OK&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
openssl req -nodes -newkey rsa:2048 -sha256 -keyout elvis21.tech.key -out elvis21.csr&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
[[Fichier:ImageDns.png|vignette|994x994px|centré]]&lt;br /&gt;
&lt;br /&gt;
== '''Mise en place du serveur Apache (http et https)''' ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
apt update&lt;br /&gt;
apt install apache2&lt;br /&gt;
systemctl enable --now apache2&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
[[Fichier:Elvis21.tech-DNS.png|gauche|vignette|863x863px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Installation Fail2ban''' ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/# apt install fail2ban &lt;br /&gt;
Installing:                     &lt;br /&gt;
  fail2ban&lt;br /&gt;
&lt;br /&gt;
root@Elf:/# systemctl status fail2ban&lt;br /&gt;
fail2ban.service - Fail2Ban Service&lt;br /&gt;
    Loaded: loaded (/usr/lib/systemd/system/fail2ban.service, disabled)&lt;br /&gt;
    Active: active (running)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/# service fail2ban status                             &lt;br /&gt;
Status of Authentication failure monitor: fail2ban is running.&lt;br /&gt;
 root@Elf:/# fail2ban-client status&lt;br /&gt;
Status&lt;br /&gt;
|- Number of jail:	1&lt;br /&gt;
`- Jail list:	sshd&lt;br /&gt;
&lt;br /&gt;
root@Elf:/# fail2ban-client status sshd&lt;br /&gt;
Status for the jail: sshd&lt;br /&gt;
|- Filter&lt;br /&gt;
|  |- Currently failed:	0&lt;br /&gt;
|  |- Total failed:	0&lt;br /&gt;
|  `- File list:	/var/log/auth.log&lt;br /&gt;
`- Actions&lt;br /&gt;
   |- Currently banned:	0&lt;br /&gt;
   |- Total banned:	0&lt;br /&gt;
   `- Banned IP list:	&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Mise en place du serveur Apache (http et https) ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/# service apache2 status&lt;br /&gt;
apache2 is running.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''WIFI''' ==&lt;br /&gt;
Faire ip link&lt;br /&gt;
&lt;br /&gt;
ensuite sudo airodump-ng wlanx  -- Remplacer x par le numero du wlan present &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
BSSID              PWR  Beacons    #Data, #/s  CH   MB   ENC CIPHER  AUTH ESSID&lt;br /&gt;
04:DA:D2:9C:50:54  -62       23       11    0   4   54e. WEP  WEP         cracotte05                         &lt;br /&gt;
04:DA:D2:9C:50:5A  -61        2        1    0   4   54e. WEP  WEP         cracotte11    &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;sudo airodump-ng wlan1 --bssid 04:DA:D2:9C:50:5A  -c4 --write log_airdump&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
sudo airodump-ng wlan1 --write airdump --bssid 04:DA:D2:9C:50:5A -c4&lt;br /&gt;
17:31:10  Created capture file &amp;quot;airdump-04.cap&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
 CH  4 ][ Elapsed: 39 mins ][ 2026-02-10 18:11 ][ fixed channel wlan1: 13 &lt;br /&gt;
&lt;br /&gt;
 BSSID              PWR RXQ  Beacons    #Data, #/s  CH   MB   ENC CIPHER  AUTH ESSID&lt;br /&gt;
&lt;br /&gt;
 04:DA:D2:9C:50:5A  -58   3     9766    43771   21   4   54e. WEP  WEP         cracotte11                                                                                                   &lt;br /&gt;
&lt;br /&gt;
 BSSID              STATION            PWR    Rate    Lost   Frames  Notes  Probes&lt;br /&gt;
&lt;br /&gt;
 04:DA:D2:9C:50:5A  40:A5:EF:01:2E:FA  -77    0 -48e   127    46300                                                                                                                          &lt;br /&gt;
Quitting...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
aircrack-ng airdump-05.cap &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
           Aircrack-ng 1.7 &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                 [00:25:47] Tested 869 keys (got 34546 IVs)&lt;br /&gt;
                          Got 35002 out of 35000 IVsStarting PTW attack with 35002 KB    depth   byte(vote)&lt;br /&gt;
    0    0/  2   FF(50176) 1C(43520) E6(42752) 3F(42496) B6(42496) &lt;br /&gt;
    1    0/  6   FF(48128) AC(46336) 90(42752) 8E(42496) 04(42240) &lt;br /&gt;
    2    0/  1   BD(50688) 7F(43776) 75(42752) E6(41216) F2(41216) &lt;br /&gt;
    3    9/  3   CE(39936) 05(39680) 5C(39680) 9A(39168) F4(39168) &lt;br /&gt;
    4   41/  4   6C(37376) 1E(37120) 80(37120) 88(37120) A7(37120) &lt;br /&gt;
&lt;br /&gt;
             KEY FOUND! [ FF:FF:FF:FF:FA:BC:12:CB:AE:EE:EE:EE:EE ]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
ssh -oKexAlgorithms=+diffie-hellman-group14-sha1 -oHostKeyAlgorithms=+ssh-rsa -oCiphers=+aes128-cbc admin@172.27.0.1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
C9200-E304&amp;gt;en&lt;br /&gt;
Password: &lt;br /&gt;
C9200-E304#config t&lt;br /&gt;
Enter configuration commands, one per line.  End with CNTL/Z.&lt;br /&gt;
C9200-E304(config)#vlan 28&lt;br /&gt;
C9200-E304(config-vlan)#name PoolEvora&lt;br /&gt;
C9200-E304(config-vlan)#exit &lt;br /&gt;
C9200-E304(config)#exit&lt;br /&gt;
C9200-E304#write&lt;br /&gt;
Building configuration...&lt;br /&gt;
[OK]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
C9200-E304#en&lt;br /&gt;
C9200-E304#config t&lt;br /&gt;
Enter configuration commands, one per line.  End with CNTL/Z.&lt;br /&gt;
C9200-E304(config)#ip dhcp pool PoolEvora  &lt;br /&gt;
C9200-E304(dhcp-config)#network 10.60.11.0 255.255.255.0&lt;br /&gt;
C9200-E304(dhcp-config)#dns-server 193.48.57.172&lt;br /&gt;
C9200-E304(dhcp-config)#default-router 10.60.11.254&lt;br /&gt;
C9200-E304(dhcp-config)#exit&lt;br /&gt;
C9200-E304(config)#exit&lt;br /&gt;
C9200-E304#write&lt;br /&gt;
Building configuration...&lt;br /&gt;
[OK]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
ip dhcp pool PoolTom&lt;br /&gt;
 network 10.60.10.0 255.255.255.0&lt;br /&gt;
 dns-server 193.48.57.168 &lt;br /&gt;
 default-router 10.60.10.254 &lt;br /&gt;
!         &lt;br /&gt;
ip dhcp pool PoolEvora&lt;br /&gt;
 network 10.60.11.0 255.255.255.0&lt;br /&gt;
 dns-server 193.48.57.172 &lt;br /&gt;
 default-router 10.60.11.254 &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;VRRP&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
C9200-E304&amp;gt;en &lt;br /&gt;
Password: &lt;br /&gt;
C9200-E304#config t&lt;br /&gt;
Enter configuration commands, one per line.  End with CNTL/Z.&lt;br /&gt;
C9200-E304(config)#interface vlan 28&lt;br /&gt;
C9200-E304(config-if)#ip address 10.60.11.2 255.255.255.0&lt;br /&gt;
C9200-E304(config-if)#ipv6 address 2001:660:4401:60ab::2/64&lt;br /&gt;
C9200-E304(config-if)#vrrp 28 address-family ipv4        &lt;br /&gt;
C9200-E304(config-if-vrrp)#priority 110&lt;br /&gt;
C9200-E304(config-if-vrrp)#address 10.60.11.1 primary&lt;br /&gt;
C9200-E304(config-if-vrrp)#exit&lt;br /&gt;
C9200-E304(config-if)#exit&lt;br /&gt;
C9200-E304(config)#exit&lt;br /&gt;
C9200-E304#write&lt;br /&gt;
Building configuration...&lt;br /&gt;
[OK]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;WIFI e304&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
ssh admin@172.27.0.4 \&lt;br /&gt;
  -o KexAlgorithms=+diffie-hellman-group1-sha1 \&lt;br /&gt;
  -o HostKeyAlgorithms=+ssh-rsa \&lt;br /&gt;
  -o Ciphers=+aes128-cbc \&lt;br /&gt;
  -o MACs=+hmac-sha1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Vsouopme</name></author>
	</entry>
	<entry>
		<id>https://wiki-se.plil.fr/mediawiki/index.php?title=Atelier_SysRes_SE4_2025/2026_E11&amp;diff=12304</id>
		<title>Atelier SysRes SE4 2025/2026 E11</title>
		<link rel="alternate" type="text/html" href="https://wiki-se.plil.fr/mediawiki/index.php?title=Atelier_SysRes_SE4_2025/2026_E11&amp;diff=12304"/>
		<updated>2026-02-21T20:06:29Z</updated>

		<summary type="html">&lt;p&gt;Vsouopme : /* Configuration de la machine mandataire */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Projet Virtualisation /Administration Systeme-Réseau - Machine SE4.Elf =&lt;br /&gt;
Dans le cadre de ce projet, nnous avons déployés une infrastructure composée de '''deux machines dédiées aux services''' et d’une '''machine mandataire''', le tout à l’aide de l'environnement  '''Xen.'''&lt;br /&gt;
&lt;br /&gt;
== Création des machines virtuelles ==&lt;br /&gt;
Les machines sont créées  sur le Dom0 '''Capbreton.plil.info''' en faisant un '''ssh root@capbreton.plil.info''' &lt;br /&gt;
&lt;br /&gt;
Sur la capbreton.plil.info, &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
xen create-image --hostname=SE4.Elf --dhcp --dir=/usr/local/xen --size=10G --dist=excalibur --memory=2G --bridge=Styx --force&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; '''Xen-create-image''' :  Commande permettant de créer une nouvelle machine virtuelle Xen&lt;br /&gt;
&lt;br /&gt;
'''--hostname=SE4.Elf :''' Pour le nom de la machine &lt;br /&gt;
&lt;br /&gt;
'''--size=10G''' : La taille du disque &lt;br /&gt;
&lt;br /&gt;
'''--bridge=Styx''' : Le nom du bridge &lt;br /&gt;
&lt;br /&gt;
Par la suite il faut creer un fichier dans le répertoire &amp;lt;code&amp;gt;/etc/network/interfaces.d&amp;lt;/code&amp;gt; du Dom0 pour créer notre pont. (NB: Il faut noter que cette etape on peut la faire avant la creation de notre VM&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
auto Styx&lt;br /&gt;
&lt;br /&gt;
iface Styx inet manual&lt;br /&gt;
   bridge_ports none&lt;br /&gt;
   up ip link set $IFACE up&lt;br /&gt;
   down ip link set $IFACE down&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;La commande '''xen list :''' Affiche les '''machines virtuelles''' (VM) qui sont actuellement gérées par Xen (Elle fait la liste des VM allumée).&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
root@capbreton:~# xen list&lt;br /&gt;
SE4.batman                                 322  2048     1     -b----      37.5&lt;br /&gt;
SE4.Moon                                   326  2048     1     -b----      41.1&lt;br /&gt;
SE4.C2                                     332  1024     1     -b----      18.1&lt;br /&gt;
SE4.Tension                                343  2048     1     -b----       7.8&lt;br /&gt;
SE4.CachyOS                                365  2048     1     -b----      10.2&lt;br /&gt;
SE4.RockStar                               367  2048     1     -b----       6.1&lt;br /&gt;
SE4.Kasav                                  368  2048     1     -b----       5.9&lt;br /&gt;
SE4.Elf                                    369  2048     1     -b----       5.6&lt;br /&gt;
SE4.catwoman                               370  2048     1     -b----       6.1&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;-La commande '''xen create /etc/xen/SE4.Elf.cfg''' permet d'allumer la Machine virtuellle.&lt;br /&gt;
&lt;br /&gt;
-La commande xen '''console SE4.Elf''' permet d'acceder  / de se connecter  a la VM.&lt;br /&gt;
&lt;br /&gt;
-La commande '''xen shutdown''' '''SE4.Elf''' permet d'eteindre la machine virtuelle.&lt;br /&gt;
&lt;br /&gt;
Lors de la tentative de connexion, il y'a une un probleme , pour y remedier,  '''Ctrl + AltGr + ] =&amp;gt; vi =&amp;gt; :q! =&amp;gt; reconnexion'''&lt;br /&gt;
&lt;br /&gt;
Pour voir le mot de passe de la VM, '''cat /var/log/xen-tools/SE4.Elf.log'''&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
Installation Summary&lt;br /&gt;
---------------------&lt;br /&gt;
Hostname        :  SE4.Elf&lt;br /&gt;
Distribution    :  excalibur&lt;br /&gt;
MAC Address     :  00:16:3E:83:A3:C7&lt;br /&gt;
IP Address(es)  :  dynamic&lt;br /&gt;
SSH Fingerprint :  SHA256:IrPhxhB4m1s+eaPaLynS6NlE/HfL78+y3ba3DPuHFQU (DSA)&lt;br /&gt;
SSH Fingerprint :  SHA256:RT+MZtlFxC7BrdYORzOcxDX+SKsJrLzOGWWngX2pKz4 (ECDSA)&lt;br /&gt;
SSH Fingerprint :  SHA256:aLYvYqUPX2Q/J5P0nTpdpMyrFD5xopRqkFKuYb7QUo4 (ED25519)&lt;br /&gt;
SSH Fingerprint :  SHA256:b0ddm9FYx4/losJU8/pE9MXx7102ygkAMjChOvPlNhE (RSA)&lt;br /&gt;
Root Password   :  X&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;- La commande '''vi /etc/hostname''' pour changer le nom de la VM&lt;br /&gt;
&lt;br /&gt;
== '''Configuration de la Machine de Services''' ==&lt;br /&gt;
Il faut creer deux partitions LVM de 10G pour votre machine virtuelle et modifiez le fichier de configuration de la machine virtuelle de services pour faire en sorte que les répertoires &amp;lt;code&amp;gt;/'''var'''&amp;lt;/code&amp;gt; et &amp;lt;code&amp;gt;'''/home'''&amp;lt;/code&amp;gt; de la machine virtuelle soient implantés sur ces partitions LVM&lt;br /&gt;
&lt;br /&gt;
=== '''Création des volumes logiques''' ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
lvcreate -L 10G -n lv_var_SE4Elf &lt;br /&gt;
lvcreate -L 10G -n lv_home_SE4Elf &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Faire '''lvdisplay''' pour faire la verification&lt;br /&gt;
&lt;br /&gt;
Depuis le serveur Capbreton, on a créé 2 fichiers de partitions dans &amp;lt;code&amp;gt;/dev/virtual&amp;lt;/code&amp;gt; pour chaque machines de services &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@capbreton:/dev/virtual# ls &lt;br /&gt;
SE4.Poseidon.home lv_home_SE4Elf lv_var_SE4Elf  SE4.Gaby.home SE4.Poseidon.var SE4.Gaby.var &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Apres nous avons modifié le fichier /etc/xen/SE4.Elf.cfg piur y ajouter deux répertoires&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
disk = [&lt;br /&gt;
  'file:/usr/local/xen/domains/SE4.Elf/disk.img,xvda2,w',&lt;br /&gt;
  'file:/usr/local/xen/domains/SE4.Elf/swap.img,xvda1,w',&lt;br /&gt;
  'phy:/dev/vg0/lv_var_SE4Elf,xvdb,w',&lt;br /&gt;
  'phy:/dev/vg0/lv_home_SE4Elf,xvdc,w'&lt;br /&gt;
]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== ''' Création et formatage des partitions''' ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
mkfs -t ext4 /dev/xvdb  # Formatage de la partition pour /var &lt;br /&gt;
mkfs -t ext4 /dev/xvdc  # Formatage de la partition pour /home&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== '''Préparer les partitions et déplacer les données :''' ===&lt;br /&gt;
&lt;br /&gt;
* '''Montage temporaire des partitions dans &amp;lt;code&amp;gt;/mnt&amp;lt;/code&amp;gt; :'''&lt;br /&gt;
&lt;br /&gt;
Pour pouvoir déplacer les données, nous avons du monter les nouvelles partitions LVM dans un répertoire temporaire &amp;lt;code&amp;gt;/mnt&amp;lt;/code&amp;gt;.  On a créé 2 partitions une pour &amp;lt;code&amp;gt;/var&amp;lt;/code&amp;gt; et une &amp;lt;code&amp;gt;/home&amp;lt;/code&amp;gt; sous les noms xvdb et xvdc dans  &amp;lt;code&amp;gt;/dev&amp;lt;/code&amp;gt;  ,que l'on monte avec  :&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
mount /dev/xvdb /mnt&lt;br /&gt;
mount /dev/xvdc /mnt&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* '''Déplacement des fichiers existants'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
mv /var/* /mnt # Déplacement des fichiers de /var vers la nouvelle partition&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== '''Démonter les partitions temporaires :''' ===&lt;br /&gt;
Avant de configurer les montages permanents, on démonte les partitions des répertoires temporaires (&amp;lt;code&amp;gt;/mnt&amp;lt;/code&amp;gt;)&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
umount /mnt # Démontage après transfert des données&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== '''Modification du fichier &amp;lt;code&amp;gt;/etc/fstab&amp;lt;/code&amp;gt; pour un montage automatique au démarrage :''' ===&lt;br /&gt;
On modifie le fichier &amp;lt;code&amp;gt;'''/etc/fstab'''&amp;lt;/code&amp;gt;, qui contient la liste des partitions.&lt;br /&gt;
&lt;br /&gt;
Ajout des nouvelles partitions LVM au fichier &amp;lt;code&amp;gt;/etc/fstab&amp;lt;/code&amp;gt; :&lt;br /&gt;
&lt;br /&gt;
* '''/dev/xvdb /var ext4 defaults 0 2'''&lt;br /&gt;
* '''/dev/xvdc /home ext4 defaults 0''' &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
# /etc/fstab: static file system information.&lt;br /&gt;
#&lt;br /&gt;
# &amp;lt;file system&amp;gt; &amp;lt;mount point&amp;gt; &amp;lt;type&amp;gt; &amp;lt;options&amp;gt; &amp;lt;dump&amp;gt; &amp;lt;pass&amp;gt;&lt;br /&gt;
proc             /proc           proc  defaults   0     0&lt;br /&gt;
devpts            /dev/pts       devpts rw,noexec,nosuid,gid=5,mode=620 0 0 /dev/xvda1 none swap sw 0 0&lt;br /&gt;
/dev/xvda1 none swap sw 0 0&lt;br /&gt;
/dev/xvda2 / ext4 noatime,nodiratime,errors=remount-ro 0 1&lt;br /&gt;
/dev/xvdb /var ext4 defaults 0 2 &lt;br /&gt;
/dev/xvdc /home ext4 defaults 0 2&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== '''Monter les partitions définies dans &amp;lt;code&amp;gt;fstab&amp;lt;/code&amp;gt; :''' ===&lt;br /&gt;
Pour monter toutes les partitions définies dans le fichier &amp;lt;code&amp;gt;/etc/fstab&amp;lt;/code&amp;gt;  :&lt;br /&gt;
 mount -a  # Remontage des partitions définies dans fstab&lt;br /&gt;
Cette commande monte toutes les partitions qui ne sont pas encore montées et qui sont définies dans &amp;lt;code&amp;gt;/etc/fstab&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
remet les données dans le fichier déplacer.&lt;br /&gt;
&lt;br /&gt;
Puis, pour appliquer les changement nous avons redémarré la VM en faisant le '''xen shutdown SE4.Elf''' ,  '''xen create /etc/xen/SE4.Elf.cfg''',  '''xen console SE4.Elf'''&lt;br /&gt;
&lt;br /&gt;
=== '''Vérification des partitions montées''' ===&lt;br /&gt;
Après avoir configuré le montage automatique et remonté les partitions, nous devons vérifier que les partitions sont correctement montées. Nous avons utilisé la commande '''&amp;lt;code&amp;gt;df -h&amp;lt;/code&amp;gt;''' pour afficher l'espace disque utilisé et disponible sur les partitions montées.&lt;br /&gt;
&lt;br /&gt;
Cela nous permet de confirmer que les partitions '''&amp;lt;code&amp;gt;/var&amp;lt;/code&amp;gt;''' et '''&amp;lt;code&amp;gt;/home&amp;lt;/code&amp;gt;''' sont correctement montées sur les répertoires associés et qu'il n'y a pas de problème d'espace disque.&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== &amp;lt;big&amp;gt;'''Configuration Reseau'''&amp;lt;/big&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
Tout d'abord nous avons modifier le fichier /etc/xen/SE4.Elf pour y ajouter une nouvelle interface sur le bridge de la promotion SE4.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Afin d’assurer une connectivité IPv6 stable et routée pour un accès direct à Internet, ainsi qu’une communication efficace avec la machine mandataire, nous avons modifié le fichier '''&amp;lt;code&amp;gt;/etc/network/interfaces&amp;lt;/code&amp;gt;'''. De plus, une adresse IPv4 fixe a été attribuée sur le réseau privé afin de garantir une interaction optimale entre les machines de services et leur machine mandataire.&lt;br /&gt;
&lt;br /&gt;
=== '''Mise a jour du fichier'''  /etc/network/interfaces ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
# Interface loopback&lt;br /&gt;
auto lo&lt;br /&gt;
iface lo inet loopback&lt;br /&gt;
&lt;br /&gt;
# Interface principale (eth0) - IPv4 statique + IPv6 automatique&lt;br /&gt;
auto eth0&lt;br /&gt;
iface eth0 inet static&lt;br /&gt;
    address 192.168.50.12&lt;br /&gt;
    netmask 255.255.255.254  # /24 &lt;br /&gt;
    gateway 192.168.50.1     # @mandataire&lt;br /&gt;
&lt;br /&gt;
iface eth0 inet6 auto  # Attribution automatique d'une IPv6&lt;br /&gt;
&lt;br /&gt;
# Interface secondaire (eth1) - IPv6 automatique uniquement&lt;br /&gt;
auto eth1&lt;br /&gt;
iface eth1 inet6 auto&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Il faut ensuite aciver l'interface en faisan'''t  ifdown eth0 &amp;amp;&amp;amp; ifup eth0''' et puis  '''ifdown eth1 &amp;amp;&amp;amp; ifup eth1''' aprés faire le '''systemctl restart networking''' pour mettre a jour les configurations du reseau.&lt;br /&gt;
&lt;br /&gt;
Les commandes : &lt;br /&gt;
&lt;br /&gt;
* ip route show : pour afficher la table de routage.&lt;br /&gt;
* ip -4 addr show : pour afficher l'adresse ipv4   #'''''192.168.50.12'''''&lt;br /&gt;
* ip -6 addr show : pour afficher l'adresse ipv6   #'''''2001:660:4401:60a0:216:3eff:fe83:a3c8'''''&lt;br /&gt;
&lt;br /&gt;
Grace a toute ses configurations, nous pouvons faire un ping sur la machine mandataire RockStar et sur la machine de service Kasav &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:~# ping 192.168.50.13        #ping sur la machine de service Kasav&lt;br /&gt;
PING 192.168.50.13 (192.168.50.13) 56(84) bytes of data.&lt;br /&gt;
64 bytes from 192.168.50.13: icmp_seq=1 ttl=64 time=0.132 ms&lt;br /&gt;
64 bytes from 192.168.50.13: icmp_seq=2 ttl=64 time=0.318 ms&lt;br /&gt;
64 bytes from 192.168.50.13: icmp_seq=3 ttl=64 time=0.369 ms&lt;br /&gt;
64 bytes from 192.168.50.13 icmp_seq=4 ttl=64 time=0.356 ms&lt;br /&gt;
--- 192.168.50.13 ping statistics ---&lt;br /&gt;
4 packets transmitted, 4 received, 0% packet loss, time 3077ms&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== '''Installation des services''' ===&lt;br /&gt;
Installation des services pour la suite du tp, les services a installé sont&lt;br /&gt;
&lt;br /&gt;
* '''Ssh''' : pour permettre l’accès à distance sécurisé à la machine pour l’administration et la maintenance&lt;br /&gt;
* '''Apache2 (Serveur web)''' : pour heberger des applications et sites web accessibles aux utilisateurs&lt;br /&gt;
* '''Bind9''' : pour assurer  la résolution de noms de domaine, essentielle pour le bon fonctionnement des services sur le réseau&lt;br /&gt;
&lt;br /&gt;
La commnde pour installer est '''apt install -y openssh-server apache2 bind9'''Après l'installation :&lt;br /&gt;
&lt;br /&gt;
Vérifiez si les services sont en cours d'exécution  '''systemctl status ssh apache2 bind9.'''&lt;br /&gt;
&lt;br /&gt;
Activez et démarrez les services si nécessaire '''systemctl enable --now ssh apache2 bind9'''&lt;br /&gt;
&lt;br /&gt;
== '''Configuration de la machine mandataire''' ==&lt;br /&gt;
&lt;br /&gt;
=== '''Mise à jour du fichier &amp;lt;code&amp;gt;/etc/network/interfaces&amp;lt;/code&amp;gt;''' ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
# Fichier /etc/network/interfaces&lt;br /&gt;
auto lo&lt;br /&gt;
iface lo inet loopback&lt;br /&gt;
&lt;br /&gt;
# Interface publique (réseau routé)&lt;br /&gt;
auto eth1&lt;br /&gt;
iface eth1 inet static&lt;br /&gt;
    address 193.48.57.172/27&lt;br /&gt;
   &lt;br /&gt;
&lt;br /&gt;
iface eth1 inet6 auto&lt;br /&gt;
&lt;br /&gt;
# Interface privée &lt;br /&gt;
auto eth0&lt;br /&gt;
iface eth0 inet static&lt;br /&gt;
    address 192.168.50.1/24&lt;br /&gt;
&lt;br /&gt;
iface eth0 inet6 auto&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==  '''Serveur SSH''' ==&lt;br /&gt;
Notre machine virtuelle doit etre accessible par SSH, on autorise donc l'accès par l'utilisateur '''Root en modifiant le fichier de de configuration &amp;lt;code&amp;gt;/etc/ssh/sshd_config  :&amp;lt;/code&amp;gt;'''&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
PermitRootLogin yes&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Il faut ensuite redemarrer le serveur ssh en faisant :&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/etc/ssh# /etc/init.d/ssh restart&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Pour gérer la redirection du SSH, on doit configurer '''nftables''' sur nos machines de service en redirigeant les ports 2201 et 2202&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
nft add table ip nat&lt;br /&gt;
nft add chain ip nat PREROUTING { type nat hook prerouting priority 0 \; }&lt;br /&gt;
nft add rule ip nat PREROUTING tcp dport 2201 dnat to 192.168.50.12:22                 &lt;br /&gt;
nft add rule ip nat PREROUTING tcp dport 2202 dnat to 192.168.50.3:22              &lt;br /&gt;
nft add chain ip nat POSTROUTING { type nat hook postrouting priority 100 \; }&lt;br /&gt;
nft add rule ip nat POSTROUTING masquerade&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Maintenant, on peut se connecter en SSH sur les machiches virtuelles de services:  De Elf, on peut se connecter a Kasav&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/# ssh root@192.168.50.3&lt;br /&gt;
root@192.168.50.3's password: &lt;br /&gt;
Linux Kasav 4.19.0-26-amd64 #1 SMP Debian 4.19.304-1 (2024-01-09) x86_64&lt;br /&gt;
&lt;br /&gt;
The programs included with the Devuan GNU/Linux system are free software;&lt;br /&gt;
the exact distribution terms for each program are described in the&lt;br /&gt;
individual files in /usr/share/doc/*/copyright.&lt;br /&gt;
&lt;br /&gt;
Devuan GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent&lt;br /&gt;
permitted by applicable law.&lt;br /&gt;
Last login: Tue Feb  3 11:34:45 2026 from 192.168.50.12&lt;br /&gt;
root@Kasav:~# &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Serveur DNS''' ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
$TTL 86400&lt;br /&gt;
@ IN SOA ns1.elvis21.tech. admin.elvis21.tech. (&lt;br /&gt;
        3298267246      ;Version&lt;br /&gt;
        3600            ;Refresh&lt;br /&gt;
        1800            ;Retry&lt;br /&gt;
        604800          ;Expire&lt;br /&gt;
        86400 )         ;Minimum TTL&lt;br /&gt;
;&lt;br /&gt;
@  IN NS ns1.elvis21.tech.&lt;br /&gt;
&lt;br /&gt;
ns1 IN A 192.168.50.12&lt;br /&gt;
ns2 IN A 192.168.50.1&lt;br /&gt;
 IN A 192.168.50.12&lt;br /&gt;
      IN AAAA 2001:660:4401:60a0:216:3eff:fe83:a3c8&lt;br /&gt;
www IN A 192.168.50.12&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/etc/bind# cat named.conf.local &lt;br /&gt;
zone &amp;quot;elvis21.tech&amp;quot; {&lt;br /&gt;
    type primary;&lt;br /&gt;
    file &amp;quot;/etc/bind/zones/db.elvis21.tech&amp;quot;;&lt;br /&gt;
    allow-transfer {&lt;br /&gt;
      2001:660:4401:60a0:216:3eff:fe70:7f1c;&lt;br /&gt;
      2001:660:4401:60a0:216:3eff:fe9a:ea1c;&lt;br /&gt;
      };&lt;br /&gt;
    also-notify { 2001:660:4401:60a0:216:3eff:fe70:7f1c; };&lt;br /&gt;
    inline-signing yes;   // DNSSEC automatique&lt;br /&gt;
    key-directory &amp;quot;/etc/bind/keys&amp;quot;; // répertoire des clefs, attention aux droits&lt;br /&gt;
    dnssec-policy &amp;quot;dnssecpolicy&amp;quot;;  // politique pour les clefs de chiffrement&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
zone &amp;quot;kasav.online&amp;quot; {&lt;br /&gt;
    type secondary;&lt;br /&gt;
    file &amp;quot;/etc/bind/backup/db.kasav.online&amp;quot;;&lt;br /&gt;
    primaries { 2001:660:4401:60a0:216:3eff:fe9a:ea1c; };&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
dnssec-policy &amp;quot;dnssecpolicy&amp;quot; {&lt;br /&gt;
  keys {&lt;br /&gt;
    ksk key-directory lifetime unlimited algorithm 13;&lt;br /&gt;
    zsk key-directory lifetime unlimited algorithm 13;&lt;br /&gt;
  };&lt;br /&gt;
  nsec3param;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/etc/bind# named-checkzone elvis21.tech /etc/bind/db.elvis21.tech&lt;br /&gt;
zone elvis21.tech/IN: loaded serial 3298267246&lt;br /&gt;
OK&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
openssl req -nodes -newkey rsa:2048 -sha256 -keyout elvis21.tech.key -out elvis21.csr&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
[[Fichier:ImageDns.png|vignette|994x994px|centré]]&lt;br /&gt;
&lt;br /&gt;
== '''Mise en place du serveur Apache (http et https)''' ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
apt update&lt;br /&gt;
apt install apache2&lt;br /&gt;
systemctl enable --now apache2&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
[[Fichier:Elvis21.tech-DNS.png|gauche|vignette|863x863px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Installation Fail2ban''' ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/# apt install fail2ban &lt;br /&gt;
Installing:                     &lt;br /&gt;
  fail2ban&lt;br /&gt;
&lt;br /&gt;
root@Elf:/# systemctl status fail2ban&lt;br /&gt;
fail2ban.service - Fail2Ban Service&lt;br /&gt;
    Loaded: loaded (/usr/lib/systemd/system/fail2ban.service, disabled)&lt;br /&gt;
    Active: active (running)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/# service fail2ban status                             &lt;br /&gt;
Status of Authentication failure monitor: fail2ban is running.&lt;br /&gt;
 root@Elf:/# fail2ban-client status&lt;br /&gt;
Status&lt;br /&gt;
|- Number of jail:	1&lt;br /&gt;
`- Jail list:	sshd&lt;br /&gt;
&lt;br /&gt;
root@Elf:/# fail2ban-client status sshd&lt;br /&gt;
Status for the jail: sshd&lt;br /&gt;
|- Filter&lt;br /&gt;
|  |- Currently failed:	0&lt;br /&gt;
|  |- Total failed:	0&lt;br /&gt;
|  `- File list:	/var/log/auth.log&lt;br /&gt;
`- Actions&lt;br /&gt;
   |- Currently banned:	0&lt;br /&gt;
   |- Total banned:	0&lt;br /&gt;
   `- Banned IP list:	&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Mise en place du serveur Apache (http et https) ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/# service apache2 status&lt;br /&gt;
apache2 is running.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''WIFI''' ==&lt;br /&gt;
Faire ip link&lt;br /&gt;
&lt;br /&gt;
ensuite sudo airodump-ng wlanx  -- Remplacer x par le numero du wlan present &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
BSSID              PWR  Beacons    #Data, #/s  CH   MB   ENC CIPHER  AUTH ESSID&lt;br /&gt;
04:DA:D2:9C:50:54  -62       23       11    0   4   54e. WEP  WEP         cracotte05                         &lt;br /&gt;
04:DA:D2:9C:50:5A  -61        2        1    0   4   54e. WEP  WEP         cracotte11    &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;sudo airodump-ng wlan1 --bssid 04:DA:D2:9C:50:5A  -c4 --write log_airdump&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
sudo airodump-ng wlan1 --write airdump --bssid 04:DA:D2:9C:50:5A -c4&lt;br /&gt;
17:31:10  Created capture file &amp;quot;airdump-04.cap&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
 CH  4 ][ Elapsed: 39 mins ][ 2026-02-10 18:11 ][ fixed channel wlan1: 13 &lt;br /&gt;
&lt;br /&gt;
 BSSID              PWR RXQ  Beacons    #Data, #/s  CH   MB   ENC CIPHER  AUTH ESSID&lt;br /&gt;
&lt;br /&gt;
 04:DA:D2:9C:50:5A  -58   3     9766    43771   21   4   54e. WEP  WEP         cracotte11                                                                                                   &lt;br /&gt;
&lt;br /&gt;
 BSSID              STATION            PWR    Rate    Lost   Frames  Notes  Probes&lt;br /&gt;
&lt;br /&gt;
 04:DA:D2:9C:50:5A  40:A5:EF:01:2E:FA  -77    0 -48e   127    46300                                                                                                                          &lt;br /&gt;
Quitting...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
aircrack-ng airdump-05.cap &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
           Aircrack-ng 1.7 &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                 [00:25:47] Tested 869 keys (got 34546 IVs)&lt;br /&gt;
                          Got 35002 out of 35000 IVsStarting PTW attack with 35002 KB    depth   byte(vote)&lt;br /&gt;
    0    0/  2   FF(50176) 1C(43520) E6(42752) 3F(42496) B6(42496) &lt;br /&gt;
    1    0/  6   FF(48128) AC(46336) 90(42752) 8E(42496) 04(42240) &lt;br /&gt;
    2    0/  1   BD(50688) 7F(43776) 75(42752) E6(41216) F2(41216) &lt;br /&gt;
    3    9/  3   CE(39936) 05(39680) 5C(39680) 9A(39168) F4(39168) &lt;br /&gt;
    4   41/  4   6C(37376) 1E(37120) 80(37120) 88(37120) A7(37120) &lt;br /&gt;
&lt;br /&gt;
             KEY FOUND! [ FF:FF:FF:FF:FA:BC:12:CB:AE:EE:EE:EE:EE ]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
ssh -oKexAlgorithms=+diffie-hellman-group14-sha1 -oHostKeyAlgorithms=+ssh-rsa -oCiphers=+aes128-cbc admin@172.27.0.1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
C9200-E304&amp;gt;en&lt;br /&gt;
Password: &lt;br /&gt;
C9200-E304#config t&lt;br /&gt;
Enter configuration commands, one per line.  End with CNTL/Z.&lt;br /&gt;
C9200-E304(config)#vlan 28&lt;br /&gt;
C9200-E304(config-vlan)#name PoolEvora&lt;br /&gt;
C9200-E304(config-vlan)#exit &lt;br /&gt;
C9200-E304(config)#exit&lt;br /&gt;
C9200-E304#write&lt;br /&gt;
Building configuration...&lt;br /&gt;
[OK]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
C9200-E304#en&lt;br /&gt;
C9200-E304#config t&lt;br /&gt;
Enter configuration commands, one per line.  End with CNTL/Z.&lt;br /&gt;
C9200-E304(config)#ip dhcp pool PoolEvora  &lt;br /&gt;
C9200-E304(dhcp-config)#network 10.60.11.0 255.255.255.0&lt;br /&gt;
C9200-E304(dhcp-config)#dns-server 193.48.57.172&lt;br /&gt;
C9200-E304(dhcp-config)#default-router 10.60.11.254&lt;br /&gt;
C9200-E304(dhcp-config)#exit&lt;br /&gt;
C9200-E304(config)#exit&lt;br /&gt;
C9200-E304#write&lt;br /&gt;
Building configuration...&lt;br /&gt;
[OK]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
ip dhcp pool PoolTom&lt;br /&gt;
 network 10.60.10.0 255.255.255.0&lt;br /&gt;
 dns-server 193.48.57.168 &lt;br /&gt;
 default-router 10.60.10.254 &lt;br /&gt;
!         &lt;br /&gt;
ip dhcp pool PoolEvora&lt;br /&gt;
 network 10.60.11.0 255.255.255.0&lt;br /&gt;
 dns-server 193.48.57.172 &lt;br /&gt;
 default-router 10.60.11.254 &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;VRRP&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
C9200-E304&amp;gt;en &lt;br /&gt;
Password: &lt;br /&gt;
C9200-E304#config t&lt;br /&gt;
Enter configuration commands, one per line.  End with CNTL/Z.&lt;br /&gt;
C9200-E304(config)#interface vlan 28&lt;br /&gt;
C9200-E304(config-if)#ip address 10.60.11.2 255.255.255.0&lt;br /&gt;
C9200-E304(config-if)#ipv6 address 2001:660:4401:60ab::2/64&lt;br /&gt;
C9200-E304(config-if)#vrrp 28 address-family ipv4        &lt;br /&gt;
C9200-E304(config-if-vrrp)#priority 110&lt;br /&gt;
C9200-E304(config-if-vrrp)#address 10.60.11.1 primary&lt;br /&gt;
C9200-E304(config-if-vrrp)#exit&lt;br /&gt;
C9200-E304(config-if)#exit&lt;br /&gt;
C9200-E304(config)#exit&lt;br /&gt;
C9200-E304#write&lt;br /&gt;
Building configuration...&lt;br /&gt;
[OK]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;WIFI e304&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
ssh admin@172.27.0.4 \&lt;br /&gt;
  -o KexAlgorithms=+diffie-hellman-group1-sha1 \&lt;br /&gt;
  -o HostKeyAlgorithms=+ssh-rsa \&lt;br /&gt;
  -o Ciphers=+aes128-cbc \&lt;br /&gt;
  -o MACs=+hmac-sha1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Vsouopme</name></author>
	</entry>
	<entry>
		<id>https://wiki-se.plil.fr/mediawiki/index.php?title=Atelier_SysRes_SE4_2025/2026_E11&amp;diff=12303</id>
		<title>Atelier SysRes SE4 2025/2026 E11</title>
		<link rel="alternate" type="text/html" href="https://wiki-se.plil.fr/mediawiki/index.php?title=Atelier_SysRes_SE4_2025/2026_E11&amp;diff=12303"/>
		<updated>2026-02-21T19:55:55Z</updated>

		<summary type="html">&lt;p&gt;Vsouopme : /* Installation des services */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Projet Virtualisation /Administration Systeme-Réseau - Machine SE4.Elf =&lt;br /&gt;
Dans le cadre de ce projet, nnous avons déployés une infrastructure composée de '''deux machines dédiées aux services''' et d’une '''machine mandataire''', le tout à l’aide de l'environnement  '''Xen.'''&lt;br /&gt;
&lt;br /&gt;
== Création des machines virtuelles ==&lt;br /&gt;
Les machines sont créées  sur le Dom0 '''Capbreton.plil.info''' en faisant un '''ssh root@capbreton.plil.info''' &lt;br /&gt;
&lt;br /&gt;
Sur la capbreton.plil.info, &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
xen create-image --hostname=SE4.Elf --dhcp --dir=/usr/local/xen --size=10G --dist=excalibur --memory=2G --bridge=Styx --force&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; '''Xen-create-image''' :  Commande permettant de créer une nouvelle machine virtuelle Xen&lt;br /&gt;
&lt;br /&gt;
'''--hostname=SE4.Elf :''' Pour le nom de la machine &lt;br /&gt;
&lt;br /&gt;
'''--size=10G''' : La taille du disque &lt;br /&gt;
&lt;br /&gt;
'''--bridge=Styx''' : Le nom du bridge &lt;br /&gt;
&lt;br /&gt;
Par la suite il faut creer un fichier dans le répertoire &amp;lt;code&amp;gt;/etc/network/interfaces.d&amp;lt;/code&amp;gt; du Dom0 pour créer notre pont. (NB: Il faut noter que cette etape on peut la faire avant la creation de notre VM&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
auto Styx&lt;br /&gt;
&lt;br /&gt;
iface Styx inet manual&lt;br /&gt;
   bridge_ports none&lt;br /&gt;
   up ip link set $IFACE up&lt;br /&gt;
   down ip link set $IFACE down&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;La commande '''xen list :''' Affiche les '''machines virtuelles''' (VM) qui sont actuellement gérées par Xen (Elle fait la liste des VM allumée).&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
root@capbreton:~# xen list&lt;br /&gt;
SE4.batman                                 322  2048     1     -b----      37.5&lt;br /&gt;
SE4.Moon                                   326  2048     1     -b----      41.1&lt;br /&gt;
SE4.C2                                     332  1024     1     -b----      18.1&lt;br /&gt;
SE4.Tension                                343  2048     1     -b----       7.8&lt;br /&gt;
SE4.CachyOS                                365  2048     1     -b----      10.2&lt;br /&gt;
SE4.RockStar                               367  2048     1     -b----       6.1&lt;br /&gt;
SE4.Kasav                                  368  2048     1     -b----       5.9&lt;br /&gt;
SE4.Elf                                    369  2048     1     -b----       5.6&lt;br /&gt;
SE4.catwoman                               370  2048     1     -b----       6.1&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;-La commande '''xen create /etc/xen/SE4.Elf.cfg''' permet d'allumer la Machine virtuellle.&lt;br /&gt;
&lt;br /&gt;
-La commande xen '''console SE4.Elf''' permet d'acceder  / de se connecter  a la VM.&lt;br /&gt;
&lt;br /&gt;
-La commande '''xen shutdown''' '''SE4.Elf''' permet d'eteindre la machine virtuelle.&lt;br /&gt;
&lt;br /&gt;
Lors de la tentative de connexion, il y'a une un probleme , pour y remedier,  '''Ctrl + AltGr + ] =&amp;gt; vi =&amp;gt; :q! =&amp;gt; reconnexion'''&lt;br /&gt;
&lt;br /&gt;
Pour voir le mot de passe de la VM, '''cat /var/log/xen-tools/SE4.Elf.log'''&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
Installation Summary&lt;br /&gt;
---------------------&lt;br /&gt;
Hostname        :  SE4.Elf&lt;br /&gt;
Distribution    :  excalibur&lt;br /&gt;
MAC Address     :  00:16:3E:83:A3:C7&lt;br /&gt;
IP Address(es)  :  dynamic&lt;br /&gt;
SSH Fingerprint :  SHA256:IrPhxhB4m1s+eaPaLynS6NlE/HfL78+y3ba3DPuHFQU (DSA)&lt;br /&gt;
SSH Fingerprint :  SHA256:RT+MZtlFxC7BrdYORzOcxDX+SKsJrLzOGWWngX2pKz4 (ECDSA)&lt;br /&gt;
SSH Fingerprint :  SHA256:aLYvYqUPX2Q/J5P0nTpdpMyrFD5xopRqkFKuYb7QUo4 (ED25519)&lt;br /&gt;
SSH Fingerprint :  SHA256:b0ddm9FYx4/losJU8/pE9MXx7102ygkAMjChOvPlNhE (RSA)&lt;br /&gt;
Root Password   :  X&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;- La commande '''vi /etc/hostname''' pour changer le nom de la VM&lt;br /&gt;
&lt;br /&gt;
== '''Configuration de la Machine de Services''' ==&lt;br /&gt;
Il faut creer deux partitions LVM de 10G pour votre machine virtuelle et modifiez le fichier de configuration de la machine virtuelle de services pour faire en sorte que les répertoires &amp;lt;code&amp;gt;/'''var'''&amp;lt;/code&amp;gt; et &amp;lt;code&amp;gt;'''/home'''&amp;lt;/code&amp;gt; de la machine virtuelle soient implantés sur ces partitions LVM&lt;br /&gt;
&lt;br /&gt;
=== '''Création des volumes logiques''' ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
lvcreate -L 10G -n lv_var_SE4Elf &lt;br /&gt;
lvcreate -L 10G -n lv_home_SE4Elf &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Faire '''lvdisplay''' pour faire la verification&lt;br /&gt;
&lt;br /&gt;
Depuis le serveur Capbreton, on a créé 2 fichiers de partitions dans &amp;lt;code&amp;gt;/dev/virtual&amp;lt;/code&amp;gt; pour chaque machines de services &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@capbreton:/dev/virtual# ls &lt;br /&gt;
SE4.Poseidon.home lv_home_SE4Elf lv_var_SE4Elf  SE4.Gaby.home SE4.Poseidon.var SE4.Gaby.var &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Apres nous avons modifié le fichier /etc/xen/SE4.Elf.cfg piur y ajouter deux répertoires&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
disk = [&lt;br /&gt;
  'file:/usr/local/xen/domains/SE4.Elf/disk.img,xvda2,w',&lt;br /&gt;
  'file:/usr/local/xen/domains/SE4.Elf/swap.img,xvda1,w',&lt;br /&gt;
  'phy:/dev/vg0/lv_var_SE4Elf,xvdb,w',&lt;br /&gt;
  'phy:/dev/vg0/lv_home_SE4Elf,xvdc,w'&lt;br /&gt;
]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== ''' Création et formatage des partitions''' ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
mkfs -t ext4 /dev/xvdb  # Formatage de la partition pour /var &lt;br /&gt;
mkfs -t ext4 /dev/xvdc  # Formatage de la partition pour /home&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== '''Préparer les partitions et déplacer les données :''' ===&lt;br /&gt;
&lt;br /&gt;
* '''Montage temporaire des partitions dans &amp;lt;code&amp;gt;/mnt&amp;lt;/code&amp;gt; :'''&lt;br /&gt;
&lt;br /&gt;
Pour pouvoir déplacer les données, nous avons du monter les nouvelles partitions LVM dans un répertoire temporaire &amp;lt;code&amp;gt;/mnt&amp;lt;/code&amp;gt;.  On a créé 2 partitions une pour &amp;lt;code&amp;gt;/var&amp;lt;/code&amp;gt; et une &amp;lt;code&amp;gt;/home&amp;lt;/code&amp;gt; sous les noms xvdb et xvdc dans  &amp;lt;code&amp;gt;/dev&amp;lt;/code&amp;gt;  ,que l'on monte avec  :&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
mount /dev/xvdb /mnt&lt;br /&gt;
mount /dev/xvdc /mnt&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* '''Déplacement des fichiers existants'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
mv /var/* /mnt # Déplacement des fichiers de /var vers la nouvelle partition&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== '''Démonter les partitions temporaires :''' ===&lt;br /&gt;
Avant de configurer les montages permanents, on démonte les partitions des répertoires temporaires (&amp;lt;code&amp;gt;/mnt&amp;lt;/code&amp;gt;)&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
umount /mnt # Démontage après transfert des données&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== '''Modification du fichier &amp;lt;code&amp;gt;/etc/fstab&amp;lt;/code&amp;gt; pour un montage automatique au démarrage :''' ===&lt;br /&gt;
On modifie le fichier &amp;lt;code&amp;gt;'''/etc/fstab'''&amp;lt;/code&amp;gt;, qui contient la liste des partitions.&lt;br /&gt;
&lt;br /&gt;
Ajout des nouvelles partitions LVM au fichier &amp;lt;code&amp;gt;/etc/fstab&amp;lt;/code&amp;gt; :&lt;br /&gt;
&lt;br /&gt;
* '''/dev/xvdb /var ext4 defaults 0 2'''&lt;br /&gt;
* '''/dev/xvdc /home ext4 defaults 0''' &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
# /etc/fstab: static file system information.&lt;br /&gt;
#&lt;br /&gt;
# &amp;lt;file system&amp;gt; &amp;lt;mount point&amp;gt; &amp;lt;type&amp;gt; &amp;lt;options&amp;gt; &amp;lt;dump&amp;gt; &amp;lt;pass&amp;gt;&lt;br /&gt;
proc             /proc           proc  defaults   0     0&lt;br /&gt;
devpts            /dev/pts       devpts rw,noexec,nosuid,gid=5,mode=620 0 0 /dev/xvda1 none swap sw 0 0&lt;br /&gt;
/dev/xvda1 none swap sw 0 0&lt;br /&gt;
/dev/xvda2 / ext4 noatime,nodiratime,errors=remount-ro 0 1&lt;br /&gt;
/dev/xvdb /var ext4 defaults 0 2 &lt;br /&gt;
/dev/xvdc /home ext4 defaults 0 2&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== '''Monter les partitions définies dans &amp;lt;code&amp;gt;fstab&amp;lt;/code&amp;gt; :''' ===&lt;br /&gt;
Pour monter toutes les partitions définies dans le fichier &amp;lt;code&amp;gt;/etc/fstab&amp;lt;/code&amp;gt;  :&lt;br /&gt;
 mount -a  # Remontage des partitions définies dans fstab&lt;br /&gt;
Cette commande monte toutes les partitions qui ne sont pas encore montées et qui sont définies dans &amp;lt;code&amp;gt;/etc/fstab&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
remet les données dans le fichier déplacer.&lt;br /&gt;
&lt;br /&gt;
Puis, pour appliquer les changement nous avons redémarré la VM en faisant le '''xen shutdown SE4.Elf''' ,  '''xen create /etc/xen/SE4.Elf.cfg''',  '''xen console SE4.Elf'''&lt;br /&gt;
&lt;br /&gt;
=== '''Vérification des partitions montées''' ===&lt;br /&gt;
Après avoir configuré le montage automatique et remonté les partitions, nous devons vérifier que les partitions sont correctement montées. Nous avons utilisé la commande '''&amp;lt;code&amp;gt;df -h&amp;lt;/code&amp;gt;''' pour afficher l'espace disque utilisé et disponible sur les partitions montées.&lt;br /&gt;
&lt;br /&gt;
Cela nous permet de confirmer que les partitions '''&amp;lt;code&amp;gt;/var&amp;lt;/code&amp;gt;''' et '''&amp;lt;code&amp;gt;/home&amp;lt;/code&amp;gt;''' sont correctement montées sur les répertoires associés et qu'il n'y a pas de problème d'espace disque.&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== &amp;lt;big&amp;gt;'''Configuration Reseau'''&amp;lt;/big&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
Tout d'abord nous avons modifier le fichier /etc/xen/SE4.Elf pour y ajouter une nouvelle interface sur le bridge de la promotion SE4.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Afin d’assurer une connectivité IPv6 stable et routée pour un accès direct à Internet, ainsi qu’une communication efficace avec la machine mandataire, nous avons modifié le fichier '''&amp;lt;code&amp;gt;/etc/network/interfaces&amp;lt;/code&amp;gt;'''. De plus, une adresse IPv4 fixe a été attribuée sur le réseau privé afin de garantir une interaction optimale entre les machines de services et leur machine mandataire.&lt;br /&gt;
&lt;br /&gt;
=== '''Mise a jour du fichier'''  /etc/network/interfaces ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
# Interface loopback&lt;br /&gt;
auto lo&lt;br /&gt;
iface lo inet loopback&lt;br /&gt;
&lt;br /&gt;
# Interface principale (eth0) - IPv4 statique + IPv6 automatique&lt;br /&gt;
auto eth0&lt;br /&gt;
iface eth0 inet static&lt;br /&gt;
    address 192.168.50.12&lt;br /&gt;
    netmask 255.255.255.254  # /24 &lt;br /&gt;
    gateway 192.168.50.1     # @mandataire&lt;br /&gt;
&lt;br /&gt;
iface eth0 inet6 auto  # Attribution automatique d'une IPv6&lt;br /&gt;
&lt;br /&gt;
# Interface secondaire (eth1) - IPv6 automatique uniquement&lt;br /&gt;
auto eth1&lt;br /&gt;
iface eth1 inet6 auto&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Il faut ensuite aciver l'interface en faisan'''t  ifdown eth0 &amp;amp;&amp;amp; ifup eth0''' et puis  '''ifdown eth1 &amp;amp;&amp;amp; ifup eth1''' aprés faire le '''systemctl restart networking''' pour mettre a jour les configurations du reseau.&lt;br /&gt;
&lt;br /&gt;
Les commandes : &lt;br /&gt;
&lt;br /&gt;
* ip route show : pour afficher la table de routage.&lt;br /&gt;
* ip -4 addr show : pour afficher l'adresse ipv4   #'''''192.168.50.12'''''&lt;br /&gt;
* ip -6 addr show : pour afficher l'adresse ipv6   #'''''2001:660:4401:60a0:216:3eff:fe83:a3c8'''''&lt;br /&gt;
&lt;br /&gt;
Grace a toute ses configurations, nous pouvons faire un ping sur la machine mandataire RockStar et sur la machine de service Kasav &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:~# ping 192.168.50.13        #ping sur la machine de service Kasav&lt;br /&gt;
PING 192.168.50.13 (192.168.50.13) 56(84) bytes of data.&lt;br /&gt;
64 bytes from 192.168.50.13: icmp_seq=1 ttl=64 time=0.132 ms&lt;br /&gt;
64 bytes from 192.168.50.13: icmp_seq=2 ttl=64 time=0.318 ms&lt;br /&gt;
64 bytes from 192.168.50.13: icmp_seq=3 ttl=64 time=0.369 ms&lt;br /&gt;
64 bytes from 192.168.50.13 icmp_seq=4 ttl=64 time=0.356 ms&lt;br /&gt;
--- 192.168.50.13 ping statistics ---&lt;br /&gt;
4 packets transmitted, 4 received, 0% packet loss, time 3077ms&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== '''Installation des services''' ===&lt;br /&gt;
Installation des services pour la suite du tp, les services a installé sont&lt;br /&gt;
&lt;br /&gt;
* '''Ssh''' : pour permettre l’accès à distance sécurisé à la machine pour l’administration et la maintenance&lt;br /&gt;
* '''Apache2 (Serveur web)''' : pour heberger des applications et sites web accessibles aux utilisateurs&lt;br /&gt;
* '''Bind9''' : pour assurer  la résolution de noms de domaine, essentielle pour le bon fonctionnement des services sur le réseau&lt;br /&gt;
&lt;br /&gt;
La commnde pour installer est '''apt install -y openssh-server apache2 bind9'''Après l'installation :&lt;br /&gt;
&lt;br /&gt;
Vérifiez si les services sont en cours d'exécution  '''systemctl status ssh apache2 bind9.'''&lt;br /&gt;
&lt;br /&gt;
Activez et démarrez les services si nécessaire '''systemctl enable --now ssh apache2 bind9'''&lt;br /&gt;
&lt;br /&gt;
== '''Configuration de la machine mandataire''' ==&lt;br /&gt;
&lt;br /&gt;
==  '''Serveur SSH''' ==&lt;br /&gt;
Notre machine virtuelle doit etre accessible par SSH, on autorise donc l'accès par l'utilisateur '''Root en modifiant le fichier de de configuration &amp;lt;code&amp;gt;/etc/ssh/sshd_config  :&amp;lt;/code&amp;gt;'''&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
PermitRootLogin yes&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Il faut ensuite redemarrer le serveur ssh en faisant :&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/etc/ssh# /etc/init.d/ssh restart&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Pour gérer la redirection du SSH, on doit configurer '''nftables''' sur nos machines de service en redirigeant les ports 2201 et 2202&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
nft add table ip nat&lt;br /&gt;
nft add chain ip nat PREROUTING { type nat hook prerouting priority 0 \; }&lt;br /&gt;
nft add rule ip nat PREROUTING tcp dport 2201 dnat to 192.168.50.12:22                 &lt;br /&gt;
nft add rule ip nat PREROUTING tcp dport 2202 dnat to 192.168.50.3:22              &lt;br /&gt;
nft add chain ip nat POSTROUTING { type nat hook postrouting priority 100 \; }&lt;br /&gt;
nft add rule ip nat POSTROUTING masquerade&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Maintenant, on peut se connecter en SSH sur les machiches virtuelles de services:  De Elf, on peut se connecter a Kasav&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/# ssh root@192.168.50.3&lt;br /&gt;
root@192.168.50.3's password: &lt;br /&gt;
Linux Kasav 4.19.0-26-amd64 #1 SMP Debian 4.19.304-1 (2024-01-09) x86_64&lt;br /&gt;
&lt;br /&gt;
The programs included with the Devuan GNU/Linux system are free software;&lt;br /&gt;
the exact distribution terms for each program are described in the&lt;br /&gt;
individual files in /usr/share/doc/*/copyright.&lt;br /&gt;
&lt;br /&gt;
Devuan GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent&lt;br /&gt;
permitted by applicable law.&lt;br /&gt;
Last login: Tue Feb  3 11:34:45 2026 from 192.168.50.12&lt;br /&gt;
root@Kasav:~# &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Serveur DNS''' ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
$TTL 86400&lt;br /&gt;
@ IN SOA ns1.elvis21.tech. admin.elvis21.tech. (&lt;br /&gt;
        3298267246      ;Version&lt;br /&gt;
        3600            ;Refresh&lt;br /&gt;
        1800            ;Retry&lt;br /&gt;
        604800          ;Expire&lt;br /&gt;
        86400 )         ;Minimum TTL&lt;br /&gt;
;&lt;br /&gt;
@  IN NS ns1.elvis21.tech.&lt;br /&gt;
&lt;br /&gt;
ns1 IN A 192.168.50.12&lt;br /&gt;
ns2 IN A 192.168.50.1&lt;br /&gt;
 IN A 192.168.50.12&lt;br /&gt;
      IN AAAA 2001:660:4401:60a0:216:3eff:fe83:a3c8&lt;br /&gt;
www IN A 192.168.50.12&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/etc/bind# cat named.conf.local &lt;br /&gt;
zone &amp;quot;elvis21.tech&amp;quot; {&lt;br /&gt;
    type primary;&lt;br /&gt;
    file &amp;quot;/etc/bind/zones/db.elvis21.tech&amp;quot;;&lt;br /&gt;
    allow-transfer {&lt;br /&gt;
      2001:660:4401:60a0:216:3eff:fe70:7f1c;&lt;br /&gt;
      2001:660:4401:60a0:216:3eff:fe9a:ea1c;&lt;br /&gt;
      };&lt;br /&gt;
    also-notify { 2001:660:4401:60a0:216:3eff:fe70:7f1c; };&lt;br /&gt;
    inline-signing yes;   // DNSSEC automatique&lt;br /&gt;
    key-directory &amp;quot;/etc/bind/keys&amp;quot;; // répertoire des clefs, attention aux droits&lt;br /&gt;
    dnssec-policy &amp;quot;dnssecpolicy&amp;quot;;  // politique pour les clefs de chiffrement&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
zone &amp;quot;kasav.online&amp;quot; {&lt;br /&gt;
    type secondary;&lt;br /&gt;
    file &amp;quot;/etc/bind/backup/db.kasav.online&amp;quot;;&lt;br /&gt;
    primaries { 2001:660:4401:60a0:216:3eff:fe9a:ea1c; };&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
dnssec-policy &amp;quot;dnssecpolicy&amp;quot; {&lt;br /&gt;
  keys {&lt;br /&gt;
    ksk key-directory lifetime unlimited algorithm 13;&lt;br /&gt;
    zsk key-directory lifetime unlimited algorithm 13;&lt;br /&gt;
  };&lt;br /&gt;
  nsec3param;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/etc/bind# named-checkzone elvis21.tech /etc/bind/db.elvis21.tech&lt;br /&gt;
zone elvis21.tech/IN: loaded serial 3298267246&lt;br /&gt;
OK&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
openssl req -nodes -newkey rsa:2048 -sha256 -keyout elvis21.tech.key -out elvis21.csr&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
[[Fichier:ImageDns.png|vignette|994x994px|centré]]&lt;br /&gt;
&lt;br /&gt;
== '''Mise en place du serveur Apache (http et https)''' ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
apt update&lt;br /&gt;
apt install apache2&lt;br /&gt;
systemctl enable --now apache2&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
[[Fichier:Elvis21.tech-DNS.png|gauche|vignette|863x863px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Installation Fail2ban''' ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/# apt install fail2ban &lt;br /&gt;
Installing:                     &lt;br /&gt;
  fail2ban&lt;br /&gt;
&lt;br /&gt;
root@Elf:/# systemctl status fail2ban&lt;br /&gt;
fail2ban.service - Fail2Ban Service&lt;br /&gt;
    Loaded: loaded (/usr/lib/systemd/system/fail2ban.service, disabled)&lt;br /&gt;
    Active: active (running)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/# service fail2ban status                             &lt;br /&gt;
Status of Authentication failure monitor: fail2ban is running.&lt;br /&gt;
 root@Elf:/# fail2ban-client status&lt;br /&gt;
Status&lt;br /&gt;
|- Number of jail:	1&lt;br /&gt;
`- Jail list:	sshd&lt;br /&gt;
&lt;br /&gt;
root@Elf:/# fail2ban-client status sshd&lt;br /&gt;
Status for the jail: sshd&lt;br /&gt;
|- Filter&lt;br /&gt;
|  |- Currently failed:	0&lt;br /&gt;
|  |- Total failed:	0&lt;br /&gt;
|  `- File list:	/var/log/auth.log&lt;br /&gt;
`- Actions&lt;br /&gt;
   |- Currently banned:	0&lt;br /&gt;
   |- Total banned:	0&lt;br /&gt;
   `- Banned IP list:	&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Mise en place du serveur Apache (http et https) ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/# service apache2 status&lt;br /&gt;
apache2 is running.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''WIFI''' ==&lt;br /&gt;
Faire ip link&lt;br /&gt;
&lt;br /&gt;
ensuite sudo airodump-ng wlanx  -- Remplacer x par le numero du wlan present &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
BSSID              PWR  Beacons    #Data, #/s  CH   MB   ENC CIPHER  AUTH ESSID&lt;br /&gt;
04:DA:D2:9C:50:54  -62       23       11    0   4   54e. WEP  WEP         cracotte05                         &lt;br /&gt;
04:DA:D2:9C:50:5A  -61        2        1    0   4   54e. WEP  WEP         cracotte11    &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;sudo airodump-ng wlan1 --bssid 04:DA:D2:9C:50:5A  -c4 --write log_airdump&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
sudo airodump-ng wlan1 --write airdump --bssid 04:DA:D2:9C:50:5A -c4&lt;br /&gt;
17:31:10  Created capture file &amp;quot;airdump-04.cap&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
 CH  4 ][ Elapsed: 39 mins ][ 2026-02-10 18:11 ][ fixed channel wlan1: 13 &lt;br /&gt;
&lt;br /&gt;
 BSSID              PWR RXQ  Beacons    #Data, #/s  CH   MB   ENC CIPHER  AUTH ESSID&lt;br /&gt;
&lt;br /&gt;
 04:DA:D2:9C:50:5A  -58   3     9766    43771   21   4   54e. WEP  WEP         cracotte11                                                                                                   &lt;br /&gt;
&lt;br /&gt;
 BSSID              STATION            PWR    Rate    Lost   Frames  Notes  Probes&lt;br /&gt;
&lt;br /&gt;
 04:DA:D2:9C:50:5A  40:A5:EF:01:2E:FA  -77    0 -48e   127    46300                                                                                                                          &lt;br /&gt;
Quitting...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
aircrack-ng airdump-05.cap &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
           Aircrack-ng 1.7 &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                 [00:25:47] Tested 869 keys (got 34546 IVs)&lt;br /&gt;
                          Got 35002 out of 35000 IVsStarting PTW attack with 35002 KB    depth   byte(vote)&lt;br /&gt;
    0    0/  2   FF(50176) 1C(43520) E6(42752) 3F(42496) B6(42496) &lt;br /&gt;
    1    0/  6   FF(48128) AC(46336) 90(42752) 8E(42496) 04(42240) &lt;br /&gt;
    2    0/  1   BD(50688) 7F(43776) 75(42752) E6(41216) F2(41216) &lt;br /&gt;
    3    9/  3   CE(39936) 05(39680) 5C(39680) 9A(39168) F4(39168) &lt;br /&gt;
    4   41/  4   6C(37376) 1E(37120) 80(37120) 88(37120) A7(37120) &lt;br /&gt;
&lt;br /&gt;
             KEY FOUND! [ FF:FF:FF:FF:FA:BC:12:CB:AE:EE:EE:EE:EE ]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
ssh -oKexAlgorithms=+diffie-hellman-group14-sha1 -oHostKeyAlgorithms=+ssh-rsa -oCiphers=+aes128-cbc admin@172.27.0.1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
C9200-E304&amp;gt;en&lt;br /&gt;
Password: &lt;br /&gt;
C9200-E304#config t&lt;br /&gt;
Enter configuration commands, one per line.  End with CNTL/Z.&lt;br /&gt;
C9200-E304(config)#vlan 28&lt;br /&gt;
C9200-E304(config-vlan)#name PoolEvora&lt;br /&gt;
C9200-E304(config-vlan)#exit &lt;br /&gt;
C9200-E304(config)#exit&lt;br /&gt;
C9200-E304#write&lt;br /&gt;
Building configuration...&lt;br /&gt;
[OK]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
C9200-E304#en&lt;br /&gt;
C9200-E304#config t&lt;br /&gt;
Enter configuration commands, one per line.  End with CNTL/Z.&lt;br /&gt;
C9200-E304(config)#ip dhcp pool PoolEvora  &lt;br /&gt;
C9200-E304(dhcp-config)#network 10.60.11.0 255.255.255.0&lt;br /&gt;
C9200-E304(dhcp-config)#dns-server 193.48.57.172&lt;br /&gt;
C9200-E304(dhcp-config)#default-router 10.60.11.254&lt;br /&gt;
C9200-E304(dhcp-config)#exit&lt;br /&gt;
C9200-E304(config)#exit&lt;br /&gt;
C9200-E304#write&lt;br /&gt;
Building configuration...&lt;br /&gt;
[OK]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
ip dhcp pool PoolTom&lt;br /&gt;
 network 10.60.10.0 255.255.255.0&lt;br /&gt;
 dns-server 193.48.57.168 &lt;br /&gt;
 default-router 10.60.10.254 &lt;br /&gt;
!         &lt;br /&gt;
ip dhcp pool PoolEvora&lt;br /&gt;
 network 10.60.11.0 255.255.255.0&lt;br /&gt;
 dns-server 193.48.57.172 &lt;br /&gt;
 default-router 10.60.11.254 &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;VRRP&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
C9200-E304&amp;gt;en &lt;br /&gt;
Password: &lt;br /&gt;
C9200-E304#config t&lt;br /&gt;
Enter configuration commands, one per line.  End with CNTL/Z.&lt;br /&gt;
C9200-E304(config)#interface vlan 28&lt;br /&gt;
C9200-E304(config-if)#ip address 10.60.11.2 255.255.255.0&lt;br /&gt;
C9200-E304(config-if)#ipv6 address 2001:660:4401:60ab::2/64&lt;br /&gt;
C9200-E304(config-if)#vrrp 28 address-family ipv4        &lt;br /&gt;
C9200-E304(config-if-vrrp)#priority 110&lt;br /&gt;
C9200-E304(config-if-vrrp)#address 10.60.11.1 primary&lt;br /&gt;
C9200-E304(config-if-vrrp)#exit&lt;br /&gt;
C9200-E304(config-if)#exit&lt;br /&gt;
C9200-E304(config)#exit&lt;br /&gt;
C9200-E304#write&lt;br /&gt;
Building configuration...&lt;br /&gt;
[OK]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;WIFI e304&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
ssh admin@172.27.0.4 \&lt;br /&gt;
  -o KexAlgorithms=+diffie-hellman-group1-sha1 \&lt;br /&gt;
  -o HostKeyAlgorithms=+ssh-rsa \&lt;br /&gt;
  -o Ciphers=+aes128-cbc \&lt;br /&gt;
  -o MACs=+hmac-sha1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Vsouopme</name></author>
	</entry>
	<entry>
		<id>https://wiki-se.plil.fr/mediawiki/index.php?title=Atelier_SysRes_SE4_2025/2026_E11&amp;diff=12302</id>
		<title>Atelier SysRes SE4 2025/2026 E11</title>
		<link rel="alternate" type="text/html" href="https://wiki-se.plil.fr/mediawiki/index.php?title=Atelier_SysRes_SE4_2025/2026_E11&amp;diff=12302"/>
		<updated>2026-02-21T19:48:09Z</updated>

		<summary type="html">&lt;p&gt;Vsouopme : /* Serveur SSH */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Projet Virtualisation /Administration Systeme-Réseau - Machine SE4.Elf =&lt;br /&gt;
Dans le cadre de ce projet, nnous avons déployés une infrastructure composée de '''deux machines dédiées aux services''' et d’une '''machine mandataire''', le tout à l’aide de l'environnement  '''Xen.'''&lt;br /&gt;
&lt;br /&gt;
== Création des machines virtuelles ==&lt;br /&gt;
Les machines sont créées  sur le Dom0 '''Capbreton.plil.info''' en faisant un '''ssh root@capbreton.plil.info''' &lt;br /&gt;
&lt;br /&gt;
Sur la capbreton.plil.info, &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
xen create-image --hostname=SE4.Elf --dhcp --dir=/usr/local/xen --size=10G --dist=excalibur --memory=2G --bridge=Styx --force&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; '''Xen-create-image''' :  Commande permettant de créer une nouvelle machine virtuelle Xen&lt;br /&gt;
&lt;br /&gt;
'''--hostname=SE4.Elf :''' Pour le nom de la machine &lt;br /&gt;
&lt;br /&gt;
'''--size=10G''' : La taille du disque &lt;br /&gt;
&lt;br /&gt;
'''--bridge=Styx''' : Le nom du bridge &lt;br /&gt;
&lt;br /&gt;
Par la suite il faut creer un fichier dans le répertoire &amp;lt;code&amp;gt;/etc/network/interfaces.d&amp;lt;/code&amp;gt; du Dom0 pour créer notre pont. (NB: Il faut noter que cette etape on peut la faire avant la creation de notre VM&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
auto Styx&lt;br /&gt;
&lt;br /&gt;
iface Styx inet manual&lt;br /&gt;
   bridge_ports none&lt;br /&gt;
   up ip link set $IFACE up&lt;br /&gt;
   down ip link set $IFACE down&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;La commande '''xen list :''' Affiche les '''machines virtuelles''' (VM) qui sont actuellement gérées par Xen (Elle fait la liste des VM allumée).&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
root@capbreton:~# xen list&lt;br /&gt;
SE4.batman                                 322  2048     1     -b----      37.5&lt;br /&gt;
SE4.Moon                                   326  2048     1     -b----      41.1&lt;br /&gt;
SE4.C2                                     332  1024     1     -b----      18.1&lt;br /&gt;
SE4.Tension                                343  2048     1     -b----       7.8&lt;br /&gt;
SE4.CachyOS                                365  2048     1     -b----      10.2&lt;br /&gt;
SE4.RockStar                               367  2048     1     -b----       6.1&lt;br /&gt;
SE4.Kasav                                  368  2048     1     -b----       5.9&lt;br /&gt;
SE4.Elf                                    369  2048     1     -b----       5.6&lt;br /&gt;
SE4.catwoman                               370  2048     1     -b----       6.1&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;-La commande '''xen create /etc/xen/SE4.Elf.cfg''' permet d'allumer la Machine virtuellle.&lt;br /&gt;
&lt;br /&gt;
-La commande xen '''console SE4.Elf''' permet d'acceder  / de se connecter  a la VM.&lt;br /&gt;
&lt;br /&gt;
-La commande '''xen shutdown''' '''SE4.Elf''' permet d'eteindre la machine virtuelle.&lt;br /&gt;
&lt;br /&gt;
Lors de la tentative de connexion, il y'a une un probleme , pour y remedier,  '''Ctrl + AltGr + ] =&amp;gt; vi =&amp;gt; :q! =&amp;gt; reconnexion'''&lt;br /&gt;
&lt;br /&gt;
Pour voir le mot de passe de la VM, '''cat /var/log/xen-tools/SE4.Elf.log'''&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
Installation Summary&lt;br /&gt;
---------------------&lt;br /&gt;
Hostname        :  SE4.Elf&lt;br /&gt;
Distribution    :  excalibur&lt;br /&gt;
MAC Address     :  00:16:3E:83:A3:C7&lt;br /&gt;
IP Address(es)  :  dynamic&lt;br /&gt;
SSH Fingerprint :  SHA256:IrPhxhB4m1s+eaPaLynS6NlE/HfL78+y3ba3DPuHFQU (DSA)&lt;br /&gt;
SSH Fingerprint :  SHA256:RT+MZtlFxC7BrdYORzOcxDX+SKsJrLzOGWWngX2pKz4 (ECDSA)&lt;br /&gt;
SSH Fingerprint :  SHA256:aLYvYqUPX2Q/J5P0nTpdpMyrFD5xopRqkFKuYb7QUo4 (ED25519)&lt;br /&gt;
SSH Fingerprint :  SHA256:b0ddm9FYx4/losJU8/pE9MXx7102ygkAMjChOvPlNhE (RSA)&lt;br /&gt;
Root Password   :  X&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;- La commande '''vi /etc/hostname''' pour changer le nom de la VM&lt;br /&gt;
&lt;br /&gt;
== '''Configuration de la Machine de Services''' ==&lt;br /&gt;
Il faut creer deux partitions LVM de 10G pour votre machine virtuelle et modifiez le fichier de configuration de la machine virtuelle de services pour faire en sorte que les répertoires &amp;lt;code&amp;gt;/'''var'''&amp;lt;/code&amp;gt; et &amp;lt;code&amp;gt;'''/home'''&amp;lt;/code&amp;gt; de la machine virtuelle soient implantés sur ces partitions LVM&lt;br /&gt;
&lt;br /&gt;
=== '''Création des volumes logiques''' ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
lvcreate -L 10G -n lv_var_SE4Elf &lt;br /&gt;
lvcreate -L 10G -n lv_home_SE4Elf &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Faire '''lvdisplay''' pour faire la verification&lt;br /&gt;
&lt;br /&gt;
Depuis le serveur Capbreton, on a créé 2 fichiers de partitions dans &amp;lt;code&amp;gt;/dev/virtual&amp;lt;/code&amp;gt; pour chaque machines de services &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@capbreton:/dev/virtual# ls &lt;br /&gt;
SE4.Poseidon.home lv_home_SE4Elf lv_var_SE4Elf  SE4.Gaby.home SE4.Poseidon.var SE4.Gaby.var &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Apres nous avons modifié le fichier /etc/xen/SE4.Elf.cfg piur y ajouter deux répertoires&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
disk = [&lt;br /&gt;
  'file:/usr/local/xen/domains/SE4.Elf/disk.img,xvda2,w',&lt;br /&gt;
  'file:/usr/local/xen/domains/SE4.Elf/swap.img,xvda1,w',&lt;br /&gt;
  'phy:/dev/vg0/lv_var_SE4Elf,xvdb,w',&lt;br /&gt;
  'phy:/dev/vg0/lv_home_SE4Elf,xvdc,w'&lt;br /&gt;
]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== ''' Création et formatage des partitions''' ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
mkfs -t ext4 /dev/xvdb  # Formatage de la partition pour /var &lt;br /&gt;
mkfs -t ext4 /dev/xvdc  # Formatage de la partition pour /home&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== '''Préparer les partitions et déplacer les données :''' ===&lt;br /&gt;
&lt;br /&gt;
* '''Montage temporaire des partitions dans &amp;lt;code&amp;gt;/mnt&amp;lt;/code&amp;gt; :'''&lt;br /&gt;
&lt;br /&gt;
Pour pouvoir déplacer les données, nous avons du monter les nouvelles partitions LVM dans un répertoire temporaire &amp;lt;code&amp;gt;/mnt&amp;lt;/code&amp;gt;.  On a créé 2 partitions une pour &amp;lt;code&amp;gt;/var&amp;lt;/code&amp;gt; et une &amp;lt;code&amp;gt;/home&amp;lt;/code&amp;gt; sous les noms xvdb et xvdc dans  &amp;lt;code&amp;gt;/dev&amp;lt;/code&amp;gt;  ,que l'on monte avec  :&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
mount /dev/xvdb /mnt&lt;br /&gt;
mount /dev/xvdc /mnt&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* '''Déplacement des fichiers existants'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
mv /var/* /mnt # Déplacement des fichiers de /var vers la nouvelle partition&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== '''Démonter les partitions temporaires :''' ===&lt;br /&gt;
Avant de configurer les montages permanents, on démonte les partitions des répertoires temporaires (&amp;lt;code&amp;gt;/mnt&amp;lt;/code&amp;gt;)&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
umount /mnt # Démontage après transfert des données&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== '''Modification du fichier &amp;lt;code&amp;gt;/etc/fstab&amp;lt;/code&amp;gt; pour un montage automatique au démarrage :''' ===&lt;br /&gt;
On modifie le fichier &amp;lt;code&amp;gt;'''/etc/fstab'''&amp;lt;/code&amp;gt;, qui contient la liste des partitions.&lt;br /&gt;
&lt;br /&gt;
Ajout des nouvelles partitions LVM au fichier &amp;lt;code&amp;gt;/etc/fstab&amp;lt;/code&amp;gt; :&lt;br /&gt;
&lt;br /&gt;
* '''/dev/xvdb /var ext4 defaults 0 2'''&lt;br /&gt;
* '''/dev/xvdc /home ext4 defaults 0''' &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
# /etc/fstab: static file system information.&lt;br /&gt;
#&lt;br /&gt;
# &amp;lt;file system&amp;gt; &amp;lt;mount point&amp;gt; &amp;lt;type&amp;gt; &amp;lt;options&amp;gt; &amp;lt;dump&amp;gt; &amp;lt;pass&amp;gt;&lt;br /&gt;
proc             /proc           proc  defaults   0     0&lt;br /&gt;
devpts            /dev/pts       devpts rw,noexec,nosuid,gid=5,mode=620 0 0 /dev/xvda1 none swap sw 0 0&lt;br /&gt;
/dev/xvda1 none swap sw 0 0&lt;br /&gt;
/dev/xvda2 / ext4 noatime,nodiratime,errors=remount-ro 0 1&lt;br /&gt;
/dev/xvdb /var ext4 defaults 0 2 &lt;br /&gt;
/dev/xvdc /home ext4 defaults 0 2&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== '''Monter les partitions définies dans &amp;lt;code&amp;gt;fstab&amp;lt;/code&amp;gt; :''' ===&lt;br /&gt;
Pour monter toutes les partitions définies dans le fichier &amp;lt;code&amp;gt;/etc/fstab&amp;lt;/code&amp;gt;  :&lt;br /&gt;
 mount -a  # Remontage des partitions définies dans fstab&lt;br /&gt;
Cette commande monte toutes les partitions qui ne sont pas encore montées et qui sont définies dans &amp;lt;code&amp;gt;/etc/fstab&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
remet les données dans le fichier déplacer.&lt;br /&gt;
&lt;br /&gt;
Puis, pour appliquer les changement nous avons redémarré la VM en faisant le '''xen shutdown SE4.Elf''' ,  '''xen create /etc/xen/SE4.Elf.cfg''',  '''xen console SE4.Elf'''&lt;br /&gt;
&lt;br /&gt;
=== '''Vérification des partitions montées''' ===&lt;br /&gt;
Après avoir configuré le montage automatique et remonté les partitions, nous devons vérifier que les partitions sont correctement montées. Nous avons utilisé la commande '''&amp;lt;code&amp;gt;df -h&amp;lt;/code&amp;gt;''' pour afficher l'espace disque utilisé et disponible sur les partitions montées.&lt;br /&gt;
&lt;br /&gt;
Cela nous permet de confirmer que les partitions '''&amp;lt;code&amp;gt;/var&amp;lt;/code&amp;gt;''' et '''&amp;lt;code&amp;gt;/home&amp;lt;/code&amp;gt;''' sont correctement montées sur les répertoires associés et qu'il n'y a pas de problème d'espace disque.&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== &amp;lt;big&amp;gt;'''Configuration Reseau'''&amp;lt;/big&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
Tout d'abord nous avons modifier le fichier /etc/xen/SE4.Elf pour y ajouter une nouvelle interface sur le bridge de la promotion SE4.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Afin d’assurer une connectivité IPv6 stable et routée pour un accès direct à Internet, ainsi qu’une communication efficace avec la machine mandataire, nous avons modifié le fichier '''&amp;lt;code&amp;gt;/etc/network/interfaces&amp;lt;/code&amp;gt;'''. De plus, une adresse IPv4 fixe a été attribuée sur le réseau privé afin de garantir une interaction optimale entre les machines de services et leur machine mandataire.&lt;br /&gt;
&lt;br /&gt;
=== '''Mise a jour du fichier'''  /etc/network/interfaces ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
# Interface loopback&lt;br /&gt;
auto lo&lt;br /&gt;
iface lo inet loopback&lt;br /&gt;
&lt;br /&gt;
# Interface principale (eth0) - IPv4 statique + IPv6 automatique&lt;br /&gt;
auto eth0&lt;br /&gt;
iface eth0 inet static&lt;br /&gt;
    address 192.168.50.12&lt;br /&gt;
    netmask 255.255.255.254  # /24 &lt;br /&gt;
    gateway 192.168.50.1     # @mandataire&lt;br /&gt;
&lt;br /&gt;
iface eth0 inet6 auto  # Attribution automatique d'une IPv6&lt;br /&gt;
&lt;br /&gt;
# Interface secondaire (eth1) - IPv6 automatique uniquement&lt;br /&gt;
auto eth1&lt;br /&gt;
iface eth1 inet6 auto&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Il faut ensuite aciver l'interface en faisan'''t  ifdown eth0 &amp;amp;&amp;amp; ifup eth0''' et puis  '''ifdown eth1 &amp;amp;&amp;amp; ifup eth1''' aprés faire le '''systemctl restart networking''' pour mettre a jour les configurations du reseau.&lt;br /&gt;
&lt;br /&gt;
Les commandes : &lt;br /&gt;
&lt;br /&gt;
* ip route show : pour afficher la table de routage.&lt;br /&gt;
* ip -4 addr show : pour afficher l'adresse ipv4   #'''''192.168.50.12'''''&lt;br /&gt;
* ip -6 addr show : pour afficher l'adresse ipv6   #'''''2001:660:4401:60a0:216:3eff:fe83:a3c8'''''&lt;br /&gt;
&lt;br /&gt;
Grace a toute ses configurations, nous pouvons faire un ping sur la machine mandataire RockStar et sur la machine de service Kasav &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:~# ping 192.168.50.13        #ping sur la machine de service Kasav&lt;br /&gt;
PING 192.168.50.13 (192.168.50.13) 56(84) bytes of data.&lt;br /&gt;
64 bytes from 192.168.50.13: icmp_seq=1 ttl=64 time=0.132 ms&lt;br /&gt;
64 bytes from 192.168.50.13: icmp_seq=2 ttl=64 time=0.318 ms&lt;br /&gt;
64 bytes from 192.168.50.13: icmp_seq=3 ttl=64 time=0.369 ms&lt;br /&gt;
64 bytes from 192.168.50.13 icmp_seq=4 ttl=64 time=0.356 ms&lt;br /&gt;
--- 192.168.50.13 ping statistics ---&lt;br /&gt;
4 packets transmitted, 4 received, 0% packet loss, time 3077ms&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== '''Installation des services''' ===&lt;br /&gt;
Installation des services pour la suite du tp, les services a installé sont&lt;br /&gt;
&lt;br /&gt;
* '''Ssh''' : pour permettre l’accès à distance sécurisé à la machine pour l’administration et la maintenance&lt;br /&gt;
* '''Apache2 (Serveur web)''' : pour heberger des applications et sites web accessibles aux utilisateurs&lt;br /&gt;
* '''Bind9''' : pour assurer  la résolution de noms de domaine, essentielle pour le bon fonctionnement des services sur le réseau&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==  '''Serveur SSH''' ==&lt;br /&gt;
Notre machine virtuelle doit etre accessible par SSH, on autorise donc l'accès par l'utilisateur '''Root en modifiant le fichier de de configuration &amp;lt;code&amp;gt;/etc/ssh/sshd_config  :&amp;lt;/code&amp;gt;'''&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
PermitRootLogin yes&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Il faut ensuite redemarrer le serveur ssh en faisant :&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/etc/ssh# /etc/init.d/ssh restart&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Pour gérer la redirection du SSH, on doit configurer '''nftables''' sur nos machines de service en redirigeant les ports 2201 et 2202&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
nft add table ip nat&lt;br /&gt;
nft add chain ip nat PREROUTING { type nat hook prerouting priority 0 \; }&lt;br /&gt;
nft add rule ip nat PREROUTING tcp dport 2201 dnat to 192.168.50.12:22                 &lt;br /&gt;
nft add rule ip nat PREROUTING tcp dport 2202 dnat to 192.168.50.3:22              &lt;br /&gt;
nft add chain ip nat POSTROUTING { type nat hook postrouting priority 100 \; }&lt;br /&gt;
nft add rule ip nat POSTROUTING masquerade&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Maintenant, on peut se connecter en SSH sur les machiches virtuelles de services:  De Elf, on peut se connecter a Kasav&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/# ssh root@192.168.50.3&lt;br /&gt;
root@192.168.50.3's password: &lt;br /&gt;
Linux Kasav 4.19.0-26-amd64 #1 SMP Debian 4.19.304-1 (2024-01-09) x86_64&lt;br /&gt;
&lt;br /&gt;
The programs included with the Devuan GNU/Linux system are free software;&lt;br /&gt;
the exact distribution terms for each program are described in the&lt;br /&gt;
individual files in /usr/share/doc/*/copyright.&lt;br /&gt;
&lt;br /&gt;
Devuan GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent&lt;br /&gt;
permitted by applicable law.&lt;br /&gt;
Last login: Tue Feb  3 11:34:45 2026 from 192.168.50.12&lt;br /&gt;
root@Kasav:~# &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Serveur DNS''' ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
$TTL 86400&lt;br /&gt;
@ IN SOA ns1.elvis21.tech. admin.elvis21.tech. (&lt;br /&gt;
        3298267246      ;Version&lt;br /&gt;
        3600            ;Refresh&lt;br /&gt;
        1800            ;Retry&lt;br /&gt;
        604800          ;Expire&lt;br /&gt;
        86400 )         ;Minimum TTL&lt;br /&gt;
;&lt;br /&gt;
@  IN NS ns1.elvis21.tech.&lt;br /&gt;
&lt;br /&gt;
ns1 IN A 192.168.50.12&lt;br /&gt;
ns2 IN A 192.168.50.1&lt;br /&gt;
 IN A 192.168.50.12&lt;br /&gt;
      IN AAAA 2001:660:4401:60a0:216:3eff:fe83:a3c8&lt;br /&gt;
www IN A 192.168.50.12&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/etc/bind# cat named.conf.local &lt;br /&gt;
zone &amp;quot;elvis21.tech&amp;quot; {&lt;br /&gt;
    type primary;&lt;br /&gt;
    file &amp;quot;/etc/bind/zones/db.elvis21.tech&amp;quot;;&lt;br /&gt;
    allow-transfer {&lt;br /&gt;
      2001:660:4401:60a0:216:3eff:fe70:7f1c;&lt;br /&gt;
      2001:660:4401:60a0:216:3eff:fe9a:ea1c;&lt;br /&gt;
      };&lt;br /&gt;
    also-notify { 2001:660:4401:60a0:216:3eff:fe70:7f1c; };&lt;br /&gt;
    inline-signing yes;   // DNSSEC automatique&lt;br /&gt;
    key-directory &amp;quot;/etc/bind/keys&amp;quot;; // répertoire des clefs, attention aux droits&lt;br /&gt;
    dnssec-policy &amp;quot;dnssecpolicy&amp;quot;;  // politique pour les clefs de chiffrement&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
zone &amp;quot;kasav.online&amp;quot; {&lt;br /&gt;
    type secondary;&lt;br /&gt;
    file &amp;quot;/etc/bind/backup/db.kasav.online&amp;quot;;&lt;br /&gt;
    primaries { 2001:660:4401:60a0:216:3eff:fe9a:ea1c; };&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
dnssec-policy &amp;quot;dnssecpolicy&amp;quot; {&lt;br /&gt;
  keys {&lt;br /&gt;
    ksk key-directory lifetime unlimited algorithm 13;&lt;br /&gt;
    zsk key-directory lifetime unlimited algorithm 13;&lt;br /&gt;
  };&lt;br /&gt;
  nsec3param;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/etc/bind# named-checkzone elvis21.tech /etc/bind/db.elvis21.tech&lt;br /&gt;
zone elvis21.tech/IN: loaded serial 3298267246&lt;br /&gt;
OK&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
openssl req -nodes -newkey rsa:2048 -sha256 -keyout elvis21.tech.key -out elvis21.csr&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
[[Fichier:ImageDns.png|vignette|994x994px|centré]]&lt;br /&gt;
&lt;br /&gt;
== '''Mise en place du serveur Apache (http et https)''' ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
apt update&lt;br /&gt;
apt install apache2&lt;br /&gt;
systemctl enable --now apache2&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
[[Fichier:Elvis21.tech-DNS.png|gauche|vignette|863x863px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Installation Fail2ban''' ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/# apt install fail2ban &lt;br /&gt;
Installing:                     &lt;br /&gt;
  fail2ban&lt;br /&gt;
&lt;br /&gt;
root@Elf:/# systemctl status fail2ban&lt;br /&gt;
fail2ban.service - Fail2Ban Service&lt;br /&gt;
    Loaded: loaded (/usr/lib/systemd/system/fail2ban.service, disabled)&lt;br /&gt;
    Active: active (running)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/# service fail2ban status                             &lt;br /&gt;
Status of Authentication failure monitor: fail2ban is running.&lt;br /&gt;
 root@Elf:/# fail2ban-client status&lt;br /&gt;
Status&lt;br /&gt;
|- Number of jail:	1&lt;br /&gt;
`- Jail list:	sshd&lt;br /&gt;
&lt;br /&gt;
root@Elf:/# fail2ban-client status sshd&lt;br /&gt;
Status for the jail: sshd&lt;br /&gt;
|- Filter&lt;br /&gt;
|  |- Currently failed:	0&lt;br /&gt;
|  |- Total failed:	0&lt;br /&gt;
|  `- File list:	/var/log/auth.log&lt;br /&gt;
`- Actions&lt;br /&gt;
   |- Currently banned:	0&lt;br /&gt;
   |- Total banned:	0&lt;br /&gt;
   `- Banned IP list:	&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Mise en place du serveur Apache (http et https) ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/# service apache2 status&lt;br /&gt;
apache2 is running.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''WIFI''' ==&lt;br /&gt;
Faire ip link&lt;br /&gt;
&lt;br /&gt;
ensuite sudo airodump-ng wlanx  -- Remplacer x par le numero du wlan present &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
BSSID              PWR  Beacons    #Data, #/s  CH   MB   ENC CIPHER  AUTH ESSID&lt;br /&gt;
04:DA:D2:9C:50:54  -62       23       11    0   4   54e. WEP  WEP         cracotte05                         &lt;br /&gt;
04:DA:D2:9C:50:5A  -61        2        1    0   4   54e. WEP  WEP         cracotte11    &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;sudo airodump-ng wlan1 --bssid 04:DA:D2:9C:50:5A  -c4 --write log_airdump&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
sudo airodump-ng wlan1 --write airdump --bssid 04:DA:D2:9C:50:5A -c4&lt;br /&gt;
17:31:10  Created capture file &amp;quot;airdump-04.cap&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
 CH  4 ][ Elapsed: 39 mins ][ 2026-02-10 18:11 ][ fixed channel wlan1: 13 &lt;br /&gt;
&lt;br /&gt;
 BSSID              PWR RXQ  Beacons    #Data, #/s  CH   MB   ENC CIPHER  AUTH ESSID&lt;br /&gt;
&lt;br /&gt;
 04:DA:D2:9C:50:5A  -58   3     9766    43771   21   4   54e. WEP  WEP         cracotte11                                                                                                   &lt;br /&gt;
&lt;br /&gt;
 BSSID              STATION            PWR    Rate    Lost   Frames  Notes  Probes&lt;br /&gt;
&lt;br /&gt;
 04:DA:D2:9C:50:5A  40:A5:EF:01:2E:FA  -77    0 -48e   127    46300                                                                                                                          &lt;br /&gt;
Quitting...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
aircrack-ng airdump-05.cap &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
           Aircrack-ng 1.7 &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                 [00:25:47] Tested 869 keys (got 34546 IVs)&lt;br /&gt;
                          Got 35002 out of 35000 IVsStarting PTW attack with 35002 KB    depth   byte(vote)&lt;br /&gt;
    0    0/  2   FF(50176) 1C(43520) E6(42752) 3F(42496) B6(42496) &lt;br /&gt;
    1    0/  6   FF(48128) AC(46336) 90(42752) 8E(42496) 04(42240) &lt;br /&gt;
    2    0/  1   BD(50688) 7F(43776) 75(42752) E6(41216) F2(41216) &lt;br /&gt;
    3    9/  3   CE(39936) 05(39680) 5C(39680) 9A(39168) F4(39168) &lt;br /&gt;
    4   41/  4   6C(37376) 1E(37120) 80(37120) 88(37120) A7(37120) &lt;br /&gt;
&lt;br /&gt;
             KEY FOUND! [ FF:FF:FF:FF:FA:BC:12:CB:AE:EE:EE:EE:EE ]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
ssh -oKexAlgorithms=+diffie-hellman-group14-sha1 -oHostKeyAlgorithms=+ssh-rsa -oCiphers=+aes128-cbc admin@172.27.0.1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
C9200-E304&amp;gt;en&lt;br /&gt;
Password: &lt;br /&gt;
C9200-E304#config t&lt;br /&gt;
Enter configuration commands, one per line.  End with CNTL/Z.&lt;br /&gt;
C9200-E304(config)#vlan 28&lt;br /&gt;
C9200-E304(config-vlan)#name PoolEvora&lt;br /&gt;
C9200-E304(config-vlan)#exit &lt;br /&gt;
C9200-E304(config)#exit&lt;br /&gt;
C9200-E304#write&lt;br /&gt;
Building configuration...&lt;br /&gt;
[OK]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
C9200-E304#en&lt;br /&gt;
C9200-E304#config t&lt;br /&gt;
Enter configuration commands, one per line.  End with CNTL/Z.&lt;br /&gt;
C9200-E304(config)#ip dhcp pool PoolEvora  &lt;br /&gt;
C9200-E304(dhcp-config)#network 10.60.11.0 255.255.255.0&lt;br /&gt;
C9200-E304(dhcp-config)#dns-server 193.48.57.172&lt;br /&gt;
C9200-E304(dhcp-config)#default-router 10.60.11.254&lt;br /&gt;
C9200-E304(dhcp-config)#exit&lt;br /&gt;
C9200-E304(config)#exit&lt;br /&gt;
C9200-E304#write&lt;br /&gt;
Building configuration...&lt;br /&gt;
[OK]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
ip dhcp pool PoolTom&lt;br /&gt;
 network 10.60.10.0 255.255.255.0&lt;br /&gt;
 dns-server 193.48.57.168 &lt;br /&gt;
 default-router 10.60.10.254 &lt;br /&gt;
!         &lt;br /&gt;
ip dhcp pool PoolEvora&lt;br /&gt;
 network 10.60.11.0 255.255.255.0&lt;br /&gt;
 dns-server 193.48.57.172 &lt;br /&gt;
 default-router 10.60.11.254 &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;VRRP&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
C9200-E304&amp;gt;en &lt;br /&gt;
Password: &lt;br /&gt;
C9200-E304#config t&lt;br /&gt;
Enter configuration commands, one per line.  End with CNTL/Z.&lt;br /&gt;
C9200-E304(config)#interface vlan 28&lt;br /&gt;
C9200-E304(config-if)#ip address 10.60.11.2 255.255.255.0&lt;br /&gt;
C9200-E304(config-if)#ipv6 address 2001:660:4401:60ab::2/64&lt;br /&gt;
C9200-E304(config-if)#vrrp 28 address-family ipv4        &lt;br /&gt;
C9200-E304(config-if-vrrp)#priority 110&lt;br /&gt;
C9200-E304(config-if-vrrp)#address 10.60.11.1 primary&lt;br /&gt;
C9200-E304(config-if-vrrp)#exit&lt;br /&gt;
C9200-E304(config-if)#exit&lt;br /&gt;
C9200-E304(config)#exit&lt;br /&gt;
C9200-E304#write&lt;br /&gt;
Building configuration...&lt;br /&gt;
[OK]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;WIFI e304&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
ssh admin@172.27.0.4 \&lt;br /&gt;
  -o KexAlgorithms=+diffie-hellman-group1-sha1 \&lt;br /&gt;
  -o HostKeyAlgorithms=+ssh-rsa \&lt;br /&gt;
  -o Ciphers=+aes128-cbc \&lt;br /&gt;
  -o MACs=+hmac-sha1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Vsouopme</name></author>
	</entry>
	<entry>
		<id>https://wiki-se.plil.fr/mediawiki/index.php?title=Atelier_SysRes_SE4_2025/2026_E11&amp;diff=12301</id>
		<title>Atelier SysRes SE4 2025/2026 E11</title>
		<link rel="alternate" type="text/html" href="https://wiki-se.plil.fr/mediawiki/index.php?title=Atelier_SysRes_SE4_2025/2026_E11&amp;diff=12301"/>
		<updated>2026-02-21T19:40:46Z</updated>

		<summary type="html">&lt;p&gt;Vsouopme : /* Serveur SSH */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Projet Virtualisation /Administration Systeme-Réseau - Machine SE4.Elf =&lt;br /&gt;
Dans le cadre de ce projet, nnous avons déployés une infrastructure composée de '''deux machines dédiées aux services''' et d’une '''machine mandataire''', le tout à l’aide de l'environnement  '''Xen.'''&lt;br /&gt;
&lt;br /&gt;
== Création des machines virtuelles ==&lt;br /&gt;
Les machines sont créées  sur le Dom0 '''Capbreton.plil.info''' en faisant un '''ssh root@capbreton.plil.info''' &lt;br /&gt;
&lt;br /&gt;
Sur la capbreton.plil.info, &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
xen create-image --hostname=SE4.Elf --dhcp --dir=/usr/local/xen --size=10G --dist=excalibur --memory=2G --bridge=Styx --force&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; '''Xen-create-image''' :  Commande permettant de créer une nouvelle machine virtuelle Xen&lt;br /&gt;
&lt;br /&gt;
'''--hostname=SE4.Elf :''' Pour le nom de la machine &lt;br /&gt;
&lt;br /&gt;
'''--size=10G''' : La taille du disque &lt;br /&gt;
&lt;br /&gt;
'''--bridge=Styx''' : Le nom du bridge &lt;br /&gt;
&lt;br /&gt;
Par la suite il faut creer un fichier dans le répertoire &amp;lt;code&amp;gt;/etc/network/interfaces.d&amp;lt;/code&amp;gt; du Dom0 pour créer notre pont. (NB: Il faut noter que cette etape on peut la faire avant la creation de notre VM&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
auto Styx&lt;br /&gt;
&lt;br /&gt;
iface Styx inet manual&lt;br /&gt;
   bridge_ports none&lt;br /&gt;
   up ip link set $IFACE up&lt;br /&gt;
   down ip link set $IFACE down&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;La commande '''xen list :''' Affiche les '''machines virtuelles''' (VM) qui sont actuellement gérées par Xen (Elle fait la liste des VM allumée).&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
root@capbreton:~# xen list&lt;br /&gt;
SE4.batman                                 322  2048     1     -b----      37.5&lt;br /&gt;
SE4.Moon                                   326  2048     1     -b----      41.1&lt;br /&gt;
SE4.C2                                     332  1024     1     -b----      18.1&lt;br /&gt;
SE4.Tension                                343  2048     1     -b----       7.8&lt;br /&gt;
SE4.CachyOS                                365  2048     1     -b----      10.2&lt;br /&gt;
SE4.RockStar                               367  2048     1     -b----       6.1&lt;br /&gt;
SE4.Kasav                                  368  2048     1     -b----       5.9&lt;br /&gt;
SE4.Elf                                    369  2048     1     -b----       5.6&lt;br /&gt;
SE4.catwoman                               370  2048     1     -b----       6.1&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;-La commande '''xen create /etc/xen/SE4.Elf.cfg''' permet d'allumer la Machine virtuellle.&lt;br /&gt;
&lt;br /&gt;
-La commande xen '''console SE4.Elf''' permet d'acceder  / de se connecter  a la VM.&lt;br /&gt;
&lt;br /&gt;
-La commande '''xen shutdown''' '''SE4.Elf''' permet d'eteindre la machine virtuelle.&lt;br /&gt;
&lt;br /&gt;
Lors de la tentative de connexion, il y'a une un probleme , pour y remedier,  '''Ctrl + AltGr + ] =&amp;gt; vi =&amp;gt; :q! =&amp;gt; reconnexion'''&lt;br /&gt;
&lt;br /&gt;
Pour voir le mot de passe de la VM, '''cat /var/log/xen-tools/SE4.Elf.log'''&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
Installation Summary&lt;br /&gt;
---------------------&lt;br /&gt;
Hostname        :  SE4.Elf&lt;br /&gt;
Distribution    :  excalibur&lt;br /&gt;
MAC Address     :  00:16:3E:83:A3:C7&lt;br /&gt;
IP Address(es)  :  dynamic&lt;br /&gt;
SSH Fingerprint :  SHA256:IrPhxhB4m1s+eaPaLynS6NlE/HfL78+y3ba3DPuHFQU (DSA)&lt;br /&gt;
SSH Fingerprint :  SHA256:RT+MZtlFxC7BrdYORzOcxDX+SKsJrLzOGWWngX2pKz4 (ECDSA)&lt;br /&gt;
SSH Fingerprint :  SHA256:aLYvYqUPX2Q/J5P0nTpdpMyrFD5xopRqkFKuYb7QUo4 (ED25519)&lt;br /&gt;
SSH Fingerprint :  SHA256:b0ddm9FYx4/losJU8/pE9MXx7102ygkAMjChOvPlNhE (RSA)&lt;br /&gt;
Root Password   :  X&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;- La commande '''vi /etc/hostname''' pour changer le nom de la VM&lt;br /&gt;
&lt;br /&gt;
== '''Configuration de la Machine de Services''' ==&lt;br /&gt;
Il faut creer deux partitions LVM de 10G pour votre machine virtuelle et modifiez le fichier de configuration de la machine virtuelle de services pour faire en sorte que les répertoires &amp;lt;code&amp;gt;/'''var'''&amp;lt;/code&amp;gt; et &amp;lt;code&amp;gt;'''/home'''&amp;lt;/code&amp;gt; de la machine virtuelle soient implantés sur ces partitions LVM&lt;br /&gt;
&lt;br /&gt;
=== '''Création des volumes logiques''' ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
lvcreate -L 10G -n lv_var_SE4Elf &lt;br /&gt;
lvcreate -L 10G -n lv_home_SE4Elf &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Faire '''lvdisplay''' pour faire la verification&lt;br /&gt;
&lt;br /&gt;
Depuis le serveur Capbreton, on a créé 2 fichiers de partitions dans &amp;lt;code&amp;gt;/dev/virtual&amp;lt;/code&amp;gt; pour chaque machines de services &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@capbreton:/dev/virtual# ls &lt;br /&gt;
SE4.Poseidon.home lv_home_SE4Elf lv_var_SE4Elf  SE4.Gaby.home SE4.Poseidon.var SE4.Gaby.var &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Apres nous avons modifié le fichier /etc/xen/SE4.Elf.cfg piur y ajouter deux répertoires&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
disk = [&lt;br /&gt;
  'file:/usr/local/xen/domains/SE4.Elf/disk.img,xvda2,w',&lt;br /&gt;
  'file:/usr/local/xen/domains/SE4.Elf/swap.img,xvda1,w',&lt;br /&gt;
  'phy:/dev/vg0/lv_var_SE4Elf,xvdb,w',&lt;br /&gt;
  'phy:/dev/vg0/lv_home_SE4Elf,xvdc,w'&lt;br /&gt;
]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== ''' Création et formatage des partitions''' ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
mkfs -t ext4 /dev/xvdb  # Formatage de la partition pour /var &lt;br /&gt;
mkfs -t ext4 /dev/xvdc  # Formatage de la partition pour /home&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== '''Préparer les partitions et déplacer les données :''' ===&lt;br /&gt;
&lt;br /&gt;
* '''Montage temporaire des partitions dans &amp;lt;code&amp;gt;/mnt&amp;lt;/code&amp;gt; :'''&lt;br /&gt;
&lt;br /&gt;
Pour pouvoir déplacer les données, nous avons du monter les nouvelles partitions LVM dans un répertoire temporaire &amp;lt;code&amp;gt;/mnt&amp;lt;/code&amp;gt;.  On a créé 2 partitions une pour &amp;lt;code&amp;gt;/var&amp;lt;/code&amp;gt; et une &amp;lt;code&amp;gt;/home&amp;lt;/code&amp;gt; sous les noms xvdb et xvdc dans  &amp;lt;code&amp;gt;/dev&amp;lt;/code&amp;gt;  ,que l'on monte avec  :&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
mount /dev/xvdb /mnt&lt;br /&gt;
mount /dev/xvdc /mnt&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* '''Déplacement des fichiers existants'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
mv /var/* /mnt # Déplacement des fichiers de /var vers la nouvelle partition&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== '''Démonter les partitions temporaires :''' ===&lt;br /&gt;
Avant de configurer les montages permanents, on démonte les partitions des répertoires temporaires (&amp;lt;code&amp;gt;/mnt&amp;lt;/code&amp;gt;)&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
umount /mnt # Démontage après transfert des données&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== '''Modification du fichier &amp;lt;code&amp;gt;/etc/fstab&amp;lt;/code&amp;gt; pour un montage automatique au démarrage :''' ===&lt;br /&gt;
On modifie le fichier &amp;lt;code&amp;gt;'''/etc/fstab'''&amp;lt;/code&amp;gt;, qui contient la liste des partitions.&lt;br /&gt;
&lt;br /&gt;
Ajout des nouvelles partitions LVM au fichier &amp;lt;code&amp;gt;/etc/fstab&amp;lt;/code&amp;gt; :&lt;br /&gt;
&lt;br /&gt;
* '''/dev/xvdb /var ext4 defaults 0 2'''&lt;br /&gt;
* '''/dev/xvdc /home ext4 defaults 0''' &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
# /etc/fstab: static file system information.&lt;br /&gt;
#&lt;br /&gt;
# &amp;lt;file system&amp;gt; &amp;lt;mount point&amp;gt; &amp;lt;type&amp;gt; &amp;lt;options&amp;gt; &amp;lt;dump&amp;gt; &amp;lt;pass&amp;gt;&lt;br /&gt;
proc             /proc           proc  defaults   0     0&lt;br /&gt;
devpts            /dev/pts       devpts rw,noexec,nosuid,gid=5,mode=620 0 0 /dev/xvda1 none swap sw 0 0&lt;br /&gt;
/dev/xvda1 none swap sw 0 0&lt;br /&gt;
/dev/xvda2 / ext4 noatime,nodiratime,errors=remount-ro 0 1&lt;br /&gt;
/dev/xvdb /var ext4 defaults 0 2 &lt;br /&gt;
/dev/xvdc /home ext4 defaults 0 2&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== '''Monter les partitions définies dans &amp;lt;code&amp;gt;fstab&amp;lt;/code&amp;gt; :''' ===&lt;br /&gt;
Pour monter toutes les partitions définies dans le fichier &amp;lt;code&amp;gt;/etc/fstab&amp;lt;/code&amp;gt;  :&lt;br /&gt;
 mount -a  # Remontage des partitions définies dans fstab&lt;br /&gt;
Cette commande monte toutes les partitions qui ne sont pas encore montées et qui sont définies dans &amp;lt;code&amp;gt;/etc/fstab&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
remet les données dans le fichier déplacer.&lt;br /&gt;
&lt;br /&gt;
Puis, pour appliquer les changement nous avons redémarré la VM en faisant le '''xen shutdown SE4.Elf''' ,  '''xen create /etc/xen/SE4.Elf.cfg''',  '''xen console SE4.Elf'''&lt;br /&gt;
&lt;br /&gt;
=== '''Vérification des partitions montées''' ===&lt;br /&gt;
Après avoir configuré le montage automatique et remonté les partitions, nous devons vérifier que les partitions sont correctement montées. Nous avons utilisé la commande '''&amp;lt;code&amp;gt;df -h&amp;lt;/code&amp;gt;''' pour afficher l'espace disque utilisé et disponible sur les partitions montées.&lt;br /&gt;
&lt;br /&gt;
Cela nous permet de confirmer que les partitions '''&amp;lt;code&amp;gt;/var&amp;lt;/code&amp;gt;''' et '''&amp;lt;code&amp;gt;/home&amp;lt;/code&amp;gt;''' sont correctement montées sur les répertoires associés et qu'il n'y a pas de problème d'espace disque.&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== &amp;lt;big&amp;gt;'''Configuration Reseau'''&amp;lt;/big&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
Tout d'abord nous avons modifier le fichier /etc/xen/SE4.Elf pour y ajouter une nouvelle interface sur le bridge de la promotion SE4.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Afin d’assurer une connectivité IPv6 stable et routée pour un accès direct à Internet, ainsi qu’une communication efficace avec la machine mandataire, nous avons modifié le fichier '''&amp;lt;code&amp;gt;/etc/network/interfaces&amp;lt;/code&amp;gt;'''. De plus, une adresse IPv4 fixe a été attribuée sur le réseau privé afin de garantir une interaction optimale entre les machines de services et leur machine mandataire.&lt;br /&gt;
&lt;br /&gt;
=== '''Mise a jour du fichier'''  /etc/network/interfaces ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
# Interface loopback&lt;br /&gt;
auto lo&lt;br /&gt;
iface lo inet loopback&lt;br /&gt;
&lt;br /&gt;
# Interface principale (eth0) - IPv4 statique + IPv6 automatique&lt;br /&gt;
auto eth0&lt;br /&gt;
iface eth0 inet static&lt;br /&gt;
    address 192.168.50.12&lt;br /&gt;
    netmask 255.255.255.254  # /24 &lt;br /&gt;
    gateway 192.168.50.1     # @mandataire&lt;br /&gt;
&lt;br /&gt;
iface eth0 inet6 auto  # Attribution automatique d'une IPv6&lt;br /&gt;
&lt;br /&gt;
# Interface secondaire (eth1) - IPv6 automatique uniquement&lt;br /&gt;
auto eth1&lt;br /&gt;
iface eth1 inet6 auto&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Il faut ensuite aciver l'interface en faisan'''t  ifdown eth0 &amp;amp;&amp;amp; ifup eth0''' et puis  '''ifdown eth1 &amp;amp;&amp;amp; ifup eth1''' aprés faire le '''systemctl restart networking''' pour mettre a jour les configurations du reseau.&lt;br /&gt;
&lt;br /&gt;
Les commandes : &lt;br /&gt;
&lt;br /&gt;
* ip route show : pour afficher la table de routage.&lt;br /&gt;
* ip -4 addr show : pour afficher l'adresse ipv4   #'''''192.168.50.12'''''&lt;br /&gt;
* ip -6 addr show : pour afficher l'adresse ipv6   #'''''2001:660:4401:60a0:216:3eff:fe83:a3c8'''''&lt;br /&gt;
&lt;br /&gt;
Grace a toute ses configurations, nous pouvons faire un ping sur la machine mandataire RockStar et sur la machine de service Kasav &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:~# ping 192.168.50.13        #ping sur la machine de service Kasav&lt;br /&gt;
PING 192.168.50.13 (192.168.50.13) 56(84) bytes of data.&lt;br /&gt;
64 bytes from 192.168.50.13: icmp_seq=1 ttl=64 time=0.132 ms&lt;br /&gt;
64 bytes from 192.168.50.13: icmp_seq=2 ttl=64 time=0.318 ms&lt;br /&gt;
64 bytes from 192.168.50.13: icmp_seq=3 ttl=64 time=0.369 ms&lt;br /&gt;
64 bytes from 192.168.50.13 icmp_seq=4 ttl=64 time=0.356 ms&lt;br /&gt;
--- 192.168.50.13 ping statistics ---&lt;br /&gt;
4 packets transmitted, 4 received, 0% packet loss, time 3077ms&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
==  '''Serveur SSH''' ==&lt;br /&gt;
Notre machine virtuelle doit etre accessible par SSH, on autorise donc l'accès par l'utilisateur '''Root en modifiant le fichier de de configuration &amp;lt;code&amp;gt;/etc/ssh/sshd_config  :&amp;lt;/code&amp;gt;'''&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
PermitRootLogin yes&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Il faut ensuite redemarrer le serveur ssh en faisant :&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/etc/ssh# /etc/init.d/ssh restart&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Pour gérer la redirection du SSH, on doit configurer '''nftables''' sur nos machines de service en redirigeant les ports 2201 et 2202&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
nft add table ip nat&lt;br /&gt;
nft add chain ip nat PREROUTING { type nat hook prerouting priority 0 \; }&lt;br /&gt;
nft add rule ip nat PREROUTING tcp dport 2201 dnat to 192.168.50.12:22                 &lt;br /&gt;
nft add rule ip nat PREROUTING tcp dport 2202 dnat to 192.168.50.3:22              &lt;br /&gt;
nft add chain ip nat POSTROUTING { type nat hook postrouting priority 100 \; }&lt;br /&gt;
nft add rule ip nat POSTROUTING masquerade&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Maintenant, on peut se connecter en SSH sur les machiches virtuelles de services:  De Elf, on peut se connecter a Kasav&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/# ssh root@192.168.50.3&lt;br /&gt;
root@192.168.50.3's password: &lt;br /&gt;
Linux Kasav 4.19.0-26-amd64 #1 SMP Debian 4.19.304-1 (2024-01-09) x86_64&lt;br /&gt;
&lt;br /&gt;
The programs included with the Devuan GNU/Linux system are free software;&lt;br /&gt;
the exact distribution terms for each program are described in the&lt;br /&gt;
individual files in /usr/share/doc/*/copyright.&lt;br /&gt;
&lt;br /&gt;
Devuan GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent&lt;br /&gt;
permitted by applicable law.&lt;br /&gt;
Last login: Tue Feb  3 11:34:45 2026 from 192.168.50.12&lt;br /&gt;
root@Kasav:~# &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Serveur DNS''' ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
$TTL 86400&lt;br /&gt;
@ IN SOA ns1.elvis21.tech. admin.elvis21.tech. (&lt;br /&gt;
        3298267246      ;Version&lt;br /&gt;
        3600            ;Refresh&lt;br /&gt;
        1800            ;Retry&lt;br /&gt;
        604800          ;Expire&lt;br /&gt;
        86400 )         ;Minimum TTL&lt;br /&gt;
;&lt;br /&gt;
@  IN NS ns1.elvis21.tech.&lt;br /&gt;
&lt;br /&gt;
ns1 IN A 192.168.50.12&lt;br /&gt;
ns2 IN A 192.168.50.1&lt;br /&gt;
 IN A 192.168.50.12&lt;br /&gt;
      IN AAAA 2001:660:4401:60a0:216:3eff:fe83:a3c8&lt;br /&gt;
www IN A 192.168.50.12&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/etc/bind# cat named.conf.local &lt;br /&gt;
zone &amp;quot;elvis21.tech&amp;quot; {&lt;br /&gt;
    type primary;&lt;br /&gt;
    file &amp;quot;/etc/bind/zones/db.elvis21.tech&amp;quot;;&lt;br /&gt;
    allow-transfer {&lt;br /&gt;
      2001:660:4401:60a0:216:3eff:fe70:7f1c;&lt;br /&gt;
      2001:660:4401:60a0:216:3eff:fe9a:ea1c;&lt;br /&gt;
      };&lt;br /&gt;
    also-notify { 2001:660:4401:60a0:216:3eff:fe70:7f1c; };&lt;br /&gt;
    inline-signing yes;   // DNSSEC automatique&lt;br /&gt;
    key-directory &amp;quot;/etc/bind/keys&amp;quot;; // répertoire des clefs, attention aux droits&lt;br /&gt;
    dnssec-policy &amp;quot;dnssecpolicy&amp;quot;;  // politique pour les clefs de chiffrement&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
zone &amp;quot;kasav.online&amp;quot; {&lt;br /&gt;
    type secondary;&lt;br /&gt;
    file &amp;quot;/etc/bind/backup/db.kasav.online&amp;quot;;&lt;br /&gt;
    primaries { 2001:660:4401:60a0:216:3eff:fe9a:ea1c; };&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
dnssec-policy &amp;quot;dnssecpolicy&amp;quot; {&lt;br /&gt;
  keys {&lt;br /&gt;
    ksk key-directory lifetime unlimited algorithm 13;&lt;br /&gt;
    zsk key-directory lifetime unlimited algorithm 13;&lt;br /&gt;
  };&lt;br /&gt;
  nsec3param;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/etc/bind# named-checkzone elvis21.tech /etc/bind/db.elvis21.tech&lt;br /&gt;
zone elvis21.tech/IN: loaded serial 3298267246&lt;br /&gt;
OK&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
openssl req -nodes -newkey rsa:2048 -sha256 -keyout elvis21.tech.key -out elvis21.csr&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
[[Fichier:ImageDns.png|vignette|994x994px|centré]]&lt;br /&gt;
&lt;br /&gt;
== '''Mise en place du serveur Apache (http et https)''' ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
apt update&lt;br /&gt;
apt install apache2&lt;br /&gt;
systemctl enable --now apache2&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
[[Fichier:Elvis21.tech-DNS.png|gauche|vignette|863x863px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Installation Fail2ban''' ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/# apt install fail2ban &lt;br /&gt;
Installing:                     &lt;br /&gt;
  fail2ban&lt;br /&gt;
&lt;br /&gt;
root@Elf:/# systemctl status fail2ban&lt;br /&gt;
fail2ban.service - Fail2Ban Service&lt;br /&gt;
    Loaded: loaded (/usr/lib/systemd/system/fail2ban.service, disabled)&lt;br /&gt;
    Active: active (running)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/# service fail2ban status                             &lt;br /&gt;
Status of Authentication failure monitor: fail2ban is running.&lt;br /&gt;
 root@Elf:/# fail2ban-client status&lt;br /&gt;
Status&lt;br /&gt;
|- Number of jail:	1&lt;br /&gt;
`- Jail list:	sshd&lt;br /&gt;
&lt;br /&gt;
root@Elf:/# fail2ban-client status sshd&lt;br /&gt;
Status for the jail: sshd&lt;br /&gt;
|- Filter&lt;br /&gt;
|  |- Currently failed:	0&lt;br /&gt;
|  |- Total failed:	0&lt;br /&gt;
|  `- File list:	/var/log/auth.log&lt;br /&gt;
`- Actions&lt;br /&gt;
   |- Currently banned:	0&lt;br /&gt;
   |- Total banned:	0&lt;br /&gt;
   `- Banned IP list:	&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Mise en place du serveur Apache (http et https) ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/# service apache2 status&lt;br /&gt;
apache2 is running.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''WIFI''' ==&lt;br /&gt;
Faire ip link&lt;br /&gt;
&lt;br /&gt;
ensuite sudo airodump-ng wlanx  -- Remplacer x par le numero du wlan present &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
BSSID              PWR  Beacons    #Data, #/s  CH   MB   ENC CIPHER  AUTH ESSID&lt;br /&gt;
04:DA:D2:9C:50:54  -62       23       11    0   4   54e. WEP  WEP         cracotte05                         &lt;br /&gt;
04:DA:D2:9C:50:5A  -61        2        1    0   4   54e. WEP  WEP         cracotte11    &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;sudo airodump-ng wlan1 --bssid 04:DA:D2:9C:50:5A  -c4 --write log_airdump&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
sudo airodump-ng wlan1 --write airdump --bssid 04:DA:D2:9C:50:5A -c4&lt;br /&gt;
17:31:10  Created capture file &amp;quot;airdump-04.cap&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
 CH  4 ][ Elapsed: 39 mins ][ 2026-02-10 18:11 ][ fixed channel wlan1: 13 &lt;br /&gt;
&lt;br /&gt;
 BSSID              PWR RXQ  Beacons    #Data, #/s  CH   MB   ENC CIPHER  AUTH ESSID&lt;br /&gt;
&lt;br /&gt;
 04:DA:D2:9C:50:5A  -58   3     9766    43771   21   4   54e. WEP  WEP         cracotte11                                                                                                   &lt;br /&gt;
&lt;br /&gt;
 BSSID              STATION            PWR    Rate    Lost   Frames  Notes  Probes&lt;br /&gt;
&lt;br /&gt;
 04:DA:D2:9C:50:5A  40:A5:EF:01:2E:FA  -77    0 -48e   127    46300                                                                                                                          &lt;br /&gt;
Quitting...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
aircrack-ng airdump-05.cap &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
           Aircrack-ng 1.7 &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                 [00:25:47] Tested 869 keys (got 34546 IVs)&lt;br /&gt;
                          Got 35002 out of 35000 IVsStarting PTW attack with 35002 KB    depth   byte(vote)&lt;br /&gt;
    0    0/  2   FF(50176) 1C(43520) E6(42752) 3F(42496) B6(42496) &lt;br /&gt;
    1    0/  6   FF(48128) AC(46336) 90(42752) 8E(42496) 04(42240) &lt;br /&gt;
    2    0/  1   BD(50688) 7F(43776) 75(42752) E6(41216) F2(41216) &lt;br /&gt;
    3    9/  3   CE(39936) 05(39680) 5C(39680) 9A(39168) F4(39168) &lt;br /&gt;
    4   41/  4   6C(37376) 1E(37120) 80(37120) 88(37120) A7(37120) &lt;br /&gt;
&lt;br /&gt;
             KEY FOUND! [ FF:FF:FF:FF:FA:BC:12:CB:AE:EE:EE:EE:EE ]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
ssh -oKexAlgorithms=+diffie-hellman-group14-sha1 -oHostKeyAlgorithms=+ssh-rsa -oCiphers=+aes128-cbc admin@172.27.0.1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
C9200-E304&amp;gt;en&lt;br /&gt;
Password: &lt;br /&gt;
C9200-E304#config t&lt;br /&gt;
Enter configuration commands, one per line.  End with CNTL/Z.&lt;br /&gt;
C9200-E304(config)#vlan 28&lt;br /&gt;
C9200-E304(config-vlan)#name PoolEvora&lt;br /&gt;
C9200-E304(config-vlan)#exit &lt;br /&gt;
C9200-E304(config)#exit&lt;br /&gt;
C9200-E304#write&lt;br /&gt;
Building configuration...&lt;br /&gt;
[OK]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
C9200-E304#en&lt;br /&gt;
C9200-E304#config t&lt;br /&gt;
Enter configuration commands, one per line.  End with CNTL/Z.&lt;br /&gt;
C9200-E304(config)#ip dhcp pool PoolEvora  &lt;br /&gt;
C9200-E304(dhcp-config)#network 10.60.11.0 255.255.255.0&lt;br /&gt;
C9200-E304(dhcp-config)#dns-server 193.48.57.172&lt;br /&gt;
C9200-E304(dhcp-config)#default-router 10.60.11.254&lt;br /&gt;
C9200-E304(dhcp-config)#exit&lt;br /&gt;
C9200-E304(config)#exit&lt;br /&gt;
C9200-E304#write&lt;br /&gt;
Building configuration...&lt;br /&gt;
[OK]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
ip dhcp pool PoolTom&lt;br /&gt;
 network 10.60.10.0 255.255.255.0&lt;br /&gt;
 dns-server 193.48.57.168 &lt;br /&gt;
 default-router 10.60.10.254 &lt;br /&gt;
!         &lt;br /&gt;
ip dhcp pool PoolEvora&lt;br /&gt;
 network 10.60.11.0 255.255.255.0&lt;br /&gt;
 dns-server 193.48.57.172 &lt;br /&gt;
 default-router 10.60.11.254 &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;VRRP&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
C9200-E304&amp;gt;en &lt;br /&gt;
Password: &lt;br /&gt;
C9200-E304#config t&lt;br /&gt;
Enter configuration commands, one per line.  End with CNTL/Z.&lt;br /&gt;
C9200-E304(config)#interface vlan 28&lt;br /&gt;
C9200-E304(config-if)#ip address 10.60.11.2 255.255.255.0&lt;br /&gt;
C9200-E304(config-if)#ipv6 address 2001:660:4401:60ab::2/64&lt;br /&gt;
C9200-E304(config-if)#vrrp 28 address-family ipv4        &lt;br /&gt;
C9200-E304(config-if-vrrp)#priority 110&lt;br /&gt;
C9200-E304(config-if-vrrp)#address 10.60.11.1 primary&lt;br /&gt;
C9200-E304(config-if-vrrp)#exit&lt;br /&gt;
C9200-E304(config-if)#exit&lt;br /&gt;
C9200-E304(config)#exit&lt;br /&gt;
C9200-E304#write&lt;br /&gt;
Building configuration...&lt;br /&gt;
[OK]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;WIFI e304&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
ssh admin@172.27.0.4 \&lt;br /&gt;
  -o KexAlgorithms=+diffie-hellman-group1-sha1 \&lt;br /&gt;
  -o HostKeyAlgorithms=+ssh-rsa \&lt;br /&gt;
  -o Ciphers=+aes128-cbc \&lt;br /&gt;
  -o MACs=+hmac-sha1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Vsouopme</name></author>
	</entry>
	<entry>
		<id>https://wiki-se.plil.fr/mediawiki/index.php?title=Atelier_SysRes_SE4_2025/2026_E11&amp;diff=12300</id>
		<title>Atelier SysRes SE4 2025/2026 E11</title>
		<link rel="alternate" type="text/html" href="https://wiki-se.plil.fr/mediawiki/index.php?title=Atelier_SysRes_SE4_2025/2026_E11&amp;diff=12300"/>
		<updated>2026-02-21T19:36:20Z</updated>

		<summary type="html">&lt;p&gt;Vsouopme : /* Création des volumes logiques */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Projet Virtualisation /Administration Systeme-Réseau - Machine SE4.Elf =&lt;br /&gt;
Dans le cadre de ce projet, nnous avons déployés une infrastructure composée de '''deux machines dédiées aux services''' et d’une '''machine mandataire''', le tout à l’aide de l'environnement  '''Xen.'''&lt;br /&gt;
&lt;br /&gt;
== Création des machines virtuelles ==&lt;br /&gt;
Les machines sont créées  sur le Dom0 '''Capbreton.plil.info''' en faisant un '''ssh root@capbreton.plil.info''' &lt;br /&gt;
&lt;br /&gt;
Sur la capbreton.plil.info, &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
xen create-image --hostname=SE4.Elf --dhcp --dir=/usr/local/xen --size=10G --dist=excalibur --memory=2G --bridge=Styx --force&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; '''Xen-create-image''' :  Commande permettant de créer une nouvelle machine virtuelle Xen&lt;br /&gt;
&lt;br /&gt;
'''--hostname=SE4.Elf :''' Pour le nom de la machine &lt;br /&gt;
&lt;br /&gt;
'''--size=10G''' : La taille du disque &lt;br /&gt;
&lt;br /&gt;
'''--bridge=Styx''' : Le nom du bridge &lt;br /&gt;
&lt;br /&gt;
Par la suite il faut creer un fichier dans le répertoire &amp;lt;code&amp;gt;/etc/network/interfaces.d&amp;lt;/code&amp;gt; du Dom0 pour créer notre pont. (NB: Il faut noter que cette etape on peut la faire avant la creation de notre VM&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
auto Styx&lt;br /&gt;
&lt;br /&gt;
iface Styx inet manual&lt;br /&gt;
   bridge_ports none&lt;br /&gt;
   up ip link set $IFACE up&lt;br /&gt;
   down ip link set $IFACE down&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;La commande '''xen list :''' Affiche les '''machines virtuelles''' (VM) qui sont actuellement gérées par Xen (Elle fait la liste des VM allumée).&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
root@capbreton:~# xen list&lt;br /&gt;
SE4.batman                                 322  2048     1     -b----      37.5&lt;br /&gt;
SE4.Moon                                   326  2048     1     -b----      41.1&lt;br /&gt;
SE4.C2                                     332  1024     1     -b----      18.1&lt;br /&gt;
SE4.Tension                                343  2048     1     -b----       7.8&lt;br /&gt;
SE4.CachyOS                                365  2048     1     -b----      10.2&lt;br /&gt;
SE4.RockStar                               367  2048     1     -b----       6.1&lt;br /&gt;
SE4.Kasav                                  368  2048     1     -b----       5.9&lt;br /&gt;
SE4.Elf                                    369  2048     1     -b----       5.6&lt;br /&gt;
SE4.catwoman                               370  2048     1     -b----       6.1&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;-La commande '''xen create /etc/xen/SE4.Elf.cfg''' permet d'allumer la Machine virtuellle.&lt;br /&gt;
&lt;br /&gt;
-La commande xen '''console SE4.Elf''' permet d'acceder  / de se connecter  a la VM.&lt;br /&gt;
&lt;br /&gt;
-La commande '''xen shutdown''' '''SE4.Elf''' permet d'eteindre la machine virtuelle.&lt;br /&gt;
&lt;br /&gt;
Lors de la tentative de connexion, il y'a une un probleme , pour y remedier,  '''Ctrl + AltGr + ] =&amp;gt; vi =&amp;gt; :q! =&amp;gt; reconnexion'''&lt;br /&gt;
&lt;br /&gt;
Pour voir le mot de passe de la VM, '''cat /var/log/xen-tools/SE4.Elf.log'''&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
Installation Summary&lt;br /&gt;
---------------------&lt;br /&gt;
Hostname        :  SE4.Elf&lt;br /&gt;
Distribution    :  excalibur&lt;br /&gt;
MAC Address     :  00:16:3E:83:A3:C7&lt;br /&gt;
IP Address(es)  :  dynamic&lt;br /&gt;
SSH Fingerprint :  SHA256:IrPhxhB4m1s+eaPaLynS6NlE/HfL78+y3ba3DPuHFQU (DSA)&lt;br /&gt;
SSH Fingerprint :  SHA256:RT+MZtlFxC7BrdYORzOcxDX+SKsJrLzOGWWngX2pKz4 (ECDSA)&lt;br /&gt;
SSH Fingerprint :  SHA256:aLYvYqUPX2Q/J5P0nTpdpMyrFD5xopRqkFKuYb7QUo4 (ED25519)&lt;br /&gt;
SSH Fingerprint :  SHA256:b0ddm9FYx4/losJU8/pE9MXx7102ygkAMjChOvPlNhE (RSA)&lt;br /&gt;
Root Password   :  X&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;- La commande '''vi /etc/hostname''' pour changer le nom de la VM&lt;br /&gt;
&lt;br /&gt;
== '''Configuration de la Machine de Services''' ==&lt;br /&gt;
Il faut creer deux partitions LVM de 10G pour votre machine virtuelle et modifiez le fichier de configuration de la machine virtuelle de services pour faire en sorte que les répertoires &amp;lt;code&amp;gt;/'''var'''&amp;lt;/code&amp;gt; et &amp;lt;code&amp;gt;'''/home'''&amp;lt;/code&amp;gt; de la machine virtuelle soient implantés sur ces partitions LVM&lt;br /&gt;
&lt;br /&gt;
=== '''Création des volumes logiques''' ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
lvcreate -L 10G -n lv_var_SE4Elf &lt;br /&gt;
lvcreate -L 10G -n lv_home_SE4Elf &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Faire '''lvdisplay''' pour faire la verification&lt;br /&gt;
&lt;br /&gt;
Depuis le serveur Capbreton, on a créé 2 fichiers de partitions dans &amp;lt;code&amp;gt;/dev/virtual&amp;lt;/code&amp;gt; pour chaque machines de services &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@capbreton:/dev/virtual# ls &lt;br /&gt;
SE4.Poseidon.home lv_home_SE4Elf lv_var_SE4Elf  SE4.Gaby.home SE4.Poseidon.var SE4.Gaby.var &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Apres nous avons modifié le fichier /etc/xen/SE4.Elf.cfg piur y ajouter deux répertoires&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
disk = [&lt;br /&gt;
  'file:/usr/local/xen/domains/SE4.Elf/disk.img,xvda2,w',&lt;br /&gt;
  'file:/usr/local/xen/domains/SE4.Elf/swap.img,xvda1,w',&lt;br /&gt;
  'phy:/dev/vg0/lv_var_SE4Elf,xvdb,w',&lt;br /&gt;
  'phy:/dev/vg0/lv_home_SE4Elf,xvdc,w'&lt;br /&gt;
]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== ''' Création et formatage des partitions''' ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
mkfs -t ext4 /dev/xvdb  # Formatage de la partition pour /var &lt;br /&gt;
mkfs -t ext4 /dev/xvdc  # Formatage de la partition pour /home&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== '''Préparer les partitions et déplacer les données :''' ===&lt;br /&gt;
&lt;br /&gt;
* '''Montage temporaire des partitions dans &amp;lt;code&amp;gt;/mnt&amp;lt;/code&amp;gt; :'''&lt;br /&gt;
&lt;br /&gt;
Pour pouvoir déplacer les données, nous avons du monter les nouvelles partitions LVM dans un répertoire temporaire &amp;lt;code&amp;gt;/mnt&amp;lt;/code&amp;gt;.  On a créé 2 partitions une pour &amp;lt;code&amp;gt;/var&amp;lt;/code&amp;gt; et une &amp;lt;code&amp;gt;/home&amp;lt;/code&amp;gt; sous les noms xvdb et xvdc dans  &amp;lt;code&amp;gt;/dev&amp;lt;/code&amp;gt;  ,que l'on monte avec  :&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
mount /dev/xvdb /mnt&lt;br /&gt;
mount /dev/xvdc /mnt&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* '''Déplacement des fichiers existants'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
mv /var/* /mnt # Déplacement des fichiers de /var vers la nouvelle partition&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== '''Démonter les partitions temporaires :''' ===&lt;br /&gt;
Avant de configurer les montages permanents, on démonte les partitions des répertoires temporaires (&amp;lt;code&amp;gt;/mnt&amp;lt;/code&amp;gt;)&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
umount /mnt # Démontage après transfert des données&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== '''Modification du fichier &amp;lt;code&amp;gt;/etc/fstab&amp;lt;/code&amp;gt; pour un montage automatique au démarrage :''' ===&lt;br /&gt;
On modifie le fichier &amp;lt;code&amp;gt;'''/etc/fstab'''&amp;lt;/code&amp;gt;, qui contient la liste des partitions.&lt;br /&gt;
&lt;br /&gt;
Ajout des nouvelles partitions LVM au fichier &amp;lt;code&amp;gt;/etc/fstab&amp;lt;/code&amp;gt; :&lt;br /&gt;
&lt;br /&gt;
* '''/dev/xvdb /var ext4 defaults 0 2'''&lt;br /&gt;
* '''/dev/xvdc /home ext4 defaults 0''' &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
# /etc/fstab: static file system information.&lt;br /&gt;
#&lt;br /&gt;
# &amp;lt;file system&amp;gt; &amp;lt;mount point&amp;gt; &amp;lt;type&amp;gt; &amp;lt;options&amp;gt; &amp;lt;dump&amp;gt; &amp;lt;pass&amp;gt;&lt;br /&gt;
proc             /proc           proc  defaults   0     0&lt;br /&gt;
devpts            /dev/pts       devpts rw,noexec,nosuid,gid=5,mode=620 0 0 /dev/xvda1 none swap sw 0 0&lt;br /&gt;
/dev/xvda1 none swap sw 0 0&lt;br /&gt;
/dev/xvda2 / ext4 noatime,nodiratime,errors=remount-ro 0 1&lt;br /&gt;
/dev/xvdb /var ext4 defaults 0 2 &lt;br /&gt;
/dev/xvdc /home ext4 defaults 0 2&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== '''Monter les partitions définies dans &amp;lt;code&amp;gt;fstab&amp;lt;/code&amp;gt; :''' ===&lt;br /&gt;
Pour monter toutes les partitions définies dans le fichier &amp;lt;code&amp;gt;/etc/fstab&amp;lt;/code&amp;gt;  :&lt;br /&gt;
 mount -a  # Remontage des partitions définies dans fstab&lt;br /&gt;
Cette commande monte toutes les partitions qui ne sont pas encore montées et qui sont définies dans &amp;lt;code&amp;gt;/etc/fstab&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
remet les données dans le fichier déplacer.&lt;br /&gt;
&lt;br /&gt;
Puis, pour appliquer les changement nous avons redémarré la VM en faisant le '''xen shutdown SE4.Elf''' ,  '''xen create /etc/xen/SE4.Elf.cfg''',  '''xen console SE4.Elf'''&lt;br /&gt;
&lt;br /&gt;
=== '''Vérification des partitions montées''' ===&lt;br /&gt;
Après avoir configuré le montage automatique et remonté les partitions, nous devons vérifier que les partitions sont correctement montées. Nous avons utilisé la commande '''&amp;lt;code&amp;gt;df -h&amp;lt;/code&amp;gt;''' pour afficher l'espace disque utilisé et disponible sur les partitions montées.&lt;br /&gt;
&lt;br /&gt;
Cela nous permet de confirmer que les partitions '''&amp;lt;code&amp;gt;/var&amp;lt;/code&amp;gt;''' et '''&amp;lt;code&amp;gt;/home&amp;lt;/code&amp;gt;''' sont correctement montées sur les répertoires associés et qu'il n'y a pas de problème d'espace disque.&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== &amp;lt;big&amp;gt;'''Configuration Reseau'''&amp;lt;/big&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
Tout d'abord nous avons modifier le fichier /etc/xen/SE4.Elf pour y ajouter une nouvelle interface sur le bridge de la promotion SE4.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Afin d’assurer une connectivité IPv6 stable et routée pour un accès direct à Internet, ainsi qu’une communication efficace avec la machine mandataire, nous avons modifié le fichier '''&amp;lt;code&amp;gt;/etc/network/interfaces&amp;lt;/code&amp;gt;'''. De plus, une adresse IPv4 fixe a été attribuée sur le réseau privé afin de garantir une interaction optimale entre les machines de services et leur machine mandataire.&lt;br /&gt;
&lt;br /&gt;
=== '''Mise a jour du fichier'''  /etc/network/interfaces ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
# Interface loopback&lt;br /&gt;
auto lo&lt;br /&gt;
iface lo inet loopback&lt;br /&gt;
&lt;br /&gt;
# Interface principale (eth0) - IPv4 statique + IPv6 automatique&lt;br /&gt;
auto eth0&lt;br /&gt;
iface eth0 inet static&lt;br /&gt;
    address 192.168.50.12&lt;br /&gt;
    netmask 255.255.255.254  # /24 &lt;br /&gt;
    gateway 192.168.50.1     # @mandataire&lt;br /&gt;
&lt;br /&gt;
iface eth0 inet6 auto  # Attribution automatique d'une IPv6&lt;br /&gt;
&lt;br /&gt;
# Interface secondaire (eth1) - IPv6 automatique uniquement&lt;br /&gt;
auto eth1&lt;br /&gt;
iface eth1 inet6 auto&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Il faut ensuite aciver l'interface en faisan'''t  ifdown eth0 &amp;amp;&amp;amp; ifup eth0''' et puis  '''ifdown eth1 &amp;amp;&amp;amp; ifup eth1''' aprés faire le '''systemctl restart networking''' pour mettre a jour les configurations du reseau.&lt;br /&gt;
&lt;br /&gt;
Les commandes : &lt;br /&gt;
&lt;br /&gt;
* ip route show : pour afficher la table de routage.&lt;br /&gt;
* ip -4 addr show : pour afficher l'adresse ipv4   #'''''192.168.50.12'''''&lt;br /&gt;
* ip -6 addr show : pour afficher l'adresse ipv6   #'''''2001:660:4401:60a0:216:3eff:fe83:a3c8'''''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Grace a toute ses configurations, nous pouvons faire un ping sur la machine mandataire RockStar et sur la machine de service Kasav &lt;br /&gt;
&lt;br /&gt;
==  '''Serveur SSH''' ==&lt;br /&gt;
Notre machine virtuelle doit etre accessible par SSH, on autorise donc l'accès par l'utilisateur '''Root en modifiant le fichier de de configuration &amp;lt;code&amp;gt;/etc/ssh/sshd_config  :&amp;lt;/code&amp;gt;'''&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
PermitRootLogin yes&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Il faut ensuite redemarrer le serveur ssh en faisant :&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/etc/ssh# /etc/init.d/ssh restart&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Pour gérer la redirection du SSH, on doit configurer '''nftables''' sur nos machines de service en redirigeant les ports 2201 et 2202&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
nft add table ip nat&lt;br /&gt;
nft add chain ip nat PREROUTING { type nat hook prerouting priority 0 \; }&lt;br /&gt;
nft add rule ip nat PREROUTING tcp dport 2201 dnat to 192.168.50.12:22                 &lt;br /&gt;
nft add rule ip nat PREROUTING tcp dport 2202 dnat to 192.168.50.3:22              &lt;br /&gt;
nft add chain ip nat POSTROUTING { type nat hook postrouting priority 100 \; }&lt;br /&gt;
nft add rule ip nat POSTROUTING masquerade&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Maintenant, on peut se connecter en SSH sur les machiches virtuelles de services:  De Elf, on peut se connecter a Kasav&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/# ssh root@192.168.50.3&lt;br /&gt;
root@192.168.50.3's password: &lt;br /&gt;
Linux Kasav 4.19.0-26-amd64 #1 SMP Debian 4.19.304-1 (2024-01-09) x86_64&lt;br /&gt;
&lt;br /&gt;
The programs included with the Devuan GNU/Linux system are free software;&lt;br /&gt;
the exact distribution terms for each program are described in the&lt;br /&gt;
individual files in /usr/share/doc/*/copyright.&lt;br /&gt;
&lt;br /&gt;
Devuan GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent&lt;br /&gt;
permitted by applicable law.&lt;br /&gt;
Last login: Tue Feb  3 11:34:45 2026 from 192.168.50.12&lt;br /&gt;
root@Kasav:~# &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Serveur DNS''' ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
$TTL 86400&lt;br /&gt;
@ IN SOA ns1.elvis21.tech. admin.elvis21.tech. (&lt;br /&gt;
        3298267246      ;Version&lt;br /&gt;
        3600            ;Refresh&lt;br /&gt;
        1800            ;Retry&lt;br /&gt;
        604800          ;Expire&lt;br /&gt;
        86400 )         ;Minimum TTL&lt;br /&gt;
;&lt;br /&gt;
@  IN NS ns1.elvis21.tech.&lt;br /&gt;
&lt;br /&gt;
ns1 IN A 192.168.50.12&lt;br /&gt;
ns2 IN A 192.168.50.1&lt;br /&gt;
 IN A 192.168.50.12&lt;br /&gt;
      IN AAAA 2001:660:4401:60a0:216:3eff:fe83:a3c8&lt;br /&gt;
www IN A 192.168.50.12&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/etc/bind# cat named.conf.local &lt;br /&gt;
zone &amp;quot;elvis21.tech&amp;quot; {&lt;br /&gt;
    type primary;&lt;br /&gt;
    file &amp;quot;/etc/bind/zones/db.elvis21.tech&amp;quot;;&lt;br /&gt;
    allow-transfer {&lt;br /&gt;
      2001:660:4401:60a0:216:3eff:fe70:7f1c;&lt;br /&gt;
      2001:660:4401:60a0:216:3eff:fe9a:ea1c;&lt;br /&gt;
      };&lt;br /&gt;
    also-notify { 2001:660:4401:60a0:216:3eff:fe70:7f1c; };&lt;br /&gt;
    inline-signing yes;   // DNSSEC automatique&lt;br /&gt;
    key-directory &amp;quot;/etc/bind/keys&amp;quot;; // répertoire des clefs, attention aux droits&lt;br /&gt;
    dnssec-policy &amp;quot;dnssecpolicy&amp;quot;;  // politique pour les clefs de chiffrement&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
zone &amp;quot;kasav.online&amp;quot; {&lt;br /&gt;
    type secondary;&lt;br /&gt;
    file &amp;quot;/etc/bind/backup/db.kasav.online&amp;quot;;&lt;br /&gt;
    primaries { 2001:660:4401:60a0:216:3eff:fe9a:ea1c; };&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
dnssec-policy &amp;quot;dnssecpolicy&amp;quot; {&lt;br /&gt;
  keys {&lt;br /&gt;
    ksk key-directory lifetime unlimited algorithm 13;&lt;br /&gt;
    zsk key-directory lifetime unlimited algorithm 13;&lt;br /&gt;
  };&lt;br /&gt;
  nsec3param;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/etc/bind# named-checkzone elvis21.tech /etc/bind/db.elvis21.tech&lt;br /&gt;
zone elvis21.tech/IN: loaded serial 3298267246&lt;br /&gt;
OK&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
openssl req -nodes -newkey rsa:2048 -sha256 -keyout elvis21.tech.key -out elvis21.csr&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
[[Fichier:ImageDns.png|vignette|994x994px|centré]]&lt;br /&gt;
&lt;br /&gt;
== '''Mise en place du serveur Apache (http et https)''' ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
apt update&lt;br /&gt;
apt install apache2&lt;br /&gt;
systemctl enable --now apache2&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
[[Fichier:Elvis21.tech-DNS.png|gauche|vignette|863x863px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Installation Fail2ban''' ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/# apt install fail2ban &lt;br /&gt;
Installing:                     &lt;br /&gt;
  fail2ban&lt;br /&gt;
&lt;br /&gt;
root@Elf:/# systemctl status fail2ban&lt;br /&gt;
fail2ban.service - Fail2Ban Service&lt;br /&gt;
    Loaded: loaded (/usr/lib/systemd/system/fail2ban.service, disabled)&lt;br /&gt;
    Active: active (running)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/# service fail2ban status                             &lt;br /&gt;
Status of Authentication failure monitor: fail2ban is running.&lt;br /&gt;
 root@Elf:/# fail2ban-client status&lt;br /&gt;
Status&lt;br /&gt;
|- Number of jail:	1&lt;br /&gt;
`- Jail list:	sshd&lt;br /&gt;
&lt;br /&gt;
root@Elf:/# fail2ban-client status sshd&lt;br /&gt;
Status for the jail: sshd&lt;br /&gt;
|- Filter&lt;br /&gt;
|  |- Currently failed:	0&lt;br /&gt;
|  |- Total failed:	0&lt;br /&gt;
|  `- File list:	/var/log/auth.log&lt;br /&gt;
`- Actions&lt;br /&gt;
   |- Currently banned:	0&lt;br /&gt;
   |- Total banned:	0&lt;br /&gt;
   `- Banned IP list:	&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Mise en place du serveur Apache (http et https) ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/# service apache2 status&lt;br /&gt;
apache2 is running.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''WIFI''' ==&lt;br /&gt;
Faire ip link&lt;br /&gt;
&lt;br /&gt;
ensuite sudo airodump-ng wlanx  -- Remplacer x par le numero du wlan present &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
BSSID              PWR  Beacons    #Data, #/s  CH   MB   ENC CIPHER  AUTH ESSID&lt;br /&gt;
04:DA:D2:9C:50:54  -62       23       11    0   4   54e. WEP  WEP         cracotte05                         &lt;br /&gt;
04:DA:D2:9C:50:5A  -61        2        1    0   4   54e. WEP  WEP         cracotte11    &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;sudo airodump-ng wlan1 --bssid 04:DA:D2:9C:50:5A  -c4 --write log_airdump&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
sudo airodump-ng wlan1 --write airdump --bssid 04:DA:D2:9C:50:5A -c4&lt;br /&gt;
17:31:10  Created capture file &amp;quot;airdump-04.cap&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
 CH  4 ][ Elapsed: 39 mins ][ 2026-02-10 18:11 ][ fixed channel wlan1: 13 &lt;br /&gt;
&lt;br /&gt;
 BSSID              PWR RXQ  Beacons    #Data, #/s  CH   MB   ENC CIPHER  AUTH ESSID&lt;br /&gt;
&lt;br /&gt;
 04:DA:D2:9C:50:5A  -58   3     9766    43771   21   4   54e. WEP  WEP         cracotte11                                                                                                   &lt;br /&gt;
&lt;br /&gt;
 BSSID              STATION            PWR    Rate    Lost   Frames  Notes  Probes&lt;br /&gt;
&lt;br /&gt;
 04:DA:D2:9C:50:5A  40:A5:EF:01:2E:FA  -77    0 -48e   127    46300                                                                                                                          &lt;br /&gt;
Quitting...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
aircrack-ng airdump-05.cap &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
           Aircrack-ng 1.7 &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                 [00:25:47] Tested 869 keys (got 34546 IVs)&lt;br /&gt;
                          Got 35002 out of 35000 IVsStarting PTW attack with 35002 KB    depth   byte(vote)&lt;br /&gt;
    0    0/  2   FF(50176) 1C(43520) E6(42752) 3F(42496) B6(42496) &lt;br /&gt;
    1    0/  6   FF(48128) AC(46336) 90(42752) 8E(42496) 04(42240) &lt;br /&gt;
    2    0/  1   BD(50688) 7F(43776) 75(42752) E6(41216) F2(41216) &lt;br /&gt;
    3    9/  3   CE(39936) 05(39680) 5C(39680) 9A(39168) F4(39168) &lt;br /&gt;
    4   41/  4   6C(37376) 1E(37120) 80(37120) 88(37120) A7(37120) &lt;br /&gt;
&lt;br /&gt;
             KEY FOUND! [ FF:FF:FF:FF:FA:BC:12:CB:AE:EE:EE:EE:EE ]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
ssh -oKexAlgorithms=+diffie-hellman-group14-sha1 -oHostKeyAlgorithms=+ssh-rsa -oCiphers=+aes128-cbc admin@172.27.0.1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
C9200-E304&amp;gt;en&lt;br /&gt;
Password: &lt;br /&gt;
C9200-E304#config t&lt;br /&gt;
Enter configuration commands, one per line.  End with CNTL/Z.&lt;br /&gt;
C9200-E304(config)#vlan 28&lt;br /&gt;
C9200-E304(config-vlan)#name PoolEvora&lt;br /&gt;
C9200-E304(config-vlan)#exit &lt;br /&gt;
C9200-E304(config)#exit&lt;br /&gt;
C9200-E304#write&lt;br /&gt;
Building configuration...&lt;br /&gt;
[OK]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
C9200-E304#en&lt;br /&gt;
C9200-E304#config t&lt;br /&gt;
Enter configuration commands, one per line.  End with CNTL/Z.&lt;br /&gt;
C9200-E304(config)#ip dhcp pool PoolEvora  &lt;br /&gt;
C9200-E304(dhcp-config)#network 10.60.11.0 255.255.255.0&lt;br /&gt;
C9200-E304(dhcp-config)#dns-server 193.48.57.172&lt;br /&gt;
C9200-E304(dhcp-config)#default-router 10.60.11.254&lt;br /&gt;
C9200-E304(dhcp-config)#exit&lt;br /&gt;
C9200-E304(config)#exit&lt;br /&gt;
C9200-E304#write&lt;br /&gt;
Building configuration...&lt;br /&gt;
[OK]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
ip dhcp pool PoolTom&lt;br /&gt;
 network 10.60.10.0 255.255.255.0&lt;br /&gt;
 dns-server 193.48.57.168 &lt;br /&gt;
 default-router 10.60.10.254 &lt;br /&gt;
!         &lt;br /&gt;
ip dhcp pool PoolEvora&lt;br /&gt;
 network 10.60.11.0 255.255.255.0&lt;br /&gt;
 dns-server 193.48.57.172 &lt;br /&gt;
 default-router 10.60.11.254 &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;VRRP&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
C9200-E304&amp;gt;en &lt;br /&gt;
Password: &lt;br /&gt;
C9200-E304#config t&lt;br /&gt;
Enter configuration commands, one per line.  End with CNTL/Z.&lt;br /&gt;
C9200-E304(config)#interface vlan 28&lt;br /&gt;
C9200-E304(config-if)#ip address 10.60.11.2 255.255.255.0&lt;br /&gt;
C9200-E304(config-if)#ipv6 address 2001:660:4401:60ab::2/64&lt;br /&gt;
C9200-E304(config-if)#vrrp 28 address-family ipv4        &lt;br /&gt;
C9200-E304(config-if-vrrp)#priority 110&lt;br /&gt;
C9200-E304(config-if-vrrp)#address 10.60.11.1 primary&lt;br /&gt;
C9200-E304(config-if-vrrp)#exit&lt;br /&gt;
C9200-E304(config-if)#exit&lt;br /&gt;
C9200-E304(config)#exit&lt;br /&gt;
C9200-E304#write&lt;br /&gt;
Building configuration...&lt;br /&gt;
[OK]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;WIFI e304&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
ssh admin@172.27.0.4 \&lt;br /&gt;
  -o KexAlgorithms=+diffie-hellman-group1-sha1 \&lt;br /&gt;
  -o HostKeyAlgorithms=+ssh-rsa \&lt;br /&gt;
  -o Ciphers=+aes128-cbc \&lt;br /&gt;
  -o MACs=+hmac-sha1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Vsouopme</name></author>
	</entry>
	<entry>
		<id>https://wiki-se.plil.fr/mediawiki/index.php?title=Atelier_SysRes_SE4_2025/2026_E11&amp;diff=12299</id>
		<title>Atelier SysRes SE4 2025/2026 E11</title>
		<link rel="alternate" type="text/html" href="https://wiki-se.plil.fr/mediawiki/index.php?title=Atelier_SysRes_SE4_2025/2026_E11&amp;diff=12299"/>
		<updated>2026-02-21T19:16:06Z</updated>

		<summary type="html">&lt;p&gt;Vsouopme : /* Serveur SSH */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Projet Virtualisation /Administration Systeme-Réseau - Machine SE4.Elf =&lt;br /&gt;
Dans le cadre de ce projet, nnous avons déployés une infrastructure composée de '''deux machines dédiées aux services''' et d’une '''machine mandataire''', le tout à l’aide de l'environnement  '''Xen.'''&lt;br /&gt;
&lt;br /&gt;
== Création des machines virtuelles ==&lt;br /&gt;
Les machines sont créées  sur le Dom0 '''Capbreton.plil.info''' en faisant un '''ssh root@capbreton.plil.info''' &lt;br /&gt;
&lt;br /&gt;
Sur la capbreton.plil.info, &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
xen create-image --hostname=SE4.Elf --dhcp --dir=/usr/local/xen --size=10G --dist=excalibur --memory=2G --bridge=Styx --force&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; '''Xen-create-image''' :  Commande permettant de créer une nouvelle machine virtuelle Xen&lt;br /&gt;
&lt;br /&gt;
'''--hostname=SE4.Elf :''' Pour le nom de la machine &lt;br /&gt;
&lt;br /&gt;
'''--size=10G''' : La taille du disque &lt;br /&gt;
&lt;br /&gt;
'''--bridge=Styx''' : Le nom du bridge &lt;br /&gt;
&lt;br /&gt;
Par la suite il faut creer un fichier dans le répertoire &amp;lt;code&amp;gt;/etc/network/interfaces.d&amp;lt;/code&amp;gt; du Dom0 pour créer notre pont. (NB: Il faut noter que cette etape on peut la faire avant la creation de notre VM&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
auto Styx&lt;br /&gt;
&lt;br /&gt;
iface Styx inet manual&lt;br /&gt;
   bridge_ports none&lt;br /&gt;
   up ip link set $IFACE up&lt;br /&gt;
   down ip link set $IFACE down&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;La commande '''xen list :''' Affiche les '''machines virtuelles''' (VM) qui sont actuellement gérées par Xen (Elle fait la liste des VM allumée).&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
root@capbreton:~# xen list&lt;br /&gt;
SE4.batman                                 322  2048     1     -b----      37.5&lt;br /&gt;
SE4.Moon                                   326  2048     1     -b----      41.1&lt;br /&gt;
SE4.C2                                     332  1024     1     -b----      18.1&lt;br /&gt;
SE4.Tension                                343  2048     1     -b----       7.8&lt;br /&gt;
SE4.CachyOS                                365  2048     1     -b----      10.2&lt;br /&gt;
SE4.RockStar                               367  2048     1     -b----       6.1&lt;br /&gt;
SE4.Kasav                                  368  2048     1     -b----       5.9&lt;br /&gt;
SE4.Elf                                    369  2048     1     -b----       5.6&lt;br /&gt;
SE4.catwoman                               370  2048     1     -b----       6.1&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;-La commande '''xen create /etc/xen/SE4.Elf.cfg''' permet d'allumer la Machine virtuellle.&lt;br /&gt;
&lt;br /&gt;
-La commande xen '''console SE4.Elf''' permet d'acceder  / de se connecter  a la VM.&lt;br /&gt;
&lt;br /&gt;
-La commande '''xen shutdown''' '''SE4.Elf''' permet d'eteindre la machine virtuelle.&lt;br /&gt;
&lt;br /&gt;
Lors de la tentative de connexion, il y'a une un probleme , pour y remedier,  '''Ctrl + AltGr + ] =&amp;gt; vi =&amp;gt; :q! =&amp;gt; reconnexion'''&lt;br /&gt;
&lt;br /&gt;
Pour voir le mot de passe de la VM, '''cat /var/log/xen-tools/SE4.Elf.log'''&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
Installation Summary&lt;br /&gt;
---------------------&lt;br /&gt;
Hostname        :  SE4.Elf&lt;br /&gt;
Distribution    :  excalibur&lt;br /&gt;
MAC Address     :  00:16:3E:83:A3:C7&lt;br /&gt;
IP Address(es)  :  dynamic&lt;br /&gt;
SSH Fingerprint :  SHA256:IrPhxhB4m1s+eaPaLynS6NlE/HfL78+y3ba3DPuHFQU (DSA)&lt;br /&gt;
SSH Fingerprint :  SHA256:RT+MZtlFxC7BrdYORzOcxDX+SKsJrLzOGWWngX2pKz4 (ECDSA)&lt;br /&gt;
SSH Fingerprint :  SHA256:aLYvYqUPX2Q/J5P0nTpdpMyrFD5xopRqkFKuYb7QUo4 (ED25519)&lt;br /&gt;
SSH Fingerprint :  SHA256:b0ddm9FYx4/losJU8/pE9MXx7102ygkAMjChOvPlNhE (RSA)&lt;br /&gt;
Root Password   :  X&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;- La commande '''vi /etc/hostname''' pour changer le nom de la VM&lt;br /&gt;
&lt;br /&gt;
== '''Configuration de la Machine de Services''' ==&lt;br /&gt;
Il faut creer deux partitions LVM de 10G pour votre machine virtuelle et modifiez le fichier de configuration de la machine virtuelle de services pour faire en sorte que les répertoires &amp;lt;code&amp;gt;/'''var'''&amp;lt;/code&amp;gt; et &amp;lt;code&amp;gt;'''/home'''&amp;lt;/code&amp;gt; de la machine virtuelle soient implantés sur ces partitions LVM&lt;br /&gt;
&lt;br /&gt;
=== '''Création des volumes logiques''' ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
lvcreate -L 10G -n lv_var_SE4Elf &lt;br /&gt;
lvcreate -L 10G -n lv_home_SE4Elf &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
SE4.Poseidon.home lv_home_SE4Elf lv_var_SE4Elf  SE4.Gaby.home SE4.Poseidon.var SE4.Gaby.var &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Apres nous avons modifié le fichier /etc/xen/SE4.Elf.cfg piur y ajouter deux répertoires&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== '''Création et formatage des partitions''' ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
mkfs -t ext4 /dev/xvdb  # Formatage de la partition pour /var &lt;br /&gt;
mkfs -t ext4 /dev/xvdc  # Formatage de la partition pour /home&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== '''Préparer les partitions et déplacer les données :''' ===&lt;br /&gt;
&lt;br /&gt;
* '''Montage temporaire des partitions dans &amp;lt;code&amp;gt;/mnt&amp;lt;/code&amp;gt; :'''&lt;br /&gt;
&lt;br /&gt;
Pour pouvoir déplacer les données, nous avons du monter les nouvelles partitions LVM dans un répertoire temporaire &amp;lt;code&amp;gt;/mnt&amp;lt;/code&amp;gt;.  On a créé 2 partitions une pour &amp;lt;code&amp;gt;/var&amp;lt;/code&amp;gt; et une &amp;lt;code&amp;gt;/home&amp;lt;/code&amp;gt; sous les noms xvdb et xvdc dans  &amp;lt;code&amp;gt;/dev&amp;lt;/code&amp;gt;  ,que l'on monte avec  :&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
mount /dev/xvdb /mnt&lt;br /&gt;
mount /dev/xvdc /mnt&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* '''Déplacement des fichiers existants'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
mv /var/* /mnt # Déplacement des fichiers de /var vers la nouvelle partition&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== '''Démonter les partitions temporaires :''' ===&lt;br /&gt;
Avant de configurer les montages permanents, on démonte les partitions des répertoires temporaires (&amp;lt;code&amp;gt;/mnt&amp;lt;/code&amp;gt;)&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
umount /mnt # Démontage après transfert des données&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== '''Modification du fichier &amp;lt;code&amp;gt;/etc/fstab&amp;lt;/code&amp;gt; pour un montage automatique au démarrage :''' ===&lt;br /&gt;
On modifie le fichier &amp;lt;code&amp;gt;'''/etc/fstab'''&amp;lt;/code&amp;gt;, qui contient la liste des partitions.&lt;br /&gt;
&lt;br /&gt;
Ajout des nouvelles partitions LVM au fichier &amp;lt;code&amp;gt;/etc/fstab&amp;lt;/code&amp;gt; :&lt;br /&gt;
&lt;br /&gt;
* '''/dev/xvdb /var ext4 defaults 0 2'''&lt;br /&gt;
* '''/dev/xvdc /home ext4 defaults 0''' &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
# /etc/fstab: static file system information.&lt;br /&gt;
#&lt;br /&gt;
# &amp;lt;file system&amp;gt; &amp;lt;mount point&amp;gt; &amp;lt;type&amp;gt; &amp;lt;options&amp;gt; &amp;lt;dump&amp;gt; &amp;lt;pass&amp;gt;&lt;br /&gt;
proc             /proc           proc  defaults   0     0&lt;br /&gt;
devpts            /dev/pts       devpts rw,noexec,nosuid,gid=5,mode=620 0 0 /dev/xvda1 none swap sw 0 0&lt;br /&gt;
/dev/xvda1 none swap sw 0 0&lt;br /&gt;
/dev/xvda2 / ext4 noatime,nodiratime,errors=remount-ro 0 1&lt;br /&gt;
/dev/xvdb /var ext4 defaults 0 2 &lt;br /&gt;
/dev/xvdc /home ext4 defaults 0 2&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== '''Monter les partitions définies dans &amp;lt;code&amp;gt;fstab&amp;lt;/code&amp;gt; :''' ===&lt;br /&gt;
Pour monter toutes les partitions définies dans le fichier &amp;lt;code&amp;gt;/etc/fstab&amp;lt;/code&amp;gt;  :&lt;br /&gt;
 mount -a  # Remontage des partitions définies dans fstab&lt;br /&gt;
Cette commande monte toutes les partitions qui ne sont pas encore montées et qui sont définies dans &amp;lt;code&amp;gt;/etc/fstab&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
remet les données dans le fichier déplacer.&lt;br /&gt;
&lt;br /&gt;
Puis, pour appliquer les changement nous avons redémarré la VM en faisant le '''xen shutdown SE4.Elf''' ,  '''xen create /etc/xen/SE4.Elf.cfg''',  '''xen console SE4.Elf'''&lt;br /&gt;
&lt;br /&gt;
=== '''Vérification des partitions montées''' ===&lt;br /&gt;
Après avoir configuré le montage automatique et remonté les partitions, nous devons vérifier que les partitions sont correctement montées. Nous avons utilisé la commande '''&amp;lt;code&amp;gt;df -h&amp;lt;/code&amp;gt;''' pour afficher l'espace disque utilisé et disponible sur les partitions montées.&lt;br /&gt;
&lt;br /&gt;
Cela nous permet de confirmer que les partitions '''&amp;lt;code&amp;gt;/var&amp;lt;/code&amp;gt;''' et '''&amp;lt;code&amp;gt;/home&amp;lt;/code&amp;gt;''' sont correctement montées sur les répertoires associés et qu'il n'y a pas de problème d'espace disque.&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== &amp;lt;big&amp;gt;'''Configuration Reseau'''&amp;lt;/big&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
Tout d'abord nous avons modifier le fichier /etc/xen/SE4.Elf pour y ajouter une nouvelle interface sur le bridge de la promotion SE4.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Afin d’assurer une connectivité IPv6 stable et routée pour un accès direct à Internet, ainsi qu’une communication efficace avec la machine mandataire, nous avons modifié le fichier '''&amp;lt;code&amp;gt;/etc/network/interfaces&amp;lt;/code&amp;gt;'''. De plus, une adresse IPv4 fixe a été attribuée sur le réseau privé afin de garantir une interaction optimale entre les machines de services et leur machine mandataire.&lt;br /&gt;
&lt;br /&gt;
=== '''Mise a jour du fichier'''  /etc/network/interfaces ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
# Interface loopback&lt;br /&gt;
auto lo&lt;br /&gt;
iface lo inet loopback&lt;br /&gt;
&lt;br /&gt;
# Interface principale (eth0) - IPv4 statique + IPv6 automatique&lt;br /&gt;
auto eth0&lt;br /&gt;
iface eth0 inet static&lt;br /&gt;
    address 192.168.50.12&lt;br /&gt;
    netmask 255.255.255.254  # /24 &lt;br /&gt;
    gateway 192.168.50.1     # @mandataire&lt;br /&gt;
&lt;br /&gt;
iface eth0 inet6 auto  # Attribution automatique d'une IPv6&lt;br /&gt;
&lt;br /&gt;
# Interface secondaire (eth1) - IPv6 automatique uniquement&lt;br /&gt;
auto eth1&lt;br /&gt;
iface eth1 inet6 auto&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Il faut ensuite aciver l'interface en faisan'''t  ifdown eth0 &amp;amp;&amp;amp; ifup eth0''' et puis  '''ifdown eth1 &amp;amp;&amp;amp; ifup eth1''' aprés faire le '''systemctl restart networking''' pour mettre a jour les configurations du reseau.&lt;br /&gt;
&lt;br /&gt;
Les commandes : &lt;br /&gt;
&lt;br /&gt;
* ip route show : pour afficher la table de routage.&lt;br /&gt;
* ip -4 addr show : pour afficher l'adresse ipv4   #'''''192.168.50.12'''''&lt;br /&gt;
* ip -6 addr show : pour afficher l'adresse ipv6   #'''''2001:660:4401:60a0:216:3eff:fe83:a3c8'''''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Grace a toute ses configurations, nous pouvons faire un ping sur la machine mandataire RockStar et sur la machine de service Kasav &lt;br /&gt;
&lt;br /&gt;
==  '''Serveur SSH''' ==&lt;br /&gt;
Notre machine virtuelle doit etre accessible par SSH, on autorise donc l'accès par l'utilisateur '''Root en modifiant le fichier de de configuration &amp;lt;code&amp;gt;/etc/ssh/sshd_config  :&amp;lt;/code&amp;gt;'''&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
PermitRootLogin yes&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Il faut ensuite redemarrer le serveur ssh en faisant :&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/etc/ssh# /etc/init.d/ssh restart&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Pour gérer la redirection du SSH, on doit configurer '''nftables''' sur nos machines de service en redirigeant les ports 2201 et 2202&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
nft add table ip nat&lt;br /&gt;
nft add chain ip nat PREROUTING { type nat hook prerouting priority 0 \; }&lt;br /&gt;
nft add rule ip nat PREROUTING tcp dport 2201 dnat to 192.168.50.12:22                 &lt;br /&gt;
nft add rule ip nat PREROUTING tcp dport 2202 dnat to 192.168.50.3:22              &lt;br /&gt;
nft add chain ip nat POSTROUTING { type nat hook postrouting priority 100 \; }&lt;br /&gt;
nft add rule ip nat POSTROUTING masquerade&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Maintenant, on peut se connecter en SSH sur les machiches virtuelles de services:  De Elf, on peut se connecter a Kasav&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/# ssh root@192.168.50.3&lt;br /&gt;
root@192.168.50.3's password: &lt;br /&gt;
Linux Kasav 4.19.0-26-amd64 #1 SMP Debian 4.19.304-1 (2024-01-09) x86_64&lt;br /&gt;
&lt;br /&gt;
The programs included with the Devuan GNU/Linux system are free software;&lt;br /&gt;
the exact distribution terms for each program are described in the&lt;br /&gt;
individual files in /usr/share/doc/*/copyright.&lt;br /&gt;
&lt;br /&gt;
Devuan GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent&lt;br /&gt;
permitted by applicable law.&lt;br /&gt;
Last login: Tue Feb  3 11:34:45 2026 from 192.168.50.12&lt;br /&gt;
root@Kasav:~# &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Serveur DNS''' ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
$TTL 86400&lt;br /&gt;
@ IN SOA ns1.elvis21.tech. admin.elvis21.tech. (&lt;br /&gt;
        3298267246      ;Version&lt;br /&gt;
        3600            ;Refresh&lt;br /&gt;
        1800            ;Retry&lt;br /&gt;
        604800          ;Expire&lt;br /&gt;
        86400 )         ;Minimum TTL&lt;br /&gt;
;&lt;br /&gt;
@  IN NS ns1.elvis21.tech.&lt;br /&gt;
&lt;br /&gt;
ns1 IN A 192.168.50.12&lt;br /&gt;
ns2 IN A 192.168.50.1&lt;br /&gt;
 IN A 192.168.50.12&lt;br /&gt;
      IN AAAA 2001:660:4401:60a0:216:3eff:fe83:a3c8&lt;br /&gt;
www IN A 192.168.50.12&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/etc/bind# cat named.conf.local &lt;br /&gt;
zone &amp;quot;elvis21.tech&amp;quot; {&lt;br /&gt;
    type primary;&lt;br /&gt;
    file &amp;quot;/etc/bind/zones/db.elvis21.tech&amp;quot;;&lt;br /&gt;
    allow-transfer {&lt;br /&gt;
      2001:660:4401:60a0:216:3eff:fe70:7f1c;&lt;br /&gt;
      2001:660:4401:60a0:216:3eff:fe9a:ea1c;&lt;br /&gt;
      };&lt;br /&gt;
    also-notify { 2001:660:4401:60a0:216:3eff:fe70:7f1c; };&lt;br /&gt;
    inline-signing yes;   // DNSSEC automatique&lt;br /&gt;
    key-directory &amp;quot;/etc/bind/keys&amp;quot;; // répertoire des clefs, attention aux droits&lt;br /&gt;
    dnssec-policy &amp;quot;dnssecpolicy&amp;quot;;  // politique pour les clefs de chiffrement&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
zone &amp;quot;kasav.online&amp;quot; {&lt;br /&gt;
    type secondary;&lt;br /&gt;
    file &amp;quot;/etc/bind/backup/db.kasav.online&amp;quot;;&lt;br /&gt;
    primaries { 2001:660:4401:60a0:216:3eff:fe9a:ea1c; };&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
dnssec-policy &amp;quot;dnssecpolicy&amp;quot; {&lt;br /&gt;
  keys {&lt;br /&gt;
    ksk key-directory lifetime unlimited algorithm 13;&lt;br /&gt;
    zsk key-directory lifetime unlimited algorithm 13;&lt;br /&gt;
  };&lt;br /&gt;
  nsec3param;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/etc/bind# named-checkzone elvis21.tech /etc/bind/db.elvis21.tech&lt;br /&gt;
zone elvis21.tech/IN: loaded serial 3298267246&lt;br /&gt;
OK&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
openssl req -nodes -newkey rsa:2048 -sha256 -keyout elvis21.tech.key -out elvis21.csr&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
[[Fichier:ImageDns.png|vignette|994x994px|centré]]&lt;br /&gt;
&lt;br /&gt;
== '''Mise en place du serveur Apache (http et https)''' ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
apt update&lt;br /&gt;
apt install apache2&lt;br /&gt;
systemctl enable --now apache2&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
[[Fichier:Elvis21.tech-DNS.png|gauche|vignette|863x863px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Installation Fail2ban''' ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/# apt install fail2ban &lt;br /&gt;
Installing:                     &lt;br /&gt;
  fail2ban&lt;br /&gt;
&lt;br /&gt;
root@Elf:/# systemctl status fail2ban&lt;br /&gt;
fail2ban.service - Fail2Ban Service&lt;br /&gt;
    Loaded: loaded (/usr/lib/systemd/system/fail2ban.service, disabled)&lt;br /&gt;
    Active: active (running)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/# service fail2ban status                             &lt;br /&gt;
Status of Authentication failure monitor: fail2ban is running.&lt;br /&gt;
 root@Elf:/# fail2ban-client status&lt;br /&gt;
Status&lt;br /&gt;
|- Number of jail:	1&lt;br /&gt;
`- Jail list:	sshd&lt;br /&gt;
&lt;br /&gt;
root@Elf:/# fail2ban-client status sshd&lt;br /&gt;
Status for the jail: sshd&lt;br /&gt;
|- Filter&lt;br /&gt;
|  |- Currently failed:	0&lt;br /&gt;
|  |- Total failed:	0&lt;br /&gt;
|  `- File list:	/var/log/auth.log&lt;br /&gt;
`- Actions&lt;br /&gt;
   |- Currently banned:	0&lt;br /&gt;
   |- Total banned:	0&lt;br /&gt;
   `- Banned IP list:	&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Mise en place du serveur Apache (http et https) ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/# service apache2 status&lt;br /&gt;
apache2 is running.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''WIFI''' ==&lt;br /&gt;
Faire ip link&lt;br /&gt;
&lt;br /&gt;
ensuite sudo airodump-ng wlanx  -- Remplacer x par le numero du wlan present &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
BSSID              PWR  Beacons    #Data, #/s  CH   MB   ENC CIPHER  AUTH ESSID&lt;br /&gt;
04:DA:D2:9C:50:54  -62       23       11    0   4   54e. WEP  WEP         cracotte05                         &lt;br /&gt;
04:DA:D2:9C:50:5A  -61        2        1    0   4   54e. WEP  WEP         cracotte11    &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;sudo airodump-ng wlan1 --bssid 04:DA:D2:9C:50:5A  -c4 --write log_airdump&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
sudo airodump-ng wlan1 --write airdump --bssid 04:DA:D2:9C:50:5A -c4&lt;br /&gt;
17:31:10  Created capture file &amp;quot;airdump-04.cap&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
 CH  4 ][ Elapsed: 39 mins ][ 2026-02-10 18:11 ][ fixed channel wlan1: 13 &lt;br /&gt;
&lt;br /&gt;
 BSSID              PWR RXQ  Beacons    #Data, #/s  CH   MB   ENC CIPHER  AUTH ESSID&lt;br /&gt;
&lt;br /&gt;
 04:DA:D2:9C:50:5A  -58   3     9766    43771   21   4   54e. WEP  WEP         cracotte11                                                                                                   &lt;br /&gt;
&lt;br /&gt;
 BSSID              STATION            PWR    Rate    Lost   Frames  Notes  Probes&lt;br /&gt;
&lt;br /&gt;
 04:DA:D2:9C:50:5A  40:A5:EF:01:2E:FA  -77    0 -48e   127    46300                                                                                                                          &lt;br /&gt;
Quitting...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
aircrack-ng airdump-05.cap &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
           Aircrack-ng 1.7 &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                 [00:25:47] Tested 869 keys (got 34546 IVs)&lt;br /&gt;
                          Got 35002 out of 35000 IVsStarting PTW attack with 35002 KB    depth   byte(vote)&lt;br /&gt;
    0    0/  2   FF(50176) 1C(43520) E6(42752) 3F(42496) B6(42496) &lt;br /&gt;
    1    0/  6   FF(48128) AC(46336) 90(42752) 8E(42496) 04(42240) &lt;br /&gt;
    2    0/  1   BD(50688) 7F(43776) 75(42752) E6(41216) F2(41216) &lt;br /&gt;
    3    9/  3   CE(39936) 05(39680) 5C(39680) 9A(39168) F4(39168) &lt;br /&gt;
    4   41/  4   6C(37376) 1E(37120) 80(37120) 88(37120) A7(37120) &lt;br /&gt;
&lt;br /&gt;
             KEY FOUND! [ FF:FF:FF:FF:FA:BC:12:CB:AE:EE:EE:EE:EE ]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
ssh -oKexAlgorithms=+diffie-hellman-group14-sha1 -oHostKeyAlgorithms=+ssh-rsa -oCiphers=+aes128-cbc admin@172.27.0.1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
C9200-E304&amp;gt;en&lt;br /&gt;
Password: &lt;br /&gt;
C9200-E304#config t&lt;br /&gt;
Enter configuration commands, one per line.  End with CNTL/Z.&lt;br /&gt;
C9200-E304(config)#vlan 28&lt;br /&gt;
C9200-E304(config-vlan)#name PoolEvora&lt;br /&gt;
C9200-E304(config-vlan)#exit &lt;br /&gt;
C9200-E304(config)#exit&lt;br /&gt;
C9200-E304#write&lt;br /&gt;
Building configuration...&lt;br /&gt;
[OK]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
C9200-E304#en&lt;br /&gt;
C9200-E304#config t&lt;br /&gt;
Enter configuration commands, one per line.  End with CNTL/Z.&lt;br /&gt;
C9200-E304(config)#ip dhcp pool PoolEvora  &lt;br /&gt;
C9200-E304(dhcp-config)#network 10.60.11.0 255.255.255.0&lt;br /&gt;
C9200-E304(dhcp-config)#dns-server 193.48.57.172&lt;br /&gt;
C9200-E304(dhcp-config)#default-router 10.60.11.254&lt;br /&gt;
C9200-E304(dhcp-config)#exit&lt;br /&gt;
C9200-E304(config)#exit&lt;br /&gt;
C9200-E304#write&lt;br /&gt;
Building configuration...&lt;br /&gt;
[OK]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
ip dhcp pool PoolTom&lt;br /&gt;
 network 10.60.10.0 255.255.255.0&lt;br /&gt;
 dns-server 193.48.57.168 &lt;br /&gt;
 default-router 10.60.10.254 &lt;br /&gt;
!         &lt;br /&gt;
ip dhcp pool PoolEvora&lt;br /&gt;
 network 10.60.11.0 255.255.255.0&lt;br /&gt;
 dns-server 193.48.57.172 &lt;br /&gt;
 default-router 10.60.11.254 &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;VRRP&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
C9200-E304&amp;gt;en &lt;br /&gt;
Password: &lt;br /&gt;
C9200-E304#config t&lt;br /&gt;
Enter configuration commands, one per line.  End with CNTL/Z.&lt;br /&gt;
C9200-E304(config)#interface vlan 28&lt;br /&gt;
C9200-E304(config-if)#ip address 10.60.11.2 255.255.255.0&lt;br /&gt;
C9200-E304(config-if)#ipv6 address 2001:660:4401:60ab::2/64&lt;br /&gt;
C9200-E304(config-if)#vrrp 28 address-family ipv4        &lt;br /&gt;
C9200-E304(config-if-vrrp)#priority 110&lt;br /&gt;
C9200-E304(config-if-vrrp)#address 10.60.11.1 primary&lt;br /&gt;
C9200-E304(config-if-vrrp)#exit&lt;br /&gt;
C9200-E304(config-if)#exit&lt;br /&gt;
C9200-E304(config)#exit&lt;br /&gt;
C9200-E304#write&lt;br /&gt;
Building configuration...&lt;br /&gt;
[OK]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;WIFI e304&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
ssh admin@172.27.0.4 \&lt;br /&gt;
  -o KexAlgorithms=+diffie-hellman-group1-sha1 \&lt;br /&gt;
  -o HostKeyAlgorithms=+ssh-rsa \&lt;br /&gt;
  -o Ciphers=+aes128-cbc \&lt;br /&gt;
  -o MACs=+hmac-sha1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Vsouopme</name></author>
	</entry>
	<entry>
		<id>https://wiki-se.plil.fr/mediawiki/index.php?title=Atelier_SysRes_SE4_2025/2026_E11&amp;diff=12298</id>
		<title>Atelier SysRes SE4 2025/2026 E11</title>
		<link rel="alternate" type="text/html" href="https://wiki-se.plil.fr/mediawiki/index.php?title=Atelier_SysRes_SE4_2025/2026_E11&amp;diff=12298"/>
		<updated>2026-02-21T19:05:38Z</updated>

		<summary type="html">&lt;p&gt;Vsouopme : /* Mise a jour du fichier  /etc/network/interfaces */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Projet Virtualisation /Administration Systeme-Réseau - Machine SE4.Elf =&lt;br /&gt;
Dans le cadre de ce projet, nnous avons déployés une infrastructure composée de '''deux machines dédiées aux services''' et d’une '''machine mandataire''', le tout à l’aide de l'environnement  '''Xen.'''&lt;br /&gt;
&lt;br /&gt;
== Création des machines virtuelles ==&lt;br /&gt;
Les machines sont créées  sur le Dom0 '''Capbreton.plil.info''' en faisant un '''ssh root@capbreton.plil.info''' &lt;br /&gt;
&lt;br /&gt;
Sur la capbreton.plil.info, &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
xen create-image --hostname=SE4.Elf --dhcp --dir=/usr/local/xen --size=10G --dist=excalibur --memory=2G --bridge=Styx --force&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; '''Xen-create-image''' :  Commande permettant de créer une nouvelle machine virtuelle Xen&lt;br /&gt;
&lt;br /&gt;
'''--hostname=SE4.Elf :''' Pour le nom de la machine &lt;br /&gt;
&lt;br /&gt;
'''--size=10G''' : La taille du disque &lt;br /&gt;
&lt;br /&gt;
'''--bridge=Styx''' : Le nom du bridge &lt;br /&gt;
&lt;br /&gt;
Par la suite il faut creer un fichier dans le répertoire &amp;lt;code&amp;gt;/etc/network/interfaces.d&amp;lt;/code&amp;gt; du Dom0 pour créer notre pont. (NB: Il faut noter que cette etape on peut la faire avant la creation de notre VM&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
auto Styx&lt;br /&gt;
&lt;br /&gt;
iface Styx inet manual&lt;br /&gt;
   bridge_ports none&lt;br /&gt;
   up ip link set $IFACE up&lt;br /&gt;
   down ip link set $IFACE down&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;La commande '''xen list :''' Affiche les '''machines virtuelles''' (VM) qui sont actuellement gérées par Xen (Elle fait la liste des VM allumée).&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
root@capbreton:~# xen list&lt;br /&gt;
SE4.batman                                 322  2048     1     -b----      37.5&lt;br /&gt;
SE4.Moon                                   326  2048     1     -b----      41.1&lt;br /&gt;
SE4.C2                                     332  1024     1     -b----      18.1&lt;br /&gt;
SE4.Tension                                343  2048     1     -b----       7.8&lt;br /&gt;
SE4.CachyOS                                365  2048     1     -b----      10.2&lt;br /&gt;
SE4.RockStar                               367  2048     1     -b----       6.1&lt;br /&gt;
SE4.Kasav                                  368  2048     1     -b----       5.9&lt;br /&gt;
SE4.Elf                                    369  2048     1     -b----       5.6&lt;br /&gt;
SE4.catwoman                               370  2048     1     -b----       6.1&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;-La commande '''xen create /etc/xen/SE4.Elf.cfg''' permet d'allumer la Machine virtuellle.&lt;br /&gt;
&lt;br /&gt;
-La commande xen '''console SE4.Elf''' permet d'acceder  / de se connecter  a la VM.&lt;br /&gt;
&lt;br /&gt;
-La commande '''xen shutdown''' '''SE4.Elf''' permet d'eteindre la machine virtuelle.&lt;br /&gt;
&lt;br /&gt;
Lors de la tentative de connexion, il y'a une un probleme , pour y remedier,  '''Ctrl + AltGr + ] =&amp;gt; vi =&amp;gt; :q! =&amp;gt; reconnexion'''&lt;br /&gt;
&lt;br /&gt;
Pour voir le mot de passe de la VM, '''cat /var/log/xen-tools/SE4.Elf.log'''&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
Installation Summary&lt;br /&gt;
---------------------&lt;br /&gt;
Hostname        :  SE4.Elf&lt;br /&gt;
Distribution    :  excalibur&lt;br /&gt;
MAC Address     :  00:16:3E:83:A3:C7&lt;br /&gt;
IP Address(es)  :  dynamic&lt;br /&gt;
SSH Fingerprint :  SHA256:IrPhxhB4m1s+eaPaLynS6NlE/HfL78+y3ba3DPuHFQU (DSA)&lt;br /&gt;
SSH Fingerprint :  SHA256:RT+MZtlFxC7BrdYORzOcxDX+SKsJrLzOGWWngX2pKz4 (ECDSA)&lt;br /&gt;
SSH Fingerprint :  SHA256:aLYvYqUPX2Q/J5P0nTpdpMyrFD5xopRqkFKuYb7QUo4 (ED25519)&lt;br /&gt;
SSH Fingerprint :  SHA256:b0ddm9FYx4/losJU8/pE9MXx7102ygkAMjChOvPlNhE (RSA)&lt;br /&gt;
Root Password   :  X&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;- La commande '''vi /etc/hostname''' pour changer le nom de la VM&lt;br /&gt;
&lt;br /&gt;
== '''Configuration de la Machine de Services''' ==&lt;br /&gt;
Il faut creer deux partitions LVM de 10G pour votre machine virtuelle et modifiez le fichier de configuration de la machine virtuelle de services pour faire en sorte que les répertoires &amp;lt;code&amp;gt;/'''var'''&amp;lt;/code&amp;gt; et &amp;lt;code&amp;gt;'''/home'''&amp;lt;/code&amp;gt; de la machine virtuelle soient implantés sur ces partitions LVM&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
SE4.Poseidon.home lv_home_SE4Elf lv_var_SE4Elf  SE4.Gaby.home SE4.Poseidon.var SE4.Gaby.var &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Apres nous avons modifié le fichier /etc/xen/SE4.Elf.cfg piur y ajouter deux répertoires&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== '''Création et formatage des partitions''' ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
mkfs -t ext4 /dev/xvdb  # Formatage de la partition pour /var &lt;br /&gt;
mkfs -t ext4 /dev/xvdc  # Formatage de la partition pour /home&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== '''Préparer les partitions et déplacer les données :''' ===&lt;br /&gt;
&lt;br /&gt;
* '''Montage temporaire des partitions dans &amp;lt;code&amp;gt;/mnt&amp;lt;/code&amp;gt; :'''&lt;br /&gt;
&lt;br /&gt;
Pour pouvoir déplacer les données, nous avons du monter les nouvelles partitions LVM dans un répertoire temporaire &amp;lt;code&amp;gt;/mnt&amp;lt;/code&amp;gt;.  On a créé 2 partitions une pour &amp;lt;code&amp;gt;/var&amp;lt;/code&amp;gt; et une &amp;lt;code&amp;gt;/home&amp;lt;/code&amp;gt; sous les noms xvdb et xvdc dans  &amp;lt;code&amp;gt;/dev&amp;lt;/code&amp;gt;  ,que l'on monte avec  :&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
mount /dev/xvdb /mnt&lt;br /&gt;
mount /dev/xvdc /mnt&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* '''Déplacement des fichiers existants'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
mv /var/* /mnt # Déplacement des fichiers de /var vers la nouvelle partition&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== '''Démonter les partitions temporaires :''' ===&lt;br /&gt;
Avant de configurer les montages permanents, on démonte les partitions des répertoires temporaires (&amp;lt;code&amp;gt;/mnt&amp;lt;/code&amp;gt;)&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
umount /mnt # Démontage après transfert des données&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== '''Modification du fichier &amp;lt;code&amp;gt;/etc/fstab&amp;lt;/code&amp;gt; pour un montage automatique au démarrage :''' ===&lt;br /&gt;
On modifie le fichier &amp;lt;code&amp;gt;'''/etc/fstab'''&amp;lt;/code&amp;gt;, qui contient la liste des partitions.&lt;br /&gt;
&lt;br /&gt;
Ajout des nouvelles partitions LVM au fichier &amp;lt;code&amp;gt;/etc/fstab&amp;lt;/code&amp;gt; :&lt;br /&gt;
&lt;br /&gt;
* '''/dev/xvdb /var ext4 defaults 0 2'''&lt;br /&gt;
* '''/dev/xvdc /home ext4 defaults 0''' &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
# /etc/fstab: static file system information.&lt;br /&gt;
#&lt;br /&gt;
# &amp;lt;file system&amp;gt; &amp;lt;mount point&amp;gt; &amp;lt;type&amp;gt; &amp;lt;options&amp;gt; &amp;lt;dump&amp;gt; &amp;lt;pass&amp;gt;&lt;br /&gt;
proc             /proc           proc  defaults   0     0&lt;br /&gt;
devpts            /dev/pts       devpts rw,noexec,nosuid,gid=5,mode=620 0 0 /dev/xvda1 none swap sw 0 0&lt;br /&gt;
/dev/xvda1 none swap sw 0 0&lt;br /&gt;
/dev/xvda2 / ext4 noatime,nodiratime,errors=remount-ro 0 1&lt;br /&gt;
/dev/xvdb /var ext4 defaults 0 2 &lt;br /&gt;
/dev/xvdc /home ext4 defaults 0 2&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== '''Monter les partitions définies dans &amp;lt;code&amp;gt;fstab&amp;lt;/code&amp;gt; :''' ===&lt;br /&gt;
Pour monter toutes les partitions définies dans le fichier &amp;lt;code&amp;gt;/etc/fstab&amp;lt;/code&amp;gt;  :&lt;br /&gt;
 mount -a  # Remontage des partitions définies dans fstab&lt;br /&gt;
Cette commande monte toutes les partitions qui ne sont pas encore montées et qui sont définies dans &amp;lt;code&amp;gt;/etc/fstab&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
remet les données dans le fichier déplacer.&lt;br /&gt;
&lt;br /&gt;
Puis, pour appliquer les changement nous avons redémarré la VM en faisant le '''xen shutdown SE4.Elf''' ,  '''xen create /etc/xen/SE4.Elf.cfg''',  '''xen console SE4.Elf'''&lt;br /&gt;
&lt;br /&gt;
=== '''Vérification des partitions montées''' ===&lt;br /&gt;
Après avoir configuré le montage automatique et remonté les partitions, nous devons vérifier que les partitions sont correctement montées. Nous avons utilisé la commande '''&amp;lt;code&amp;gt;df -h&amp;lt;/code&amp;gt;''' pour afficher l'espace disque utilisé et disponible sur les partitions montées.&lt;br /&gt;
&lt;br /&gt;
Cela nous permet de confirmer que les partitions '''&amp;lt;code&amp;gt;/var&amp;lt;/code&amp;gt;''' et '''&amp;lt;code&amp;gt;/home&amp;lt;/code&amp;gt;''' sont correctement montées sur les répertoires associés et qu'il n'y a pas de problème d'espace disque.&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== &amp;lt;big&amp;gt;'''Configuration Reseau'''&amp;lt;/big&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
Tout d'abord nous avons modifier le fichier /etc/xen/SE4.Elf pour y ajouter une nouvelle interface sur le bridge de la promotion SE4.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Afin d’assurer une connectivité IPv6 stable et routée pour un accès direct à Internet, ainsi qu’une communication efficace avec la machine mandataire, nous avons modifié le fichier '''&amp;lt;code&amp;gt;/etc/network/interfaces&amp;lt;/code&amp;gt;'''. De plus, une adresse IPv4 fixe a été attribuée sur le réseau privé afin de garantir une interaction optimale entre les machines de services et leur machine mandataire.&lt;br /&gt;
&lt;br /&gt;
=== '''Mise a jour du fichier'''  /etc/network/interfaces ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
# Interface loopback&lt;br /&gt;
auto lo&lt;br /&gt;
iface lo inet loopback&lt;br /&gt;
&lt;br /&gt;
# Interface principale (eth0) - IPv4 statique + IPv6 automatique&lt;br /&gt;
auto eth0&lt;br /&gt;
iface eth0 inet static&lt;br /&gt;
    address 192.168.50.12&lt;br /&gt;
    netmask 255.255.255.254  # /24 &lt;br /&gt;
    gateway 192.168.50.1     # @mandataire&lt;br /&gt;
&lt;br /&gt;
iface eth0 inet6 auto  # Attribution automatique d'une IPv6&lt;br /&gt;
&lt;br /&gt;
# Interface secondaire (eth1) - IPv6 automatique uniquement&lt;br /&gt;
auto eth1&lt;br /&gt;
iface eth1 inet6 auto&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Il faut ensuite aciver l'interface en faisan'''t  ifdown eth0 &amp;amp;&amp;amp; ifup eth0''' et puis  '''ifdown eth1 &amp;amp;&amp;amp; ifup eth1''' aprés faire le '''systemctl restart networking''' pour mettre a jour les configurations du reseau.&lt;br /&gt;
&lt;br /&gt;
Les commandes : &lt;br /&gt;
&lt;br /&gt;
* ip route show : pour afficher la table de routage.&lt;br /&gt;
* ip -4 addr show : pour afficher l'adresse ipv4   #'''''192.168.50.12'''''&lt;br /&gt;
* ip -6 addr show : pour afficher l'adresse ipv6   #'''''2001:660:4401:60a0:216:3eff:fe83:a3c8'''''&lt;br /&gt;
&lt;br /&gt;
==  '''''Serveur SSH''''' ==&lt;br /&gt;
Notre machine virtuelle doit etre accessible par SSH, on autorise donc l'accès par l'utilisateur '''Root en modifiant le fichier de de configuration &amp;lt;code&amp;gt;/etc/ssh/sshd_config  :&amp;lt;/code&amp;gt;'''&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
PermitRootLogin yes&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Il faut ensuite redemarrer le serveur ssh en faisant :&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/etc/ssh# /etc/init.d/ssh restart&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Pour gérer la redirection du SSH, on doit configurer '''nftables''' sur nos machines de service en redirigeant les ports 2201 et 2202&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
nft add table ip nat&lt;br /&gt;
nft add chain ip nat PREROUTING { type nat hook prerouting priority 0 \; }&lt;br /&gt;
nft add rule ip nat PREROUTING tcp dport 2201 dnat to 192.168.50.12:22                 &lt;br /&gt;
nft add rule ip nat PREROUTING tcp dport 2202 dnat to 192.168.50.3:22              &lt;br /&gt;
nft add chain ip nat POSTROUTING { type nat hook postrouting priority 100 \; }&lt;br /&gt;
nft add rule ip nat POSTROUTING masquerade&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Maintenant, on peut se connecter en SSH sur les machiches virtuelles de services:  De Elf, on peut se connecter a Kasav&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/# ssh root@192.168.50.3&lt;br /&gt;
root@192.168.50.3's password: &lt;br /&gt;
Linux Kasav 4.19.0-26-amd64 #1 SMP Debian 4.19.304-1 (2024-01-09) x86_64&lt;br /&gt;
&lt;br /&gt;
The programs included with the Devuan GNU/Linux system are free software;&lt;br /&gt;
the exact distribution terms for each program are described in the&lt;br /&gt;
individual files in /usr/share/doc/*/copyright.&lt;br /&gt;
&lt;br /&gt;
Devuan GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent&lt;br /&gt;
permitted by applicable law.&lt;br /&gt;
Last login: Tue Feb  3 11:34:45 2026 from 192.168.50.12&lt;br /&gt;
root@Kasav:~# &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Serveur DNS''' ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
$TTL 86400&lt;br /&gt;
@ IN SOA ns1.elvis21.tech. admin.elvis21.tech. (&lt;br /&gt;
        3298267246      ;Version&lt;br /&gt;
        3600            ;Refresh&lt;br /&gt;
        1800            ;Retry&lt;br /&gt;
        604800          ;Expire&lt;br /&gt;
        86400 )         ;Minimum TTL&lt;br /&gt;
;&lt;br /&gt;
@  IN NS ns1.elvis21.tech.&lt;br /&gt;
&lt;br /&gt;
ns1 IN A 192.168.50.12&lt;br /&gt;
ns2 IN A 192.168.50.1&lt;br /&gt;
 IN A 192.168.50.12&lt;br /&gt;
      IN AAAA 2001:660:4401:60a0:216:3eff:fe83:a3c8&lt;br /&gt;
www IN A 192.168.50.12&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/etc/bind# cat named.conf.local &lt;br /&gt;
zone &amp;quot;elvis21.tech&amp;quot; {&lt;br /&gt;
    type primary;&lt;br /&gt;
    file &amp;quot;/etc/bind/zones/db.elvis21.tech&amp;quot;;&lt;br /&gt;
    allow-transfer {&lt;br /&gt;
      2001:660:4401:60a0:216:3eff:fe70:7f1c;&lt;br /&gt;
      2001:660:4401:60a0:216:3eff:fe9a:ea1c;&lt;br /&gt;
      };&lt;br /&gt;
    also-notify { 2001:660:4401:60a0:216:3eff:fe70:7f1c; };&lt;br /&gt;
    inline-signing yes;   // DNSSEC automatique&lt;br /&gt;
    key-directory &amp;quot;/etc/bind/keys&amp;quot;; // répertoire des clefs, attention aux droits&lt;br /&gt;
    dnssec-policy &amp;quot;dnssecpolicy&amp;quot;;  // politique pour les clefs de chiffrement&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
zone &amp;quot;kasav.online&amp;quot; {&lt;br /&gt;
    type secondary;&lt;br /&gt;
    file &amp;quot;/etc/bind/backup/db.kasav.online&amp;quot;;&lt;br /&gt;
    primaries { 2001:660:4401:60a0:216:3eff:fe9a:ea1c; };&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
dnssec-policy &amp;quot;dnssecpolicy&amp;quot; {&lt;br /&gt;
  keys {&lt;br /&gt;
    ksk key-directory lifetime unlimited algorithm 13;&lt;br /&gt;
    zsk key-directory lifetime unlimited algorithm 13;&lt;br /&gt;
  };&lt;br /&gt;
  nsec3param;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/etc/bind# named-checkzone elvis21.tech /etc/bind/db.elvis21.tech&lt;br /&gt;
zone elvis21.tech/IN: loaded serial 3298267246&lt;br /&gt;
OK&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
openssl req -nodes -newkey rsa:2048 -sha256 -keyout elvis21.tech.key -out elvis21.csr&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
[[Fichier:ImageDns.png|vignette|994x994px|centré]]&lt;br /&gt;
&lt;br /&gt;
== '''Mise en place du serveur Apache (http et https)''' ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
apt update&lt;br /&gt;
apt install apache2&lt;br /&gt;
systemctl enable --now apache2&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
[[Fichier:Elvis21.tech-DNS.png|gauche|vignette|863x863px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Installation Fail2ban''' ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/# apt install fail2ban &lt;br /&gt;
Installing:                     &lt;br /&gt;
  fail2ban&lt;br /&gt;
&lt;br /&gt;
root@Elf:/# systemctl status fail2ban&lt;br /&gt;
fail2ban.service - Fail2Ban Service&lt;br /&gt;
    Loaded: loaded (/usr/lib/systemd/system/fail2ban.service, disabled)&lt;br /&gt;
    Active: active (running)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/# service fail2ban status                             &lt;br /&gt;
Status of Authentication failure monitor: fail2ban is running.&lt;br /&gt;
 root@Elf:/# fail2ban-client status&lt;br /&gt;
Status&lt;br /&gt;
|- Number of jail:	1&lt;br /&gt;
`- Jail list:	sshd&lt;br /&gt;
&lt;br /&gt;
root@Elf:/# fail2ban-client status sshd&lt;br /&gt;
Status for the jail: sshd&lt;br /&gt;
|- Filter&lt;br /&gt;
|  |- Currently failed:	0&lt;br /&gt;
|  |- Total failed:	0&lt;br /&gt;
|  `- File list:	/var/log/auth.log&lt;br /&gt;
`- Actions&lt;br /&gt;
   |- Currently banned:	0&lt;br /&gt;
   |- Total banned:	0&lt;br /&gt;
   `- Banned IP list:	&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Mise en place du serveur Apache (http et https) ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/# service apache2 status&lt;br /&gt;
apache2 is running.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''WIFI''' ==&lt;br /&gt;
Faire ip link&lt;br /&gt;
&lt;br /&gt;
ensuite sudo airodump-ng wlanx  -- Remplacer x par le numero du wlan present &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
BSSID              PWR  Beacons    #Data, #/s  CH   MB   ENC CIPHER  AUTH ESSID&lt;br /&gt;
04:DA:D2:9C:50:54  -62       23       11    0   4   54e. WEP  WEP         cracotte05                         &lt;br /&gt;
04:DA:D2:9C:50:5A  -61        2        1    0   4   54e. WEP  WEP         cracotte11    &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;sudo airodump-ng wlan1 --bssid 04:DA:D2:9C:50:5A  -c4 --write log_airdump&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
sudo airodump-ng wlan1 --write airdump --bssid 04:DA:D2:9C:50:5A -c4&lt;br /&gt;
17:31:10  Created capture file &amp;quot;airdump-04.cap&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
 CH  4 ][ Elapsed: 39 mins ][ 2026-02-10 18:11 ][ fixed channel wlan1: 13 &lt;br /&gt;
&lt;br /&gt;
 BSSID              PWR RXQ  Beacons    #Data, #/s  CH   MB   ENC CIPHER  AUTH ESSID&lt;br /&gt;
&lt;br /&gt;
 04:DA:D2:9C:50:5A  -58   3     9766    43771   21   4   54e. WEP  WEP         cracotte11                                                                                                   &lt;br /&gt;
&lt;br /&gt;
 BSSID              STATION            PWR    Rate    Lost   Frames  Notes  Probes&lt;br /&gt;
&lt;br /&gt;
 04:DA:D2:9C:50:5A  40:A5:EF:01:2E:FA  -77    0 -48e   127    46300                                                                                                                          &lt;br /&gt;
Quitting...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
aircrack-ng airdump-05.cap &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
           Aircrack-ng 1.7 &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                 [00:25:47] Tested 869 keys (got 34546 IVs)&lt;br /&gt;
                          Got 35002 out of 35000 IVsStarting PTW attack with 35002 KB    depth   byte(vote)&lt;br /&gt;
    0    0/  2   FF(50176) 1C(43520) E6(42752) 3F(42496) B6(42496) &lt;br /&gt;
    1    0/  6   FF(48128) AC(46336) 90(42752) 8E(42496) 04(42240) &lt;br /&gt;
    2    0/  1   BD(50688) 7F(43776) 75(42752) E6(41216) F2(41216) &lt;br /&gt;
    3    9/  3   CE(39936) 05(39680) 5C(39680) 9A(39168) F4(39168) &lt;br /&gt;
    4   41/  4   6C(37376) 1E(37120) 80(37120) 88(37120) A7(37120) &lt;br /&gt;
&lt;br /&gt;
             KEY FOUND! [ FF:FF:FF:FF:FA:BC:12:CB:AE:EE:EE:EE:EE ]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
ssh -oKexAlgorithms=+diffie-hellman-group14-sha1 -oHostKeyAlgorithms=+ssh-rsa -oCiphers=+aes128-cbc admin@172.27.0.1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
C9200-E304&amp;gt;en&lt;br /&gt;
Password: &lt;br /&gt;
C9200-E304#config t&lt;br /&gt;
Enter configuration commands, one per line.  End with CNTL/Z.&lt;br /&gt;
C9200-E304(config)#vlan 28&lt;br /&gt;
C9200-E304(config-vlan)#name PoolEvora&lt;br /&gt;
C9200-E304(config-vlan)#exit &lt;br /&gt;
C9200-E304(config)#exit&lt;br /&gt;
C9200-E304#write&lt;br /&gt;
Building configuration...&lt;br /&gt;
[OK]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
C9200-E304#en&lt;br /&gt;
C9200-E304#config t&lt;br /&gt;
Enter configuration commands, one per line.  End with CNTL/Z.&lt;br /&gt;
C9200-E304(config)#ip dhcp pool PoolEvora  &lt;br /&gt;
C9200-E304(dhcp-config)#network 10.60.11.0 255.255.255.0&lt;br /&gt;
C9200-E304(dhcp-config)#dns-server 193.48.57.172&lt;br /&gt;
C9200-E304(dhcp-config)#default-router 10.60.11.254&lt;br /&gt;
C9200-E304(dhcp-config)#exit&lt;br /&gt;
C9200-E304(config)#exit&lt;br /&gt;
C9200-E304#write&lt;br /&gt;
Building configuration...&lt;br /&gt;
[OK]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
ip dhcp pool PoolTom&lt;br /&gt;
 network 10.60.10.0 255.255.255.0&lt;br /&gt;
 dns-server 193.48.57.168 &lt;br /&gt;
 default-router 10.60.10.254 &lt;br /&gt;
!         &lt;br /&gt;
ip dhcp pool PoolEvora&lt;br /&gt;
 network 10.60.11.0 255.255.255.0&lt;br /&gt;
 dns-server 193.48.57.172 &lt;br /&gt;
 default-router 10.60.11.254 &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;VRRP&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
C9200-E304&amp;gt;en &lt;br /&gt;
Password: &lt;br /&gt;
C9200-E304#config t&lt;br /&gt;
Enter configuration commands, one per line.  End with CNTL/Z.&lt;br /&gt;
C9200-E304(config)#interface vlan 28&lt;br /&gt;
C9200-E304(config-if)#ip address 10.60.11.2 255.255.255.0&lt;br /&gt;
C9200-E304(config-if)#ipv6 address 2001:660:4401:60ab::2/64&lt;br /&gt;
C9200-E304(config-if)#vrrp 28 address-family ipv4        &lt;br /&gt;
C9200-E304(config-if-vrrp)#priority 110&lt;br /&gt;
C9200-E304(config-if-vrrp)#address 10.60.11.1 primary&lt;br /&gt;
C9200-E304(config-if-vrrp)#exit&lt;br /&gt;
C9200-E304(config-if)#exit&lt;br /&gt;
C9200-E304(config)#exit&lt;br /&gt;
C9200-E304#write&lt;br /&gt;
Building configuration...&lt;br /&gt;
[OK]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;WIFI e304&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
ssh admin@172.27.0.4 \&lt;br /&gt;
  -o KexAlgorithms=+diffie-hellman-group1-sha1 \&lt;br /&gt;
  -o HostKeyAlgorithms=+ssh-rsa \&lt;br /&gt;
  -o Ciphers=+aes128-cbc \&lt;br /&gt;
  -o MACs=+hmac-sha1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Vsouopme</name></author>
	</entry>
	<entry>
		<id>https://wiki-se.plil.fr/mediawiki/index.php?title=Atelier_SysRes_SE4_2025/2026_E11&amp;diff=12297</id>
		<title>Atelier SysRes SE4 2025/2026 E11</title>
		<link rel="alternate" type="text/html" href="https://wiki-se.plil.fr/mediawiki/index.php?title=Atelier_SysRes_SE4_2025/2026_E11&amp;diff=12297"/>
		<updated>2026-02-21T18:18:48Z</updated>

		<summary type="html">&lt;p&gt;Vsouopme : /* Configuration Reseau */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Projet Virtualisation /Administration Systeme-Réseau - Machine SE4.Elf =&lt;br /&gt;
Dans le cadre de ce projet, nnous avons déployés une infrastructure composée de '''deux machines dédiées aux services''' et d’une '''machine mandataire''', le tout à l’aide de l'environnement  '''Xen.'''&lt;br /&gt;
&lt;br /&gt;
== Création des machines virtuelles ==&lt;br /&gt;
Les machines sont créées  sur le Dom0 '''Capbreton.plil.info''' en faisant un '''ssh root@capbreton.plil.info''' &lt;br /&gt;
&lt;br /&gt;
Sur la capbreton.plil.info, &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
xen create-image --hostname=SE4.Elf --dhcp --dir=/usr/local/xen --size=10G --dist=excalibur --memory=2G --bridge=Styx --force&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; '''Xen-create-image''' :  Commande permettant de créer une nouvelle machine virtuelle Xen&lt;br /&gt;
&lt;br /&gt;
'''--hostname=SE4.Elf :''' Pour le nom de la machine &lt;br /&gt;
&lt;br /&gt;
'''--size=10G''' : La taille du disque &lt;br /&gt;
&lt;br /&gt;
'''--bridge=Styx''' : Le nom du bridge &lt;br /&gt;
&lt;br /&gt;
Par la suite il faut creer un fichier dans le répertoire &amp;lt;code&amp;gt;/etc/network/interfaces.d&amp;lt;/code&amp;gt; du Dom0 pour créer notre pont. (NB: Il faut noter que cette etape on peut la faire avant la creation de notre VM&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
auto Styx&lt;br /&gt;
&lt;br /&gt;
iface Styx inet manual&lt;br /&gt;
   bridge_ports none&lt;br /&gt;
   up ip link set $IFACE up&lt;br /&gt;
   down ip link set $IFACE down&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;La commande '''xen list :''' Affiche les '''machines virtuelles''' (VM) qui sont actuellement gérées par Xen (Elle fait la liste des VM allumée).&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
root@capbreton:~# xen list&lt;br /&gt;
SE4.batman                                 322  2048     1     -b----      37.5&lt;br /&gt;
SE4.Moon                                   326  2048     1     -b----      41.1&lt;br /&gt;
SE4.C2                                     332  1024     1     -b----      18.1&lt;br /&gt;
SE4.Tension                                343  2048     1     -b----       7.8&lt;br /&gt;
SE4.CachyOS                                365  2048     1     -b----      10.2&lt;br /&gt;
SE4.RockStar                               367  2048     1     -b----       6.1&lt;br /&gt;
SE4.Kasav                                  368  2048     1     -b----       5.9&lt;br /&gt;
SE4.Elf                                    369  2048     1     -b----       5.6&lt;br /&gt;
SE4.catwoman                               370  2048     1     -b----       6.1&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;-La commande '''xen create /etc/xen/SE4.Elf.cfg''' permet d'allumer la Machine virtuellle.&lt;br /&gt;
&lt;br /&gt;
-La commande xen '''console SE4.Elf''' permet d'acceder  / de se connecter  a la VM.&lt;br /&gt;
&lt;br /&gt;
-La commande '''xen shutdown''' '''SE4.Elf''' permet d'eteindre la machine virtuelle.&lt;br /&gt;
&lt;br /&gt;
Lors de la tentative de connexion, il y'a une un probleme , pour y remedier,  '''Ctrl + AltGr + ] =&amp;gt; vi =&amp;gt; :q! =&amp;gt; reconnexion'''&lt;br /&gt;
&lt;br /&gt;
Pour voir le mot de passe de la VM, '''cat /var/log/xen-tools/SE4.Elf.log'''&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
Installation Summary&lt;br /&gt;
---------------------&lt;br /&gt;
Hostname        :  SE4.Elf&lt;br /&gt;
Distribution    :  excalibur&lt;br /&gt;
MAC Address     :  00:16:3E:83:A3:C7&lt;br /&gt;
IP Address(es)  :  dynamic&lt;br /&gt;
SSH Fingerprint :  SHA256:IrPhxhB4m1s+eaPaLynS6NlE/HfL78+y3ba3DPuHFQU (DSA)&lt;br /&gt;
SSH Fingerprint :  SHA256:RT+MZtlFxC7BrdYORzOcxDX+SKsJrLzOGWWngX2pKz4 (ECDSA)&lt;br /&gt;
SSH Fingerprint :  SHA256:aLYvYqUPX2Q/J5P0nTpdpMyrFD5xopRqkFKuYb7QUo4 (ED25519)&lt;br /&gt;
SSH Fingerprint :  SHA256:b0ddm9FYx4/losJU8/pE9MXx7102ygkAMjChOvPlNhE (RSA)&lt;br /&gt;
Root Password   :  X&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;- La commande '''vi /etc/hostname''' pour changer le nom de la VM&lt;br /&gt;
&lt;br /&gt;
== '''Configuration de la Machine de Services''' ==&lt;br /&gt;
Il faut creer deux partitions LVM de 10G pour votre machine virtuelle et modifiez le fichier de configuration de la machine virtuelle de services pour faire en sorte que les répertoires &amp;lt;code&amp;gt;/'''var'''&amp;lt;/code&amp;gt; et &amp;lt;code&amp;gt;'''/home'''&amp;lt;/code&amp;gt; de la machine virtuelle soient implantés sur ces partitions LVM&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
SE4.Poseidon.home lv_home_SE4Elf lv_var_SE4Elf  SE4.Gaby.home SE4.Poseidon.var SE4.Gaby.var &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Apres nous avons modifié le fichier /etc/xen/SE4.Elf.cfg piur y ajouter deux répertoires&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== '''Création et formatage des partitions''' ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
mkfs -t ext4 /dev/xvdb  # Formatage de la partition pour /var &lt;br /&gt;
mkfs -t ext4 /dev/xvdc  # Formatage de la partition pour /home&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== '''Préparer les partitions et déplacer les données :''' ===&lt;br /&gt;
&lt;br /&gt;
* '''Montage temporaire des partitions dans &amp;lt;code&amp;gt;/mnt&amp;lt;/code&amp;gt; :'''&lt;br /&gt;
&lt;br /&gt;
Pour pouvoir déplacer les données, nous avons du monter les nouvelles partitions LVM dans un répertoire temporaire &amp;lt;code&amp;gt;/mnt&amp;lt;/code&amp;gt;.  On a créé 2 partitions une pour &amp;lt;code&amp;gt;/var&amp;lt;/code&amp;gt; et une &amp;lt;code&amp;gt;/home&amp;lt;/code&amp;gt; sous les noms xvdb et xvdc dans  &amp;lt;code&amp;gt;/dev&amp;lt;/code&amp;gt;  ,que l'on monte avec  :&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
mount /dev/xvdb /mnt&lt;br /&gt;
mount /dev/xvdc /mnt&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* '''Déplacement des fichiers existants'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
mv /var/* /mnt # Déplacement des fichiers de /var vers la nouvelle partition&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== '''Démonter les partitions temporaires :''' ===&lt;br /&gt;
Avant de configurer les montages permanents, on démonte les partitions des répertoires temporaires (&amp;lt;code&amp;gt;/mnt&amp;lt;/code&amp;gt;)&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
umount /mnt # Démontage après transfert des données&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== '''Modification du fichier &amp;lt;code&amp;gt;/etc/fstab&amp;lt;/code&amp;gt; pour un montage automatique au démarrage :''' ===&lt;br /&gt;
On modifie le fichier &amp;lt;code&amp;gt;'''/etc/fstab'''&amp;lt;/code&amp;gt;, qui contient la liste des partitions.&lt;br /&gt;
&lt;br /&gt;
Ajout des nouvelles partitions LVM au fichier &amp;lt;code&amp;gt;/etc/fstab&amp;lt;/code&amp;gt; :&lt;br /&gt;
&lt;br /&gt;
* '''/dev/xvdb /var ext4 defaults 0 2'''&lt;br /&gt;
* '''/dev/xvdc /home ext4 defaults 0''' &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
# /etc/fstab: static file system information.&lt;br /&gt;
#&lt;br /&gt;
# &amp;lt;file system&amp;gt; &amp;lt;mount point&amp;gt; &amp;lt;type&amp;gt; &amp;lt;options&amp;gt; &amp;lt;dump&amp;gt; &amp;lt;pass&amp;gt;&lt;br /&gt;
proc             /proc           proc  defaults   0     0&lt;br /&gt;
devpts            /dev/pts       devpts rw,noexec,nosuid,gid=5,mode=620 0 0 /dev/xvda1 none swap sw 0 0&lt;br /&gt;
/dev/xvda1 none swap sw 0 0&lt;br /&gt;
/dev/xvda2 / ext4 noatime,nodiratime,errors=remount-ro 0 1&lt;br /&gt;
/dev/xvdb /var ext4 defaults 0 2 &lt;br /&gt;
/dev/xvdc /home ext4 defaults 0 2&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== '''Monter les partitions définies dans &amp;lt;code&amp;gt;fstab&amp;lt;/code&amp;gt; :''' ===&lt;br /&gt;
Pour monter toutes les partitions définies dans le fichier &amp;lt;code&amp;gt;/etc/fstab&amp;lt;/code&amp;gt;  :&lt;br /&gt;
 mount -a  # Remontage des partitions définies dans fstab&lt;br /&gt;
Cette commande monte toutes les partitions qui ne sont pas encore montées et qui sont définies dans &amp;lt;code&amp;gt;/etc/fstab&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
remet les données dans le fichier déplacer.&lt;br /&gt;
&lt;br /&gt;
Puis, pour appliquer les changement nous avons redémarré la VM en faisant le '''xen shutdown SE4.Elf''' ,  '''xen create /etc/xen/SE4.Elf.cfg''',  '''xen console SE4.Elf'''&lt;br /&gt;
&lt;br /&gt;
=== '''Vérification des partitions montées''' ===&lt;br /&gt;
Après avoir configuré le montage automatique et remonté les partitions, nous devons vérifier que les partitions sont correctement montées. Nous avons utilisé la commande '''&amp;lt;code&amp;gt;df -h&amp;lt;/code&amp;gt;''' pour afficher l'espace disque utilisé et disponible sur les partitions montées.&lt;br /&gt;
&lt;br /&gt;
Cela nous permet de confirmer que les partitions '''&amp;lt;code&amp;gt;/var&amp;lt;/code&amp;gt;''' et '''&amp;lt;code&amp;gt;/home&amp;lt;/code&amp;gt;''' sont correctement montées sur les répertoires associés et qu'il n'y a pas de problème d'espace disque.&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== &amp;lt;big&amp;gt;'''Configuration Reseau'''&amp;lt;/big&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
Tout d'abord nous avons modifier le fichier /etc/xen/SE4.Elf pour y ajouter une nouvelle interface sur le bridge de la promotion SE4.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Afin d’assurer une connectivité IPv6 stable et routée pour un accès direct à Internet, ainsi qu’une communication efficace avec la machine mandataire, nous avons modifié le fichier '''&amp;lt;code&amp;gt;/etc/network/interfaces&amp;lt;/code&amp;gt;'''. De plus, une adresse IPv4 fixe a été attribuée sur le réseau privé afin de garantir une interaction optimale entre les machines de services et leur machine mandataire.&lt;br /&gt;
&lt;br /&gt;
=== '''Mise a jour du fichier'''  /etc/network/interfaces ===&lt;br /&gt;
&lt;br /&gt;
== '''Serveur SSH''' ==&lt;br /&gt;
Notre machine virtuelle doit etre accessible par SSH, on autorise donc l'accès par l'utilisateur '''Root en modifiant le fichier de de configuration &amp;lt;code&amp;gt;/etc/ssh/sshd_config  :&amp;lt;/code&amp;gt;'''&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
PermitRootLogin yes&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Il faut ensuite redemarrer le serveur ssh en faisant :&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/etc/ssh# /etc/init.d/ssh restart&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Pour gérer la redirection du SSH, on doit configurer '''nftables''' sur nos machines de service en redirigeant les ports 2201 et 2202&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
nft add table ip nat&lt;br /&gt;
nft add chain ip nat PREROUTING { type nat hook prerouting priority 0 \; }&lt;br /&gt;
nft add rule ip nat PREROUTING tcp dport 2201 dnat to 192.168.50.12:22                 &lt;br /&gt;
nft add rule ip nat PREROUTING tcp dport 2202 dnat to 192.168.50.3:22              &lt;br /&gt;
nft add chain ip nat POSTROUTING { type nat hook postrouting priority 100 \; }&lt;br /&gt;
nft add rule ip nat POSTROUTING masquerade&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Maintenant, on peut se connecter en SSH sur les machiches virtuelles de services:  De Elf, on peut se connecter a Kasav&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/# ssh root@192.168.50.3&lt;br /&gt;
root@192.168.50.3's password: &lt;br /&gt;
Linux Kasav 4.19.0-26-amd64 #1 SMP Debian 4.19.304-1 (2024-01-09) x86_64&lt;br /&gt;
&lt;br /&gt;
The programs included with the Devuan GNU/Linux system are free software;&lt;br /&gt;
the exact distribution terms for each program are described in the&lt;br /&gt;
individual files in /usr/share/doc/*/copyright.&lt;br /&gt;
&lt;br /&gt;
Devuan GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent&lt;br /&gt;
permitted by applicable law.&lt;br /&gt;
Last login: Tue Feb  3 11:34:45 2026 from 192.168.50.12&lt;br /&gt;
root@Kasav:~# &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Serveur DNS''' ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
$TTL 86400&lt;br /&gt;
@ IN SOA ns1.elvis21.tech. admin.elvis21.tech. (&lt;br /&gt;
        3298267246      ;Version&lt;br /&gt;
        3600            ;Refresh&lt;br /&gt;
        1800            ;Retry&lt;br /&gt;
        604800          ;Expire&lt;br /&gt;
        86400 )         ;Minimum TTL&lt;br /&gt;
;&lt;br /&gt;
@  IN NS ns1.elvis21.tech.&lt;br /&gt;
&lt;br /&gt;
ns1 IN A 192.168.50.12&lt;br /&gt;
ns2 IN A 192.168.50.1&lt;br /&gt;
 IN A 192.168.50.12&lt;br /&gt;
      IN AAAA 2001:660:4401:60a0:216:3eff:fe83:a3c8&lt;br /&gt;
www IN A 192.168.50.12&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/etc/bind# cat named.conf.local &lt;br /&gt;
zone &amp;quot;elvis21.tech&amp;quot; {&lt;br /&gt;
    type primary;&lt;br /&gt;
    file &amp;quot;/etc/bind/zones/db.elvis21.tech&amp;quot;;&lt;br /&gt;
    allow-transfer {&lt;br /&gt;
      2001:660:4401:60a0:216:3eff:fe70:7f1c;&lt;br /&gt;
      2001:660:4401:60a0:216:3eff:fe9a:ea1c;&lt;br /&gt;
      };&lt;br /&gt;
    also-notify { 2001:660:4401:60a0:216:3eff:fe70:7f1c; };&lt;br /&gt;
    inline-signing yes;   // DNSSEC automatique&lt;br /&gt;
    key-directory &amp;quot;/etc/bind/keys&amp;quot;; // répertoire des clefs, attention aux droits&lt;br /&gt;
    dnssec-policy &amp;quot;dnssecpolicy&amp;quot;;  // politique pour les clefs de chiffrement&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
zone &amp;quot;kasav.online&amp;quot; {&lt;br /&gt;
    type secondary;&lt;br /&gt;
    file &amp;quot;/etc/bind/backup/db.kasav.online&amp;quot;;&lt;br /&gt;
    primaries { 2001:660:4401:60a0:216:3eff:fe9a:ea1c; };&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
dnssec-policy &amp;quot;dnssecpolicy&amp;quot; {&lt;br /&gt;
  keys {&lt;br /&gt;
    ksk key-directory lifetime unlimited algorithm 13;&lt;br /&gt;
    zsk key-directory lifetime unlimited algorithm 13;&lt;br /&gt;
  };&lt;br /&gt;
  nsec3param;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/etc/bind# named-checkzone elvis21.tech /etc/bind/db.elvis21.tech&lt;br /&gt;
zone elvis21.tech/IN: loaded serial 3298267246&lt;br /&gt;
OK&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
openssl req -nodes -newkey rsa:2048 -sha256 -keyout elvis21.tech.key -out elvis21.csr&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
[[Fichier:ImageDns.png|vignette|994x994px|centré]]&lt;br /&gt;
&lt;br /&gt;
== '''Mise en place du serveur Apache (http et https)''' ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
apt update&lt;br /&gt;
apt install apache2&lt;br /&gt;
systemctl enable --now apache2&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
[[Fichier:Elvis21.tech-DNS.png|gauche|vignette|863x863px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Installation Fail2ban''' ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/# apt install fail2ban &lt;br /&gt;
Installing:                     &lt;br /&gt;
  fail2ban&lt;br /&gt;
&lt;br /&gt;
root@Elf:/# systemctl status fail2ban&lt;br /&gt;
fail2ban.service - Fail2Ban Service&lt;br /&gt;
    Loaded: loaded (/usr/lib/systemd/system/fail2ban.service, disabled)&lt;br /&gt;
    Active: active (running)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/# service fail2ban status                             &lt;br /&gt;
Status of Authentication failure monitor: fail2ban is running.&lt;br /&gt;
 root@Elf:/# fail2ban-client status&lt;br /&gt;
Status&lt;br /&gt;
|- Number of jail:	1&lt;br /&gt;
`- Jail list:	sshd&lt;br /&gt;
&lt;br /&gt;
root@Elf:/# fail2ban-client status sshd&lt;br /&gt;
Status for the jail: sshd&lt;br /&gt;
|- Filter&lt;br /&gt;
|  |- Currently failed:	0&lt;br /&gt;
|  |- Total failed:	0&lt;br /&gt;
|  `- File list:	/var/log/auth.log&lt;br /&gt;
`- Actions&lt;br /&gt;
   |- Currently banned:	0&lt;br /&gt;
   |- Total banned:	0&lt;br /&gt;
   `- Banned IP list:	&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Mise en place du serveur Apache (http et https) ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/# service apache2 status&lt;br /&gt;
apache2 is running.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''WIFI''' ==&lt;br /&gt;
Faire ip link&lt;br /&gt;
&lt;br /&gt;
ensuite sudo airodump-ng wlanx  -- Remplacer x par le numero du wlan present &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
BSSID              PWR  Beacons    #Data, #/s  CH   MB   ENC CIPHER  AUTH ESSID&lt;br /&gt;
04:DA:D2:9C:50:54  -62       23       11    0   4   54e. WEP  WEP         cracotte05                         &lt;br /&gt;
04:DA:D2:9C:50:5A  -61        2        1    0   4   54e. WEP  WEP         cracotte11    &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;sudo airodump-ng wlan1 --bssid 04:DA:D2:9C:50:5A  -c4 --write log_airdump&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
sudo airodump-ng wlan1 --write airdump --bssid 04:DA:D2:9C:50:5A -c4&lt;br /&gt;
17:31:10  Created capture file &amp;quot;airdump-04.cap&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
 CH  4 ][ Elapsed: 39 mins ][ 2026-02-10 18:11 ][ fixed channel wlan1: 13 &lt;br /&gt;
&lt;br /&gt;
 BSSID              PWR RXQ  Beacons    #Data, #/s  CH   MB   ENC CIPHER  AUTH ESSID&lt;br /&gt;
&lt;br /&gt;
 04:DA:D2:9C:50:5A  -58   3     9766    43771   21   4   54e. WEP  WEP         cracotte11                                                                                                   &lt;br /&gt;
&lt;br /&gt;
 BSSID              STATION            PWR    Rate    Lost   Frames  Notes  Probes&lt;br /&gt;
&lt;br /&gt;
 04:DA:D2:9C:50:5A  40:A5:EF:01:2E:FA  -77    0 -48e   127    46300                                                                                                                          &lt;br /&gt;
Quitting...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
aircrack-ng airdump-05.cap &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
           Aircrack-ng 1.7 &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                 [00:25:47] Tested 869 keys (got 34546 IVs)&lt;br /&gt;
                          Got 35002 out of 35000 IVsStarting PTW attack with 35002 KB    depth   byte(vote)&lt;br /&gt;
    0    0/  2   FF(50176) 1C(43520) E6(42752) 3F(42496) B6(42496) &lt;br /&gt;
    1    0/  6   FF(48128) AC(46336) 90(42752) 8E(42496) 04(42240) &lt;br /&gt;
    2    0/  1   BD(50688) 7F(43776) 75(42752) E6(41216) F2(41216) &lt;br /&gt;
    3    9/  3   CE(39936) 05(39680) 5C(39680) 9A(39168) F4(39168) &lt;br /&gt;
    4   41/  4   6C(37376) 1E(37120) 80(37120) 88(37120) A7(37120) &lt;br /&gt;
&lt;br /&gt;
             KEY FOUND! [ FF:FF:FF:FF:FA:BC:12:CB:AE:EE:EE:EE:EE ]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
ssh -oKexAlgorithms=+diffie-hellman-group14-sha1 -oHostKeyAlgorithms=+ssh-rsa -oCiphers=+aes128-cbc admin@172.27.0.1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
C9200-E304&amp;gt;en&lt;br /&gt;
Password: &lt;br /&gt;
C9200-E304#config t&lt;br /&gt;
Enter configuration commands, one per line.  End with CNTL/Z.&lt;br /&gt;
C9200-E304(config)#vlan 28&lt;br /&gt;
C9200-E304(config-vlan)#name PoolEvora&lt;br /&gt;
C9200-E304(config-vlan)#exit &lt;br /&gt;
C9200-E304(config)#exit&lt;br /&gt;
C9200-E304#write&lt;br /&gt;
Building configuration...&lt;br /&gt;
[OK]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
C9200-E304#en&lt;br /&gt;
C9200-E304#config t&lt;br /&gt;
Enter configuration commands, one per line.  End with CNTL/Z.&lt;br /&gt;
C9200-E304(config)#ip dhcp pool PoolEvora  &lt;br /&gt;
C9200-E304(dhcp-config)#network 10.60.11.0 255.255.255.0&lt;br /&gt;
C9200-E304(dhcp-config)#dns-server 193.48.57.172&lt;br /&gt;
C9200-E304(dhcp-config)#default-router 10.60.11.254&lt;br /&gt;
C9200-E304(dhcp-config)#exit&lt;br /&gt;
C9200-E304(config)#exit&lt;br /&gt;
C9200-E304#write&lt;br /&gt;
Building configuration...&lt;br /&gt;
[OK]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
ip dhcp pool PoolTom&lt;br /&gt;
 network 10.60.10.0 255.255.255.0&lt;br /&gt;
 dns-server 193.48.57.168 &lt;br /&gt;
 default-router 10.60.10.254 &lt;br /&gt;
!         &lt;br /&gt;
ip dhcp pool PoolEvora&lt;br /&gt;
 network 10.60.11.0 255.255.255.0&lt;br /&gt;
 dns-server 193.48.57.172 &lt;br /&gt;
 default-router 10.60.11.254 &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;VRRP&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
C9200-E304&amp;gt;en &lt;br /&gt;
Password: &lt;br /&gt;
C9200-E304#config t&lt;br /&gt;
Enter configuration commands, one per line.  End with CNTL/Z.&lt;br /&gt;
C9200-E304(config)#interface vlan 28&lt;br /&gt;
C9200-E304(config-if)#ip address 10.60.11.2 255.255.255.0&lt;br /&gt;
C9200-E304(config-if)#ipv6 address 2001:660:4401:60ab::2/64&lt;br /&gt;
C9200-E304(config-if)#vrrp 28 address-family ipv4        &lt;br /&gt;
C9200-E304(config-if-vrrp)#priority 110&lt;br /&gt;
C9200-E304(config-if-vrrp)#address 10.60.11.1 primary&lt;br /&gt;
C9200-E304(config-if-vrrp)#exit&lt;br /&gt;
C9200-E304(config-if)#exit&lt;br /&gt;
C9200-E304(config)#exit&lt;br /&gt;
C9200-E304#write&lt;br /&gt;
Building configuration...&lt;br /&gt;
[OK]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;WIFI e304&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
ssh admin@172.27.0.4 \&lt;br /&gt;
  -o KexAlgorithms=+diffie-hellman-group1-sha1 \&lt;br /&gt;
  -o HostKeyAlgorithms=+ssh-rsa \&lt;br /&gt;
  -o Ciphers=+aes128-cbc \&lt;br /&gt;
  -o MACs=+hmac-sha1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Vsouopme</name></author>
	</entry>
	<entry>
		<id>https://wiki-se.plil.fr/mediawiki/index.php?title=Atelier_SysRes_SE4_2025/2026_E11&amp;diff=12296</id>
		<title>Atelier SysRes SE4 2025/2026 E11</title>
		<link rel="alternate" type="text/html" href="https://wiki-se.plil.fr/mediawiki/index.php?title=Atelier_SysRes_SE4_2025/2026_E11&amp;diff=12296"/>
		<updated>2026-02-21T18:15:42Z</updated>

		<summary type="html">&lt;p&gt;Vsouopme : /* Configuration Reseau */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Projet Virtualisation /Administration Systeme-Réseau - Machine SE4.Elf =&lt;br /&gt;
Dans le cadre de ce projet, nnous avons déployés une infrastructure composée de '''deux machines dédiées aux services''' et d’une '''machine mandataire''', le tout à l’aide de l'environnement  '''Xen.'''&lt;br /&gt;
&lt;br /&gt;
== Création des machines virtuelles ==&lt;br /&gt;
Les machines sont créées  sur le Dom0 '''Capbreton.plil.info''' en faisant un '''ssh root@capbreton.plil.info''' &lt;br /&gt;
&lt;br /&gt;
Sur la capbreton.plil.info, &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
xen create-image --hostname=SE4.Elf --dhcp --dir=/usr/local/xen --size=10G --dist=excalibur --memory=2G --bridge=Styx --force&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; '''Xen-create-image''' :  Commande permettant de créer une nouvelle machine virtuelle Xen&lt;br /&gt;
&lt;br /&gt;
'''--hostname=SE4.Elf :''' Pour le nom de la machine &lt;br /&gt;
&lt;br /&gt;
'''--size=10G''' : La taille du disque &lt;br /&gt;
&lt;br /&gt;
'''--bridge=Styx''' : Le nom du bridge &lt;br /&gt;
&lt;br /&gt;
Par la suite il faut creer un fichier dans le répertoire &amp;lt;code&amp;gt;/etc/network/interfaces.d&amp;lt;/code&amp;gt; du Dom0 pour créer notre pont. (NB: Il faut noter que cette etape on peut la faire avant la creation de notre VM&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
auto Styx&lt;br /&gt;
&lt;br /&gt;
iface Styx inet manual&lt;br /&gt;
   bridge_ports none&lt;br /&gt;
   up ip link set $IFACE up&lt;br /&gt;
   down ip link set $IFACE down&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;La commande '''xen list :''' Affiche les '''machines virtuelles''' (VM) qui sont actuellement gérées par Xen (Elle fait la liste des VM allumée).&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
root@capbreton:~# xen list&lt;br /&gt;
SE4.batman                                 322  2048     1     -b----      37.5&lt;br /&gt;
SE4.Moon                                   326  2048     1     -b----      41.1&lt;br /&gt;
SE4.C2                                     332  1024     1     -b----      18.1&lt;br /&gt;
SE4.Tension                                343  2048     1     -b----       7.8&lt;br /&gt;
SE4.CachyOS                                365  2048     1     -b----      10.2&lt;br /&gt;
SE4.RockStar                               367  2048     1     -b----       6.1&lt;br /&gt;
SE4.Kasav                                  368  2048     1     -b----       5.9&lt;br /&gt;
SE4.Elf                                    369  2048     1     -b----       5.6&lt;br /&gt;
SE4.catwoman                               370  2048     1     -b----       6.1&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;-La commande '''xen create /etc/xen/SE4.Elf.cfg''' permet d'allumer la Machine virtuellle.&lt;br /&gt;
&lt;br /&gt;
-La commande xen '''console SE4.Elf''' permet d'acceder  / de se connecter  a la VM.&lt;br /&gt;
&lt;br /&gt;
-La commande '''xen shutdown''' '''SE4.Elf''' permet d'eteindre la machine virtuelle.&lt;br /&gt;
&lt;br /&gt;
Lors de la tentative de connexion, il y'a une un probleme , pour y remedier,  '''Ctrl + AltGr + ] =&amp;gt; vi =&amp;gt; :q! =&amp;gt; reconnexion'''&lt;br /&gt;
&lt;br /&gt;
Pour voir le mot de passe de la VM, '''cat /var/log/xen-tools/SE4.Elf.log'''&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
Installation Summary&lt;br /&gt;
---------------------&lt;br /&gt;
Hostname        :  SE4.Elf&lt;br /&gt;
Distribution    :  excalibur&lt;br /&gt;
MAC Address     :  00:16:3E:83:A3:C7&lt;br /&gt;
IP Address(es)  :  dynamic&lt;br /&gt;
SSH Fingerprint :  SHA256:IrPhxhB4m1s+eaPaLynS6NlE/HfL78+y3ba3DPuHFQU (DSA)&lt;br /&gt;
SSH Fingerprint :  SHA256:RT+MZtlFxC7BrdYORzOcxDX+SKsJrLzOGWWngX2pKz4 (ECDSA)&lt;br /&gt;
SSH Fingerprint :  SHA256:aLYvYqUPX2Q/J5P0nTpdpMyrFD5xopRqkFKuYb7QUo4 (ED25519)&lt;br /&gt;
SSH Fingerprint :  SHA256:b0ddm9FYx4/losJU8/pE9MXx7102ygkAMjChOvPlNhE (RSA)&lt;br /&gt;
Root Password   :  X&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;- La commande '''vi /etc/hostname''' pour changer le nom de la VM&lt;br /&gt;
&lt;br /&gt;
== '''Configuration de la Machine de Services''' ==&lt;br /&gt;
Il faut creer deux partitions LVM de 10G pour votre machine virtuelle et modifiez le fichier de configuration de la machine virtuelle de services pour faire en sorte que les répertoires &amp;lt;code&amp;gt;/'''var'''&amp;lt;/code&amp;gt; et &amp;lt;code&amp;gt;'''/home'''&amp;lt;/code&amp;gt; de la machine virtuelle soient implantés sur ces partitions LVM&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
SE4.Poseidon.home lv_home_SE4Elf lv_var_SE4Elf  SE4.Gaby.home SE4.Poseidon.var SE4.Gaby.var &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Apres nous avons modifié le fichier /etc/xen/SE4.Elf.cfg piur y ajouter deux répertoires&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== '''Création et formatage des partitions''' ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
mkfs -t ext4 /dev/xvdb  # Formatage de la partition pour /var &lt;br /&gt;
mkfs -t ext4 /dev/xvdc  # Formatage de la partition pour /home&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== '''Préparer les partitions et déplacer les données :''' ===&lt;br /&gt;
&lt;br /&gt;
* '''Montage temporaire des partitions dans &amp;lt;code&amp;gt;/mnt&amp;lt;/code&amp;gt; :'''&lt;br /&gt;
&lt;br /&gt;
Pour pouvoir déplacer les données, nous avons du monter les nouvelles partitions LVM dans un répertoire temporaire &amp;lt;code&amp;gt;/mnt&amp;lt;/code&amp;gt;.  On a créé 2 partitions une pour &amp;lt;code&amp;gt;/var&amp;lt;/code&amp;gt; et une &amp;lt;code&amp;gt;/home&amp;lt;/code&amp;gt; sous les noms xvdb et xvdc dans  &amp;lt;code&amp;gt;/dev&amp;lt;/code&amp;gt;  ,que l'on monte avec  :&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
mount /dev/xvdb /mnt&lt;br /&gt;
mount /dev/xvdc /mnt&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* '''Déplacement des fichiers existants'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
mv /var/* /mnt # Déplacement des fichiers de /var vers la nouvelle partition&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== '''Démonter les partitions temporaires :''' ===&lt;br /&gt;
Avant de configurer les montages permanents, on démonte les partitions des répertoires temporaires (&amp;lt;code&amp;gt;/mnt&amp;lt;/code&amp;gt;)&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
umount /mnt # Démontage après transfert des données&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== '''Modification du fichier &amp;lt;code&amp;gt;/etc/fstab&amp;lt;/code&amp;gt; pour un montage automatique au démarrage :''' ===&lt;br /&gt;
On modifie le fichier &amp;lt;code&amp;gt;'''/etc/fstab'''&amp;lt;/code&amp;gt;, qui contient la liste des partitions.&lt;br /&gt;
&lt;br /&gt;
Ajout des nouvelles partitions LVM au fichier &amp;lt;code&amp;gt;/etc/fstab&amp;lt;/code&amp;gt; :&lt;br /&gt;
&lt;br /&gt;
* '''/dev/xvdb /var ext4 defaults 0 2'''&lt;br /&gt;
* '''/dev/xvdc /home ext4 defaults 0''' &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
# /etc/fstab: static file system information.&lt;br /&gt;
#&lt;br /&gt;
# &amp;lt;file system&amp;gt; &amp;lt;mount point&amp;gt; &amp;lt;type&amp;gt; &amp;lt;options&amp;gt; &amp;lt;dump&amp;gt; &amp;lt;pass&amp;gt;&lt;br /&gt;
proc             /proc           proc  defaults   0     0&lt;br /&gt;
devpts            /dev/pts       devpts rw,noexec,nosuid,gid=5,mode=620 0 0 /dev/xvda1 none swap sw 0 0&lt;br /&gt;
/dev/xvda1 none swap sw 0 0&lt;br /&gt;
/dev/xvda2 / ext4 noatime,nodiratime,errors=remount-ro 0 1&lt;br /&gt;
/dev/xvdb /var ext4 defaults 0 2 &lt;br /&gt;
/dev/xvdc /home ext4 defaults 0 2&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== '''Monter les partitions définies dans &amp;lt;code&amp;gt;fstab&amp;lt;/code&amp;gt; :''' ===&lt;br /&gt;
Pour monter toutes les partitions définies dans le fichier &amp;lt;code&amp;gt;/etc/fstab&amp;lt;/code&amp;gt;  :&lt;br /&gt;
 mount -a  # Remontage des partitions définies dans fstab&lt;br /&gt;
Cette commande monte toutes les partitions qui ne sont pas encore montées et qui sont définies dans &amp;lt;code&amp;gt;/etc/fstab&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
remet les données dans le fichier déplacer.&lt;br /&gt;
&lt;br /&gt;
Puis, pour appliquer les changement nous avons redémarré la VM en faisant le '''xen shutdown SE4.Elf''' ,  '''xen create /etc/xen/SE4.Elf.cfg''',  '''xen console SE4.Elf'''&lt;br /&gt;
&lt;br /&gt;
=== '''Vérification des partitions montées''' ===&lt;br /&gt;
Après avoir configuré le montage automatique et remonté les partitions, nous devons vérifier que les partitions sont correctement montées. Nous avons utilisé la commande '''&amp;lt;code&amp;gt;df -h&amp;lt;/code&amp;gt;''' pour afficher l'espace disque utilisé et disponible sur les partitions montées.&lt;br /&gt;
&lt;br /&gt;
Cela nous permet de confirmer que les partitions '''&amp;lt;code&amp;gt;/var&amp;lt;/code&amp;gt;''' et '''&amp;lt;code&amp;gt;/home&amp;lt;/code&amp;gt;''' sont correctement montées sur les répertoires associés et qu'il n'y a pas de problème d'espace disque.&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== &amp;lt;big&amp;gt;'''Configuration Reseau'''&amp;lt;/big&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
Tout d'abord nous avons modifier le fichier /etc/xen/SE4.Elf pour y ajouter une nouvelle interface sur le bridge de la promotion SE4.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Serveur SSH''' ==&lt;br /&gt;
Notre machine virtuelle doit etre accessible par SSH, on autorise donc l'accès par l'utilisateur '''Root en modifiant le fichier de de configuration &amp;lt;code&amp;gt;/etc/ssh/sshd_config  :&amp;lt;/code&amp;gt;'''&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
PermitRootLogin yes&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Il faut ensuite redemarrer le serveur ssh en faisant :&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/etc/ssh# /etc/init.d/ssh restart&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Pour gérer la redirection du SSH, on doit configurer '''nftables''' sur nos machines de service en redirigeant les ports 2201 et 2202&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
nft add table ip nat&lt;br /&gt;
nft add chain ip nat PREROUTING { type nat hook prerouting priority 0 \; }&lt;br /&gt;
nft add rule ip nat PREROUTING tcp dport 2201 dnat to 192.168.50.12:22                 &lt;br /&gt;
nft add rule ip nat PREROUTING tcp dport 2202 dnat to 192.168.50.3:22              &lt;br /&gt;
nft add chain ip nat POSTROUTING { type nat hook postrouting priority 100 \; }&lt;br /&gt;
nft add rule ip nat POSTROUTING masquerade&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Maintenant, on peut se connecter en SSH sur les machiches virtuelles de services:  De Elf, on peut se connecter a Kasav&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/# ssh root@192.168.50.3&lt;br /&gt;
root@192.168.50.3's password: &lt;br /&gt;
Linux Kasav 4.19.0-26-amd64 #1 SMP Debian 4.19.304-1 (2024-01-09) x86_64&lt;br /&gt;
&lt;br /&gt;
The programs included with the Devuan GNU/Linux system are free software;&lt;br /&gt;
the exact distribution terms for each program are described in the&lt;br /&gt;
individual files in /usr/share/doc/*/copyright.&lt;br /&gt;
&lt;br /&gt;
Devuan GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent&lt;br /&gt;
permitted by applicable law.&lt;br /&gt;
Last login: Tue Feb  3 11:34:45 2026 from 192.168.50.12&lt;br /&gt;
root@Kasav:~# &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Serveur DNS''' ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
$TTL 86400&lt;br /&gt;
@ IN SOA ns1.elvis21.tech. admin.elvis21.tech. (&lt;br /&gt;
        3298267246      ;Version&lt;br /&gt;
        3600            ;Refresh&lt;br /&gt;
        1800            ;Retry&lt;br /&gt;
        604800          ;Expire&lt;br /&gt;
        86400 )         ;Minimum TTL&lt;br /&gt;
;&lt;br /&gt;
@  IN NS ns1.elvis21.tech.&lt;br /&gt;
&lt;br /&gt;
ns1 IN A 192.168.50.12&lt;br /&gt;
ns2 IN A 192.168.50.1&lt;br /&gt;
 IN A 192.168.50.12&lt;br /&gt;
      IN AAAA 2001:660:4401:60a0:216:3eff:fe83:a3c8&lt;br /&gt;
www IN A 192.168.50.12&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/etc/bind# cat named.conf.local &lt;br /&gt;
zone &amp;quot;elvis21.tech&amp;quot; {&lt;br /&gt;
    type primary;&lt;br /&gt;
    file &amp;quot;/etc/bind/zones/db.elvis21.tech&amp;quot;;&lt;br /&gt;
    allow-transfer {&lt;br /&gt;
      2001:660:4401:60a0:216:3eff:fe70:7f1c;&lt;br /&gt;
      2001:660:4401:60a0:216:3eff:fe9a:ea1c;&lt;br /&gt;
      };&lt;br /&gt;
    also-notify { 2001:660:4401:60a0:216:3eff:fe70:7f1c; };&lt;br /&gt;
    inline-signing yes;   // DNSSEC automatique&lt;br /&gt;
    key-directory &amp;quot;/etc/bind/keys&amp;quot;; // répertoire des clefs, attention aux droits&lt;br /&gt;
    dnssec-policy &amp;quot;dnssecpolicy&amp;quot;;  // politique pour les clefs de chiffrement&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
zone &amp;quot;kasav.online&amp;quot; {&lt;br /&gt;
    type secondary;&lt;br /&gt;
    file &amp;quot;/etc/bind/backup/db.kasav.online&amp;quot;;&lt;br /&gt;
    primaries { 2001:660:4401:60a0:216:3eff:fe9a:ea1c; };&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
dnssec-policy &amp;quot;dnssecpolicy&amp;quot; {&lt;br /&gt;
  keys {&lt;br /&gt;
    ksk key-directory lifetime unlimited algorithm 13;&lt;br /&gt;
    zsk key-directory lifetime unlimited algorithm 13;&lt;br /&gt;
  };&lt;br /&gt;
  nsec3param;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/etc/bind# named-checkzone elvis21.tech /etc/bind/db.elvis21.tech&lt;br /&gt;
zone elvis21.tech/IN: loaded serial 3298267246&lt;br /&gt;
OK&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
openssl req -nodes -newkey rsa:2048 -sha256 -keyout elvis21.tech.key -out elvis21.csr&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
[[Fichier:ImageDns.png|vignette|994x994px|centré]]&lt;br /&gt;
&lt;br /&gt;
== '''Mise en place du serveur Apache (http et https)''' ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
apt update&lt;br /&gt;
apt install apache2&lt;br /&gt;
systemctl enable --now apache2&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
[[Fichier:Elvis21.tech-DNS.png|gauche|vignette|863x863px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Installation Fail2ban''' ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/# apt install fail2ban &lt;br /&gt;
Installing:                     &lt;br /&gt;
  fail2ban&lt;br /&gt;
&lt;br /&gt;
root@Elf:/# systemctl status fail2ban&lt;br /&gt;
fail2ban.service - Fail2Ban Service&lt;br /&gt;
    Loaded: loaded (/usr/lib/systemd/system/fail2ban.service, disabled)&lt;br /&gt;
    Active: active (running)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/# service fail2ban status                             &lt;br /&gt;
Status of Authentication failure monitor: fail2ban is running.&lt;br /&gt;
 root@Elf:/# fail2ban-client status&lt;br /&gt;
Status&lt;br /&gt;
|- Number of jail:	1&lt;br /&gt;
`- Jail list:	sshd&lt;br /&gt;
&lt;br /&gt;
root@Elf:/# fail2ban-client status sshd&lt;br /&gt;
Status for the jail: sshd&lt;br /&gt;
|- Filter&lt;br /&gt;
|  |- Currently failed:	0&lt;br /&gt;
|  |- Total failed:	0&lt;br /&gt;
|  `- File list:	/var/log/auth.log&lt;br /&gt;
`- Actions&lt;br /&gt;
   |- Currently banned:	0&lt;br /&gt;
   |- Total banned:	0&lt;br /&gt;
   `- Banned IP list:	&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Mise en place du serveur Apache (http et https) ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/# service apache2 status&lt;br /&gt;
apache2 is running.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''WIFI''' ==&lt;br /&gt;
Faire ip link&lt;br /&gt;
&lt;br /&gt;
ensuite sudo airodump-ng wlanx  -- Remplacer x par le numero du wlan present &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
BSSID              PWR  Beacons    #Data, #/s  CH   MB   ENC CIPHER  AUTH ESSID&lt;br /&gt;
04:DA:D2:9C:50:54  -62       23       11    0   4   54e. WEP  WEP         cracotte05                         &lt;br /&gt;
04:DA:D2:9C:50:5A  -61        2        1    0   4   54e. WEP  WEP         cracotte11    &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;sudo airodump-ng wlan1 --bssid 04:DA:D2:9C:50:5A  -c4 --write log_airdump&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
sudo airodump-ng wlan1 --write airdump --bssid 04:DA:D2:9C:50:5A -c4&lt;br /&gt;
17:31:10  Created capture file &amp;quot;airdump-04.cap&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
 CH  4 ][ Elapsed: 39 mins ][ 2026-02-10 18:11 ][ fixed channel wlan1: 13 &lt;br /&gt;
&lt;br /&gt;
 BSSID              PWR RXQ  Beacons    #Data, #/s  CH   MB   ENC CIPHER  AUTH ESSID&lt;br /&gt;
&lt;br /&gt;
 04:DA:D2:9C:50:5A  -58   3     9766    43771   21   4   54e. WEP  WEP         cracotte11                                                                                                   &lt;br /&gt;
&lt;br /&gt;
 BSSID              STATION            PWR    Rate    Lost   Frames  Notes  Probes&lt;br /&gt;
&lt;br /&gt;
 04:DA:D2:9C:50:5A  40:A5:EF:01:2E:FA  -77    0 -48e   127    46300                                                                                                                          &lt;br /&gt;
Quitting...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
aircrack-ng airdump-05.cap &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
           Aircrack-ng 1.7 &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                 [00:25:47] Tested 869 keys (got 34546 IVs)&lt;br /&gt;
                          Got 35002 out of 35000 IVsStarting PTW attack with 35002 KB    depth   byte(vote)&lt;br /&gt;
    0    0/  2   FF(50176) 1C(43520) E6(42752) 3F(42496) B6(42496) &lt;br /&gt;
    1    0/  6   FF(48128) AC(46336) 90(42752) 8E(42496) 04(42240) &lt;br /&gt;
    2    0/  1   BD(50688) 7F(43776) 75(42752) E6(41216) F2(41216) &lt;br /&gt;
    3    9/  3   CE(39936) 05(39680) 5C(39680) 9A(39168) F4(39168) &lt;br /&gt;
    4   41/  4   6C(37376) 1E(37120) 80(37120) 88(37120) A7(37120) &lt;br /&gt;
&lt;br /&gt;
             KEY FOUND! [ FF:FF:FF:FF:FA:BC:12:CB:AE:EE:EE:EE:EE ]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
ssh -oKexAlgorithms=+diffie-hellman-group14-sha1 -oHostKeyAlgorithms=+ssh-rsa -oCiphers=+aes128-cbc admin@172.27.0.1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
C9200-E304&amp;gt;en&lt;br /&gt;
Password: &lt;br /&gt;
C9200-E304#config t&lt;br /&gt;
Enter configuration commands, one per line.  End with CNTL/Z.&lt;br /&gt;
C9200-E304(config)#vlan 28&lt;br /&gt;
C9200-E304(config-vlan)#name PoolEvora&lt;br /&gt;
C9200-E304(config-vlan)#exit &lt;br /&gt;
C9200-E304(config)#exit&lt;br /&gt;
C9200-E304#write&lt;br /&gt;
Building configuration...&lt;br /&gt;
[OK]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
C9200-E304#en&lt;br /&gt;
C9200-E304#config t&lt;br /&gt;
Enter configuration commands, one per line.  End with CNTL/Z.&lt;br /&gt;
C9200-E304(config)#ip dhcp pool PoolEvora  &lt;br /&gt;
C9200-E304(dhcp-config)#network 10.60.11.0 255.255.255.0&lt;br /&gt;
C9200-E304(dhcp-config)#dns-server 193.48.57.172&lt;br /&gt;
C9200-E304(dhcp-config)#default-router 10.60.11.254&lt;br /&gt;
C9200-E304(dhcp-config)#exit&lt;br /&gt;
C9200-E304(config)#exit&lt;br /&gt;
C9200-E304#write&lt;br /&gt;
Building configuration...&lt;br /&gt;
[OK]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
ip dhcp pool PoolTom&lt;br /&gt;
 network 10.60.10.0 255.255.255.0&lt;br /&gt;
 dns-server 193.48.57.168 &lt;br /&gt;
 default-router 10.60.10.254 &lt;br /&gt;
!         &lt;br /&gt;
ip dhcp pool PoolEvora&lt;br /&gt;
 network 10.60.11.0 255.255.255.0&lt;br /&gt;
 dns-server 193.48.57.172 &lt;br /&gt;
 default-router 10.60.11.254 &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;VRRP&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
C9200-E304&amp;gt;en &lt;br /&gt;
Password: &lt;br /&gt;
C9200-E304#config t&lt;br /&gt;
Enter configuration commands, one per line.  End with CNTL/Z.&lt;br /&gt;
C9200-E304(config)#interface vlan 28&lt;br /&gt;
C9200-E304(config-if)#ip address 10.60.11.2 255.255.255.0&lt;br /&gt;
C9200-E304(config-if)#ipv6 address 2001:660:4401:60ab::2/64&lt;br /&gt;
C9200-E304(config-if)#vrrp 28 address-family ipv4        &lt;br /&gt;
C9200-E304(config-if-vrrp)#priority 110&lt;br /&gt;
C9200-E304(config-if-vrrp)#address 10.60.11.1 primary&lt;br /&gt;
C9200-E304(config-if-vrrp)#exit&lt;br /&gt;
C9200-E304(config-if)#exit&lt;br /&gt;
C9200-E304(config)#exit&lt;br /&gt;
C9200-E304#write&lt;br /&gt;
Building configuration...&lt;br /&gt;
[OK]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;WIFI e304&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
ssh admin@172.27.0.4 \&lt;br /&gt;
  -o KexAlgorithms=+diffie-hellman-group1-sha1 \&lt;br /&gt;
  -o HostKeyAlgorithms=+ssh-rsa \&lt;br /&gt;
  -o Ciphers=+aes128-cbc \&lt;br /&gt;
  -o MACs=+hmac-sha1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Vsouopme</name></author>
	</entry>
	<entry>
		<id>https://wiki-se.plil.fr/mediawiki/index.php?title=Atelier_SysRes_SE4_2025/2026_E11&amp;diff=12295</id>
		<title>Atelier SysRes SE4 2025/2026 E11</title>
		<link rel="alternate" type="text/html" href="https://wiki-se.plil.fr/mediawiki/index.php?title=Atelier_SysRes_SE4_2025/2026_E11&amp;diff=12295"/>
		<updated>2026-02-21T18:02:16Z</updated>

		<summary type="html">&lt;p&gt;Vsouopme : &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Projet Virtualisation /Administration Systeme-Réseau - Machine SE4.Elf =&lt;br /&gt;
Dans le cadre de ce projet, nnous avons déployés une infrastructure composée de '''deux machines dédiées aux services''' et d’une '''machine mandataire''', le tout à l’aide de l'environnement  '''Xen.'''&lt;br /&gt;
&lt;br /&gt;
== Création des machines virtuelles ==&lt;br /&gt;
Les machines sont créées  sur le Dom0 '''Capbreton.plil.info''' en faisant un '''ssh root@capbreton.plil.info''' &lt;br /&gt;
&lt;br /&gt;
Sur la capbreton.plil.info, &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
xen create-image --hostname=SE4.Elf --dhcp --dir=/usr/local/xen --size=10G --dist=excalibur --memory=2G --bridge=Styx --force&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; '''Xen-create-image''' :  Commande permettant de créer une nouvelle machine virtuelle Xen&lt;br /&gt;
&lt;br /&gt;
'''--hostname=SE4.Elf :''' Pour le nom de la machine &lt;br /&gt;
&lt;br /&gt;
'''--size=10G''' : La taille du disque &lt;br /&gt;
&lt;br /&gt;
'''--bridge=Styx''' : Le nom du bridge &lt;br /&gt;
&lt;br /&gt;
Par la suite il faut creer un fichier dans le répertoire &amp;lt;code&amp;gt;/etc/network/interfaces.d&amp;lt;/code&amp;gt; du Dom0 pour créer notre pont. (NB: Il faut noter que cette etape on peut la faire avant la creation de notre VM&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
auto Styx&lt;br /&gt;
&lt;br /&gt;
iface Styx inet manual&lt;br /&gt;
   bridge_ports none&lt;br /&gt;
   up ip link set $IFACE up&lt;br /&gt;
   down ip link set $IFACE down&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;La commande '''xen list :''' Affiche les '''machines virtuelles''' (VM) qui sont actuellement gérées par Xen (Elle fait la liste des VM allumée).&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
root@capbreton:~# xen list&lt;br /&gt;
SE4.batman                                 322  2048     1     -b----      37.5&lt;br /&gt;
SE4.Moon                                   326  2048     1     -b----      41.1&lt;br /&gt;
SE4.C2                                     332  1024     1     -b----      18.1&lt;br /&gt;
SE4.Tension                                343  2048     1     -b----       7.8&lt;br /&gt;
SE4.CachyOS                                365  2048     1     -b----      10.2&lt;br /&gt;
SE4.RockStar                               367  2048     1     -b----       6.1&lt;br /&gt;
SE4.Kasav                                  368  2048     1     -b----       5.9&lt;br /&gt;
SE4.Elf                                    369  2048     1     -b----       5.6&lt;br /&gt;
SE4.catwoman                               370  2048     1     -b----       6.1&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;-La commande '''xen create /etc/xen/SE4.Elf.cfg''' permet d'allumer la Machine virtuellle.&lt;br /&gt;
&lt;br /&gt;
-La commande xen '''console SE4.Elf''' permet d'acceder  / de se connecter  a la VM.&lt;br /&gt;
&lt;br /&gt;
-La commande '''xen shutdown''' '''SE4.Elf''' permet d'eteindre la machine virtuelle.&lt;br /&gt;
&lt;br /&gt;
Lors de la tentative de connexion, il y'a une un probleme , pour y remedier,  '''Ctrl + AltGr + ] =&amp;gt; vi =&amp;gt; :q! =&amp;gt; reconnexion'''&lt;br /&gt;
&lt;br /&gt;
Pour voir le mot de passe de la VM, '''cat /var/log/xen-tools/SE4.Elf.log'''&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
Installation Summary&lt;br /&gt;
---------------------&lt;br /&gt;
Hostname        :  SE4.Elf&lt;br /&gt;
Distribution    :  excalibur&lt;br /&gt;
MAC Address     :  00:16:3E:83:A3:C7&lt;br /&gt;
IP Address(es)  :  dynamic&lt;br /&gt;
SSH Fingerprint :  SHA256:IrPhxhB4m1s+eaPaLynS6NlE/HfL78+y3ba3DPuHFQU (DSA)&lt;br /&gt;
SSH Fingerprint :  SHA256:RT+MZtlFxC7BrdYORzOcxDX+SKsJrLzOGWWngX2pKz4 (ECDSA)&lt;br /&gt;
SSH Fingerprint :  SHA256:aLYvYqUPX2Q/J5P0nTpdpMyrFD5xopRqkFKuYb7QUo4 (ED25519)&lt;br /&gt;
SSH Fingerprint :  SHA256:b0ddm9FYx4/losJU8/pE9MXx7102ygkAMjChOvPlNhE (RSA)&lt;br /&gt;
Root Password   :  X&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;- La commande '''vi /etc/hostname''' pour changer le nom de la VM&lt;br /&gt;
&lt;br /&gt;
== '''Configuration de la Machine de Services''' ==&lt;br /&gt;
Il faut creer deux partitions LVM de 10G pour votre machine virtuelle et modifiez le fichier de configuration de la machine virtuelle de services pour faire en sorte que les répertoires &amp;lt;code&amp;gt;/'''var'''&amp;lt;/code&amp;gt; et &amp;lt;code&amp;gt;'''/home'''&amp;lt;/code&amp;gt; de la machine virtuelle soient implantés sur ces partitions LVM&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
SE4.Poseidon.home lv_home_SE4Elf lv_var_SE4Elf  SE4.Gaby.home SE4.Poseidon.var SE4.Gaby.var &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Apres nous avons modifié le fichier /etc/xen/SE4.Elf.cfg piur y ajouter deux répertoires&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== '''Création et formatage des partitions''' ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
mkfs -t ext4 /dev/xvdb  # Formatage de la partition pour /var &lt;br /&gt;
mkfs -t ext4 /dev/xvdc  # Formatage de la partition pour /home&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== '''Préparer les partitions et déplacer les données :''' ===&lt;br /&gt;
&lt;br /&gt;
* '''Montage temporaire des partitions dans &amp;lt;code&amp;gt;/mnt&amp;lt;/code&amp;gt; :'''&lt;br /&gt;
&lt;br /&gt;
Pour pouvoir déplacer les données, nous avons du monter les nouvelles partitions LVM dans un répertoire temporaire &amp;lt;code&amp;gt;/mnt&amp;lt;/code&amp;gt;.  On a créé 2 partitions une pour &amp;lt;code&amp;gt;/var&amp;lt;/code&amp;gt; et une &amp;lt;code&amp;gt;/home&amp;lt;/code&amp;gt; sous les noms xvdb et xvdc dans  &amp;lt;code&amp;gt;/dev&amp;lt;/code&amp;gt;  ,que l'on monte avec  :&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
mount /dev/xvdb /mnt&lt;br /&gt;
mount /dev/xvdc /mnt&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* '''Déplacement des fichiers existants'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
mv /var/* /mnt # Déplacement des fichiers de /var vers la nouvelle partition&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== '''Démonter les partitions temporaires :''' ===&lt;br /&gt;
Avant de configurer les montages permanents, on démonte les partitions des répertoires temporaires (&amp;lt;code&amp;gt;/mnt&amp;lt;/code&amp;gt;)&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
umount /mnt # Démontage après transfert des données&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== '''Modification du fichier &amp;lt;code&amp;gt;/etc/fstab&amp;lt;/code&amp;gt; pour un montage automatique au démarrage :''' ===&lt;br /&gt;
On modifie le fichier &amp;lt;code&amp;gt;'''/etc/fstab'''&amp;lt;/code&amp;gt;, qui contient la liste des partitions.&lt;br /&gt;
&lt;br /&gt;
Ajout des nouvelles partitions LVM au fichier &amp;lt;code&amp;gt;/etc/fstab&amp;lt;/code&amp;gt; :&lt;br /&gt;
&lt;br /&gt;
* '''/dev/xvdb /var ext4 defaults 0 2'''&lt;br /&gt;
* '''/dev/xvdc /home ext4 defaults 0''' &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
# /etc/fstab: static file system information.&lt;br /&gt;
#&lt;br /&gt;
# &amp;lt;file system&amp;gt; &amp;lt;mount point&amp;gt; &amp;lt;type&amp;gt; &amp;lt;options&amp;gt; &amp;lt;dump&amp;gt; &amp;lt;pass&amp;gt;&lt;br /&gt;
proc             /proc           proc  defaults   0     0&lt;br /&gt;
devpts            /dev/pts       devpts rw,noexec,nosuid,gid=5,mode=620 0 0 /dev/xvda1 none swap sw 0 0&lt;br /&gt;
/dev/xvda1 none swap sw 0 0&lt;br /&gt;
/dev/xvda2 / ext4 noatime,nodiratime,errors=remount-ro 0 1&lt;br /&gt;
/dev/xvdb /var ext4 defaults 0 2 &lt;br /&gt;
/dev/xvdc /home ext4 defaults 0 2&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== '''Monter les partitions définies dans &amp;lt;code&amp;gt;fstab&amp;lt;/code&amp;gt; :''' ===&lt;br /&gt;
Pour monter toutes les partitions définies dans le fichier &amp;lt;code&amp;gt;/etc/fstab&amp;lt;/code&amp;gt;  :&lt;br /&gt;
 mount -a  # Remontage des partitions définies dans fstab&lt;br /&gt;
Cette commande monte toutes les partitions qui ne sont pas encore montées et qui sont définies dans &amp;lt;code&amp;gt;/etc/fstab&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
remet les données dans le fichier déplacer.&lt;br /&gt;
&lt;br /&gt;
Puis, pour appliquer les changement nous avons redémarré la VM en faisant le '''xen shutdown SE4.Elf''' ,  '''xen create /etc/xen/SE4.Elf.cfg''',  '''xen console SE4.Elf'''&lt;br /&gt;
&lt;br /&gt;
=== '''Vérification des partitions montées''' ===&lt;br /&gt;
Après avoir configuré le montage automatique et remonté les partitions, nous devons vérifier que les partitions sont correctement montées. Nous avons utilisé la commande '''&amp;lt;code&amp;gt;df -h&amp;lt;/code&amp;gt;''' pour afficher l'espace disque utilisé et disponible sur les partitions montées.&lt;br /&gt;
&lt;br /&gt;
Cela nous permet de confirmer que les partitions '''&amp;lt;code&amp;gt;/var&amp;lt;/code&amp;gt;''' et '''&amp;lt;code&amp;gt;/home&amp;lt;/code&amp;gt;''' sont correctement montées sur les répertoires associés et qu'il n'y a pas de problème d'espace disque.&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== &amp;lt;big&amp;gt;'''Configuration Reseau'''&amp;lt;/big&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Serveur SSH''' ==&lt;br /&gt;
Notre machine virtuelle doit etre accessible par SSH, on autorise donc l'accès par l'utilisateur '''Root en modifiant le fichier de de configuration &amp;lt;code&amp;gt;/etc/ssh/sshd_config  :&amp;lt;/code&amp;gt;'''&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
PermitRootLogin yes&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Il faut ensuite redemarrer le serveur ssh en faisant :&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/etc/ssh# /etc/init.d/ssh restart&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Pour gérer la redirection du SSH, on doit configurer '''nftables''' sur nos machines de service en redirigeant les ports 2201 et 2202&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
nft add table ip nat&lt;br /&gt;
nft add chain ip nat PREROUTING { type nat hook prerouting priority 0 \; }&lt;br /&gt;
nft add rule ip nat PREROUTING tcp dport 2201 dnat to 192.168.50.12:22                 &lt;br /&gt;
nft add rule ip nat PREROUTING tcp dport 2202 dnat to 192.168.50.3:22              &lt;br /&gt;
nft add chain ip nat POSTROUTING { type nat hook postrouting priority 100 \; }&lt;br /&gt;
nft add rule ip nat POSTROUTING masquerade&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Maintenant, on peut se connecter en SSH sur les machiches virtuelles de services:  De Elf, on peut se connecter a Kasav&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/# ssh root@192.168.50.3&lt;br /&gt;
root@192.168.50.3's password: &lt;br /&gt;
Linux Kasav 4.19.0-26-amd64 #1 SMP Debian 4.19.304-1 (2024-01-09) x86_64&lt;br /&gt;
&lt;br /&gt;
The programs included with the Devuan GNU/Linux system are free software;&lt;br /&gt;
the exact distribution terms for each program are described in the&lt;br /&gt;
individual files in /usr/share/doc/*/copyright.&lt;br /&gt;
&lt;br /&gt;
Devuan GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent&lt;br /&gt;
permitted by applicable law.&lt;br /&gt;
Last login: Tue Feb  3 11:34:45 2026 from 192.168.50.12&lt;br /&gt;
root@Kasav:~# &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Serveur DNS''' ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
$TTL 86400&lt;br /&gt;
@ IN SOA ns1.elvis21.tech. admin.elvis21.tech. (&lt;br /&gt;
        3298267246      ;Version&lt;br /&gt;
        3600            ;Refresh&lt;br /&gt;
        1800            ;Retry&lt;br /&gt;
        604800          ;Expire&lt;br /&gt;
        86400 )         ;Minimum TTL&lt;br /&gt;
;&lt;br /&gt;
@  IN NS ns1.elvis21.tech.&lt;br /&gt;
&lt;br /&gt;
ns1 IN A 192.168.50.12&lt;br /&gt;
ns2 IN A 192.168.50.1&lt;br /&gt;
 IN A 192.168.50.12&lt;br /&gt;
      IN AAAA 2001:660:4401:60a0:216:3eff:fe83:a3c8&lt;br /&gt;
www IN A 192.168.50.12&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/etc/bind# cat named.conf.local &lt;br /&gt;
zone &amp;quot;elvis21.tech&amp;quot; {&lt;br /&gt;
    type primary;&lt;br /&gt;
    file &amp;quot;/etc/bind/zones/db.elvis21.tech&amp;quot;;&lt;br /&gt;
    allow-transfer {&lt;br /&gt;
      2001:660:4401:60a0:216:3eff:fe70:7f1c;&lt;br /&gt;
      2001:660:4401:60a0:216:3eff:fe9a:ea1c;&lt;br /&gt;
      };&lt;br /&gt;
    also-notify { 2001:660:4401:60a0:216:3eff:fe70:7f1c; };&lt;br /&gt;
    inline-signing yes;   // DNSSEC automatique&lt;br /&gt;
    key-directory &amp;quot;/etc/bind/keys&amp;quot;; // répertoire des clefs, attention aux droits&lt;br /&gt;
    dnssec-policy &amp;quot;dnssecpolicy&amp;quot;;  // politique pour les clefs de chiffrement&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
zone &amp;quot;kasav.online&amp;quot; {&lt;br /&gt;
    type secondary;&lt;br /&gt;
    file &amp;quot;/etc/bind/backup/db.kasav.online&amp;quot;;&lt;br /&gt;
    primaries { 2001:660:4401:60a0:216:3eff:fe9a:ea1c; };&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
dnssec-policy &amp;quot;dnssecpolicy&amp;quot; {&lt;br /&gt;
  keys {&lt;br /&gt;
    ksk key-directory lifetime unlimited algorithm 13;&lt;br /&gt;
    zsk key-directory lifetime unlimited algorithm 13;&lt;br /&gt;
  };&lt;br /&gt;
  nsec3param;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/etc/bind# named-checkzone elvis21.tech /etc/bind/db.elvis21.tech&lt;br /&gt;
zone elvis21.tech/IN: loaded serial 3298267246&lt;br /&gt;
OK&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
openssl req -nodes -newkey rsa:2048 -sha256 -keyout elvis21.tech.key -out elvis21.csr&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
[[Fichier:ImageDns.png|vignette|994x994px|centré]]&lt;br /&gt;
&lt;br /&gt;
== '''Mise en place du serveur Apache (http et https)''' ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
apt update&lt;br /&gt;
apt install apache2&lt;br /&gt;
systemctl enable --now apache2&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
[[Fichier:Elvis21.tech-DNS.png|gauche|vignette|863x863px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Installation Fail2ban''' ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/# apt install fail2ban &lt;br /&gt;
Installing:                     &lt;br /&gt;
  fail2ban&lt;br /&gt;
&lt;br /&gt;
root@Elf:/# systemctl status fail2ban&lt;br /&gt;
fail2ban.service - Fail2Ban Service&lt;br /&gt;
    Loaded: loaded (/usr/lib/systemd/system/fail2ban.service, disabled)&lt;br /&gt;
    Active: active (running)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/# service fail2ban status                             &lt;br /&gt;
Status of Authentication failure monitor: fail2ban is running.&lt;br /&gt;
 root@Elf:/# fail2ban-client status&lt;br /&gt;
Status&lt;br /&gt;
|- Number of jail:	1&lt;br /&gt;
`- Jail list:	sshd&lt;br /&gt;
&lt;br /&gt;
root@Elf:/# fail2ban-client status sshd&lt;br /&gt;
Status for the jail: sshd&lt;br /&gt;
|- Filter&lt;br /&gt;
|  |- Currently failed:	0&lt;br /&gt;
|  |- Total failed:	0&lt;br /&gt;
|  `- File list:	/var/log/auth.log&lt;br /&gt;
`- Actions&lt;br /&gt;
   |- Currently banned:	0&lt;br /&gt;
   |- Total banned:	0&lt;br /&gt;
   `- Banned IP list:	&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Mise en place du serveur Apache (http et https) ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/# service apache2 status&lt;br /&gt;
apache2 is running.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''WIFI''' ==&lt;br /&gt;
Faire ip link&lt;br /&gt;
&lt;br /&gt;
ensuite sudo airodump-ng wlanx  -- Remplacer x par le numero du wlan present &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
BSSID              PWR  Beacons    #Data, #/s  CH   MB   ENC CIPHER  AUTH ESSID&lt;br /&gt;
04:DA:D2:9C:50:54  -62       23       11    0   4   54e. WEP  WEP         cracotte05                         &lt;br /&gt;
04:DA:D2:9C:50:5A  -61        2        1    0   4   54e. WEP  WEP         cracotte11    &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;sudo airodump-ng wlan1 --bssid 04:DA:D2:9C:50:5A  -c4 --write log_airdump&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
sudo airodump-ng wlan1 --write airdump --bssid 04:DA:D2:9C:50:5A -c4&lt;br /&gt;
17:31:10  Created capture file &amp;quot;airdump-04.cap&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
 CH  4 ][ Elapsed: 39 mins ][ 2026-02-10 18:11 ][ fixed channel wlan1: 13 &lt;br /&gt;
&lt;br /&gt;
 BSSID              PWR RXQ  Beacons    #Data, #/s  CH   MB   ENC CIPHER  AUTH ESSID&lt;br /&gt;
&lt;br /&gt;
 04:DA:D2:9C:50:5A  -58   3     9766    43771   21   4   54e. WEP  WEP         cracotte11                                                                                                   &lt;br /&gt;
&lt;br /&gt;
 BSSID              STATION            PWR    Rate    Lost   Frames  Notes  Probes&lt;br /&gt;
&lt;br /&gt;
 04:DA:D2:9C:50:5A  40:A5:EF:01:2E:FA  -77    0 -48e   127    46300                                                                                                                          &lt;br /&gt;
Quitting...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
aircrack-ng airdump-05.cap &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
           Aircrack-ng 1.7 &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                 [00:25:47] Tested 869 keys (got 34546 IVs)&lt;br /&gt;
                          Got 35002 out of 35000 IVsStarting PTW attack with 35002 KB    depth   byte(vote)&lt;br /&gt;
    0    0/  2   FF(50176) 1C(43520) E6(42752) 3F(42496) B6(42496) &lt;br /&gt;
    1    0/  6   FF(48128) AC(46336) 90(42752) 8E(42496) 04(42240) &lt;br /&gt;
    2    0/  1   BD(50688) 7F(43776) 75(42752) E6(41216) F2(41216) &lt;br /&gt;
    3    9/  3   CE(39936) 05(39680) 5C(39680) 9A(39168) F4(39168) &lt;br /&gt;
    4   41/  4   6C(37376) 1E(37120) 80(37120) 88(37120) A7(37120) &lt;br /&gt;
&lt;br /&gt;
             KEY FOUND! [ FF:FF:FF:FF:FA:BC:12:CB:AE:EE:EE:EE:EE ]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
ssh -oKexAlgorithms=+diffie-hellman-group14-sha1 -oHostKeyAlgorithms=+ssh-rsa -oCiphers=+aes128-cbc admin@172.27.0.1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
C9200-E304&amp;gt;en&lt;br /&gt;
Password: &lt;br /&gt;
C9200-E304#config t&lt;br /&gt;
Enter configuration commands, one per line.  End with CNTL/Z.&lt;br /&gt;
C9200-E304(config)#vlan 28&lt;br /&gt;
C9200-E304(config-vlan)#name PoolEvora&lt;br /&gt;
C9200-E304(config-vlan)#exit &lt;br /&gt;
C9200-E304(config)#exit&lt;br /&gt;
C9200-E304#write&lt;br /&gt;
Building configuration...&lt;br /&gt;
[OK]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
C9200-E304#en&lt;br /&gt;
C9200-E304#config t&lt;br /&gt;
Enter configuration commands, one per line.  End with CNTL/Z.&lt;br /&gt;
C9200-E304(config)#ip dhcp pool PoolEvora  &lt;br /&gt;
C9200-E304(dhcp-config)#network 10.60.11.0 255.255.255.0&lt;br /&gt;
C9200-E304(dhcp-config)#dns-server 193.48.57.172&lt;br /&gt;
C9200-E304(dhcp-config)#default-router 10.60.11.254&lt;br /&gt;
C9200-E304(dhcp-config)#exit&lt;br /&gt;
C9200-E304(config)#exit&lt;br /&gt;
C9200-E304#write&lt;br /&gt;
Building configuration...&lt;br /&gt;
[OK]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
ip dhcp pool PoolTom&lt;br /&gt;
 network 10.60.10.0 255.255.255.0&lt;br /&gt;
 dns-server 193.48.57.168 &lt;br /&gt;
 default-router 10.60.10.254 &lt;br /&gt;
!         &lt;br /&gt;
ip dhcp pool PoolEvora&lt;br /&gt;
 network 10.60.11.0 255.255.255.0&lt;br /&gt;
 dns-server 193.48.57.172 &lt;br /&gt;
 default-router 10.60.11.254 &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;VRRP&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
C9200-E304&amp;gt;en &lt;br /&gt;
Password: &lt;br /&gt;
C9200-E304#config t&lt;br /&gt;
Enter configuration commands, one per line.  End with CNTL/Z.&lt;br /&gt;
C9200-E304(config)#interface vlan 28&lt;br /&gt;
C9200-E304(config-if)#ip address 10.60.11.2 255.255.255.0&lt;br /&gt;
C9200-E304(config-if)#ipv6 address 2001:660:4401:60ab::2/64&lt;br /&gt;
C9200-E304(config-if)#vrrp 28 address-family ipv4        &lt;br /&gt;
C9200-E304(config-if-vrrp)#priority 110&lt;br /&gt;
C9200-E304(config-if-vrrp)#address 10.60.11.1 primary&lt;br /&gt;
C9200-E304(config-if-vrrp)#exit&lt;br /&gt;
C9200-E304(config-if)#exit&lt;br /&gt;
C9200-E304(config)#exit&lt;br /&gt;
C9200-E304#write&lt;br /&gt;
Building configuration...&lt;br /&gt;
[OK]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;WIFI e304&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
ssh admin@172.27.0.4 \&lt;br /&gt;
  -o KexAlgorithms=+diffie-hellman-group1-sha1 \&lt;br /&gt;
  -o HostKeyAlgorithms=+ssh-rsa \&lt;br /&gt;
  -o Ciphers=+aes128-cbc \&lt;br /&gt;
  -o MACs=+hmac-sha1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Vsouopme</name></author>
	</entry>
	<entry>
		<id>https://wiki-se.plil.fr/mediawiki/index.php?title=Atelier_SysRes_SE4_2025/2026_E11&amp;diff=12279</id>
		<title>Atelier SysRes SE4 2025/2026 E11</title>
		<link rel="alternate" type="text/html" href="https://wiki-se.plil.fr/mediawiki/index.php?title=Atelier_SysRes_SE4_2025/2026_E11&amp;diff=12279"/>
		<updated>2026-02-19T09:42:53Z</updated>

		<summary type="html">&lt;p&gt;Vsouopme : /* Monter les partitions définies dans fstab : */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Projet Virtualisation /Administration Systeme-Réseau - Machine SE4.Elf =&lt;br /&gt;
Dans le cadre de ce projet, nnous avons déployés une infrastructure composée de '''deux machines dédiées aux services''' et d’une '''machine mandataire''', le tout à l’aide de l'environnement  '''Xen.'''&lt;br /&gt;
&lt;br /&gt;
== Création des machines virtuelles ==&lt;br /&gt;
Les machines sont créées  sur le Dom0 '''Capbreton.plil.info''' en faisant un '''ssh root@capbreton.plil.info''' &lt;br /&gt;
&lt;br /&gt;
Sur la capbreton.plil.info, &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
xen create-image --hostname=SE4.Elf --dhcp --dir=/usr/local/xen --size=10G --dist=excalibur --memory=2G --bridge=Styx --force&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; '''Xen-create-image''' :  Commande permettant de créer une nouvelle machine virtuelle Xen&lt;br /&gt;
&lt;br /&gt;
'''--hostname=SE4.Elf :''' Pour le nom de la machine &lt;br /&gt;
&lt;br /&gt;
'''--size=10G''' : La taille du disque &lt;br /&gt;
&lt;br /&gt;
'''--bridge=Styx''' : Le nom du bridge &lt;br /&gt;
&lt;br /&gt;
Par la suite il faut creer un fichier dans le répertoire &amp;lt;code&amp;gt;/etc/network/interfaces.d&amp;lt;/code&amp;gt; du Dom0 pour créer notre pont. (NB: Il faut noter que cette etape on peut la faire avant la creation de notre VM&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
auto Styx&lt;br /&gt;
&lt;br /&gt;
iface Styx inet manual&lt;br /&gt;
   bridge_ports none&lt;br /&gt;
   up ip link set $IFACE up&lt;br /&gt;
   down ip link set $IFACE down&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;La commande '''xen list :''' Affiche les '''machines virtuelles''' (VM) qui sont actuellement gérées par Xen (Elle fait la liste des VM allumée).&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
root@capbreton:~# xen list&lt;br /&gt;
SE4.batman                                 322  2048     1     -b----      37.5&lt;br /&gt;
SE4.Moon                                   326  2048     1     -b----      41.1&lt;br /&gt;
SE4.C2                                     332  1024     1     -b----      18.1&lt;br /&gt;
SE4.Tension                                343  2048     1     -b----       7.8&lt;br /&gt;
SE4.CachyOS                                365  2048     1     -b----      10.2&lt;br /&gt;
SE4.RockStar                               367  2048     1     -b----       6.1&lt;br /&gt;
SE4.Kasav                                  368  2048     1     -b----       5.9&lt;br /&gt;
SE4.Elf                                    369  2048     1     -b----       5.6&lt;br /&gt;
SE4.catwoman                               370  2048     1     -b----       6.1&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;-La commande '''xen create /etc/xen/SE4.Elf.cfg''' permet d'allumer la Machine virtuellle.&lt;br /&gt;
&lt;br /&gt;
-La commande xen '''console SE4.Elf''' permet d'acceder  / de se connecter  a la VM.&lt;br /&gt;
&lt;br /&gt;
-La commande '''xen shutdown''' '''SE4.Elf''' permet d'eteindre la machine virtuelle.&lt;br /&gt;
&lt;br /&gt;
Lors de la tentative de connexion, il y'a une un probleme , pour y remedier,  '''Ctrl + AltGr + ] =&amp;gt; vi =&amp;gt; :q! =&amp;gt; reconnexion'''&lt;br /&gt;
&lt;br /&gt;
Pour voir le mot de passe de la VM, '''cat /var/log/xen-tools/SE4.Elf.log'''&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
Installation Summary&lt;br /&gt;
---------------------&lt;br /&gt;
Hostname        :  SE4.Elf&lt;br /&gt;
Distribution    :  excalibur&lt;br /&gt;
MAC Address     :  00:16:3E:83:A3:C7&lt;br /&gt;
IP Address(es)  :  dynamic&lt;br /&gt;
SSH Fingerprint :  SHA256:IrPhxhB4m1s+eaPaLynS6NlE/HfL78+y3ba3DPuHFQU (DSA)&lt;br /&gt;
SSH Fingerprint :  SHA256:RT+MZtlFxC7BrdYORzOcxDX+SKsJrLzOGWWngX2pKz4 (ECDSA)&lt;br /&gt;
SSH Fingerprint :  SHA256:aLYvYqUPX2Q/J5P0nTpdpMyrFD5xopRqkFKuYb7QUo4 (ED25519)&lt;br /&gt;
SSH Fingerprint :  SHA256:b0ddm9FYx4/losJU8/pE9MXx7102ygkAMjChOvPlNhE (RSA)&lt;br /&gt;
Root Password   :  X&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;- La commande '''vi /etc/hostname''' pour changer le nom de la VM&lt;br /&gt;
&lt;br /&gt;
== '''Configuration de la Machine de Services''' ==&lt;br /&gt;
Il faut creer deux partitions LVM de 10G pour votre machine virtuelle et modifiez le fichier de configuration de la machine virtuelle de services pour faire en sorte que les répertoires &amp;lt;code&amp;gt;/'''var'''&amp;lt;/code&amp;gt; et &amp;lt;code&amp;gt;'''/home'''&amp;lt;/code&amp;gt; de la machine virtuelle soient implantés sur ces partitions LVM&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
SE4.Poseidon.home lv_home_SE4Elf lv_var_SE4Elf  SE4.Gaby.home SE4.Poseidon.var SE4.Gaby.var &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Apres nous avons modifié le fichier /etc/xen/SE4.Elf.cfg piur y ajouter deux répertoires&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== '''Création et formatage des partitions''' ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
mkfs -t ext4 /dev/xvdb  # Formatage de la partition pour /var &lt;br /&gt;
mkfs -t ext4 /dev/xvdc  # Formatage de la partition pour /home&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== '''Préparer les partitions et déplacer les données :''' ===&lt;br /&gt;
&lt;br /&gt;
* '''Montage temporaire des partitions dans &amp;lt;code&amp;gt;/mnt&amp;lt;/code&amp;gt; :'''&lt;br /&gt;
&lt;br /&gt;
Pour pouvoir déplacer les données, nous avons du monter les nouvelles partitions LVM dans un répertoire temporaire &amp;lt;code&amp;gt;/mnt&amp;lt;/code&amp;gt;.  On a créé 2 partitions une pour &amp;lt;code&amp;gt;/var&amp;lt;/code&amp;gt; et une &amp;lt;code&amp;gt;/home&amp;lt;/code&amp;gt; sous les noms xvdb et xvdc dans  &amp;lt;code&amp;gt;/dev&amp;lt;/code&amp;gt;  ,que l'on monte avec  :&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
mount /dev/xvdb /mnt&lt;br /&gt;
mount /dev/xvdc /mnt&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* '''Déplacement des fichiers existants'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
mv /var/* /mnt # Déplacement des fichiers de /var vers la nouvelle partition&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== '''Démonter les partitions temporaires :''' ===&lt;br /&gt;
Avant de configurer les montages permanents, on démonte les partitions des répertoires temporaires (&amp;lt;code&amp;gt;/mnt&amp;lt;/code&amp;gt;)&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
umount /mnt # Démontage après transfert des données&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== '''Modification du fichier &amp;lt;code&amp;gt;/etc/fstab&amp;lt;/code&amp;gt; pour un montage automatique au démarrage :''' ===&lt;br /&gt;
On modifie le fichier &amp;lt;code&amp;gt;'''/etc/fstab'''&amp;lt;/code&amp;gt;, qui contient la liste des partitions.&lt;br /&gt;
&lt;br /&gt;
Ajout des nouvelles partitions LVM au fichier &amp;lt;code&amp;gt;/etc/fstab&amp;lt;/code&amp;gt; :&lt;br /&gt;
&lt;br /&gt;
* '''/dev/xvdb /var ext4 defaults 0 2'''&lt;br /&gt;
* '''/dev/xvdc /home ext4 defaults 0''' &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
# /etc/fstab: static file system information.&lt;br /&gt;
#&lt;br /&gt;
# &amp;lt;file system&amp;gt; &amp;lt;mount point&amp;gt; &amp;lt;type&amp;gt; &amp;lt;options&amp;gt; &amp;lt;dump&amp;gt; &amp;lt;pass&amp;gt;&lt;br /&gt;
proc             /proc           proc  defaults   0     0&lt;br /&gt;
devpts            /dev/pts       devpts rw,noexec,nosuid,gid=5,mode=620 0 0 /dev/xvda1 none swap sw 0 0&lt;br /&gt;
/dev/xvda1 none swap sw 0 0&lt;br /&gt;
/dev/xvda2 / ext4 noatime,nodiratime,errors=remount-ro 0 1&lt;br /&gt;
/dev/xvdb /var ext4 defaults 0 2 &lt;br /&gt;
/dev/xvdc /home ext4 defaults 0 2&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== '''Monter les partitions définies dans &amp;lt;code&amp;gt;fstab&amp;lt;/code&amp;gt; :''' ===&lt;br /&gt;
Pour monter toutes les partitions définies dans le fichier &amp;lt;code&amp;gt;/etc/fstab&amp;lt;/code&amp;gt;  :&lt;br /&gt;
 mount -a  # Remontage des partitions définies dans fstab&lt;br /&gt;
Cette commande monte toutes les partitions qui ne sont pas encore montées et qui sont définies dans &amp;lt;code&amp;gt;/etc/fstab&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
remet les données dans le fichier déplacer.&lt;br /&gt;
&lt;br /&gt;
Puis, pour appliquer les changement nous avons redémarré la VM en faisant le '''xen shutdown SE4.Elf''' ,  '''xen create /etc/xen/SE4.Elf.cfg''',  '''xen console SE4.Elf'''&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;big&amp;gt;Configuration Reseau&amp;lt;/big&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
== '''Serveur SSH''' ==&lt;br /&gt;
Notre machine virtuelle doit etre accessible par SSH, on autorise donc l'accès par l'utilisateur '''Root en modifiant le fichier de de configuration &amp;lt;code&amp;gt;/etc/ssh/sshd_config  :&amp;lt;/code&amp;gt;'''&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
PermitRootLogin yes&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Il faut ensuite redemarrer le serveur ssh en faisant :&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/etc/ssh# /etc/init.d/ssh restart&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Pour gérer la redirection du SSH, on doit configurer '''nftables''' sur nos machines de service en redirigeant les ports 2201 et 2202&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
nft add table ip nat&lt;br /&gt;
nft add chain ip nat PREROUTING { type nat hook prerouting priority 0 \; }&lt;br /&gt;
nft add rule ip nat PREROUTING tcp dport 2201 dnat to 192.168.50.12:22                 &lt;br /&gt;
nft add rule ip nat PREROUTING tcp dport 2202 dnat to 192.168.50.3:22              &lt;br /&gt;
nft add chain ip nat POSTROUTING { type nat hook postrouting priority 100 \; }&lt;br /&gt;
nft add rule ip nat POSTROUTING masquerade&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Maintenant, on peut se connecter en SSH sur les machiches virtuelles de services:  De Elf, on peut se connecter a Kasav&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/# ssh root@192.168.50.3&lt;br /&gt;
root@192.168.50.3's password: &lt;br /&gt;
Linux Kasav 4.19.0-26-amd64 #1 SMP Debian 4.19.304-1 (2024-01-09) x86_64&lt;br /&gt;
&lt;br /&gt;
The programs included with the Devuan GNU/Linux system are free software;&lt;br /&gt;
the exact distribution terms for each program are described in the&lt;br /&gt;
individual files in /usr/share/doc/*/copyright.&lt;br /&gt;
&lt;br /&gt;
Devuan GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent&lt;br /&gt;
permitted by applicable law.&lt;br /&gt;
Last login: Tue Feb  3 11:34:45 2026 from 192.168.50.12&lt;br /&gt;
root@Kasav:~# &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Serveur DNS''' ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
$TTL 86400&lt;br /&gt;
@ IN SOA ns1.elvis21.tech. admin.elvis21.tech. (&lt;br /&gt;
        3298267246      ;Version&lt;br /&gt;
        3600            ;Refresh&lt;br /&gt;
        1800            ;Retry&lt;br /&gt;
        604800          ;Expire&lt;br /&gt;
        86400 )         ;Minimum TTL&lt;br /&gt;
;&lt;br /&gt;
@  IN NS ns1.elvis21.tech.&lt;br /&gt;
&lt;br /&gt;
ns1 IN A 192.168.50.12&lt;br /&gt;
ns2 IN A 192.168.50.1&lt;br /&gt;
 IN A 192.168.50.12&lt;br /&gt;
      IN AAAA 2001:660:4401:60a0:216:3eff:fe83:a3c8&lt;br /&gt;
www IN A 192.168.50.12&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/etc/bind# cat named.conf.local &lt;br /&gt;
zone &amp;quot;elvis21.tech&amp;quot; {&lt;br /&gt;
    type primary;&lt;br /&gt;
    file &amp;quot;/etc/bind/zones/db.elvis21.tech&amp;quot;;&lt;br /&gt;
    allow-transfer {&lt;br /&gt;
      2001:660:4401:60a0:216:3eff:fe70:7f1c;&lt;br /&gt;
      2001:660:4401:60a0:216:3eff:fe9a:ea1c;&lt;br /&gt;
      };&lt;br /&gt;
    also-notify { 2001:660:4401:60a0:216:3eff:fe70:7f1c; };&lt;br /&gt;
    inline-signing yes;   // DNSSEC automatique&lt;br /&gt;
    key-directory &amp;quot;/etc/bind/keys&amp;quot;; // répertoire des clefs, attention aux droits&lt;br /&gt;
    dnssec-policy &amp;quot;dnssecpolicy&amp;quot;;  // politique pour les clefs de chiffrement&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
zone &amp;quot;kasav.online&amp;quot; {&lt;br /&gt;
    type secondary;&lt;br /&gt;
    file &amp;quot;/etc/bind/backup/db.kasav.online&amp;quot;;&lt;br /&gt;
    primaries { 2001:660:4401:60a0:216:3eff:fe9a:ea1c; };&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
dnssec-policy &amp;quot;dnssecpolicy&amp;quot; {&lt;br /&gt;
  keys {&lt;br /&gt;
    ksk key-directory lifetime unlimited algorithm 13;&lt;br /&gt;
    zsk key-directory lifetime unlimited algorithm 13;&lt;br /&gt;
  };&lt;br /&gt;
  nsec3param;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/etc/bind# named-checkzone elvis21.tech /etc/bind/db.elvis21.tech&lt;br /&gt;
zone elvis21.tech/IN: loaded serial 3298267246&lt;br /&gt;
OK&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
openssl req -nodes -newkey rsa:2048 -sha256 -keyout elvis21.tech.key -out elvis21.csr&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
[[Fichier:ImageDns.png|vignette|994x994px|centré]]&lt;br /&gt;
&lt;br /&gt;
== '''Mise en place du serveur Apache (http et https)''' ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
apt update&lt;br /&gt;
apt install apache2&lt;br /&gt;
systemctl enable --now apache2&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
[[Fichier:Elvis21.tech-DNS.png|gauche|vignette|863x863px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Installation Fail2ban''' ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/# apt install fail2ban &lt;br /&gt;
Installing:                     &lt;br /&gt;
  fail2ban&lt;br /&gt;
&lt;br /&gt;
root@Elf:/# systemctl status fail2ban&lt;br /&gt;
fail2ban.service - Fail2Ban Service&lt;br /&gt;
    Loaded: loaded (/usr/lib/systemd/system/fail2ban.service, disabled)&lt;br /&gt;
    Active: active (running)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/# service fail2ban status                             &lt;br /&gt;
Status of Authentication failure monitor: fail2ban is running.&lt;br /&gt;
 root@Elf:/# fail2ban-client status&lt;br /&gt;
Status&lt;br /&gt;
|- Number of jail:	1&lt;br /&gt;
`- Jail list:	sshd&lt;br /&gt;
&lt;br /&gt;
root@Elf:/# fail2ban-client status sshd&lt;br /&gt;
Status for the jail: sshd&lt;br /&gt;
|- Filter&lt;br /&gt;
|  |- Currently failed:	0&lt;br /&gt;
|  |- Total failed:	0&lt;br /&gt;
|  `- File list:	/var/log/auth.log&lt;br /&gt;
`- Actions&lt;br /&gt;
   |- Currently banned:	0&lt;br /&gt;
   |- Total banned:	0&lt;br /&gt;
   `- Banned IP list:	&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Mise en place du serveur Apache (http et https) ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/# service apache2 status&lt;br /&gt;
apache2 is running.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''WIFI''' ==&lt;br /&gt;
Faire ip link&lt;br /&gt;
&lt;br /&gt;
ensuite sudo airodump-ng wlanx  -- Remplacer x par le numero du wlan present &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
BSSID              PWR  Beacons    #Data, #/s  CH   MB   ENC CIPHER  AUTH ESSID&lt;br /&gt;
04:DA:D2:9C:50:54  -62       23       11    0   4   54e. WEP  WEP         cracotte05                         &lt;br /&gt;
04:DA:D2:9C:50:5A  -61        2        1    0   4   54e. WEP  WEP         cracotte11    &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;sudo airodump-ng wlan1 --bssid 04:DA:D2:9C:50:5A  -c4 --write log_airdump&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
sudo airodump-ng wlan1 --write airdump --bssid 04:DA:D2:9C:50:5A -c4&lt;br /&gt;
17:31:10  Created capture file &amp;quot;airdump-04.cap&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
 CH  4 ][ Elapsed: 39 mins ][ 2026-02-10 18:11 ][ fixed channel wlan1: 13 &lt;br /&gt;
&lt;br /&gt;
 BSSID              PWR RXQ  Beacons    #Data, #/s  CH   MB   ENC CIPHER  AUTH ESSID&lt;br /&gt;
&lt;br /&gt;
 04:DA:D2:9C:50:5A  -58   3     9766    43771   21   4   54e. WEP  WEP         cracotte11                                                                                                   &lt;br /&gt;
&lt;br /&gt;
 BSSID              STATION            PWR    Rate    Lost   Frames  Notes  Probes&lt;br /&gt;
&lt;br /&gt;
 04:DA:D2:9C:50:5A  40:A5:EF:01:2E:FA  -77    0 -48e   127    46300                                                                                                                          &lt;br /&gt;
Quitting...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
aircrack-ng airdump-05.cap &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
           Aircrack-ng 1.7 &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                 [00:25:47] Tested 869 keys (got 34546 IVs)&lt;br /&gt;
                          Got 35002 out of 35000 IVsStarting PTW attack with 35002 KB    depth   byte(vote)&lt;br /&gt;
    0    0/  2   FF(50176) 1C(43520) E6(42752) 3F(42496) B6(42496) &lt;br /&gt;
    1    0/  6   FF(48128) AC(46336) 90(42752) 8E(42496) 04(42240) &lt;br /&gt;
    2    0/  1   BD(50688) 7F(43776) 75(42752) E6(41216) F2(41216) &lt;br /&gt;
    3    9/  3   CE(39936) 05(39680) 5C(39680) 9A(39168) F4(39168) &lt;br /&gt;
    4   41/  4   6C(37376) 1E(37120) 80(37120) 88(37120) A7(37120) &lt;br /&gt;
&lt;br /&gt;
             KEY FOUND! [ FF:FF:FF:FF:FA:BC:12:CB:AE:EE:EE:EE:EE ]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
ssh -oKexAlgorithms=+diffie-hellman-group14-sha1 -oHostKeyAlgorithms=+ssh-rsa -oCiphers=+aes128-cbc admin@172.27.0.1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
C9200-E304&amp;gt;en&lt;br /&gt;
Password: &lt;br /&gt;
C9200-E304#config t&lt;br /&gt;
Enter configuration commands, one per line.  End with CNTL/Z.&lt;br /&gt;
C9200-E304(config)#vlan 28&lt;br /&gt;
C9200-E304(config-vlan)#name PoolEvora&lt;br /&gt;
C9200-E304(config-vlan)#exit &lt;br /&gt;
C9200-E304(config)#exit&lt;br /&gt;
C9200-E304#write&lt;br /&gt;
Building configuration...&lt;br /&gt;
[OK]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
C9200-E304#en&lt;br /&gt;
C9200-E304#config t&lt;br /&gt;
Enter configuration commands, one per line.  End with CNTL/Z.&lt;br /&gt;
C9200-E304(config)#ip dhcp pool PoolEvora  &lt;br /&gt;
C9200-E304(dhcp-config)#network 10.60.11.0 255.255.255.0&lt;br /&gt;
C9200-E304(dhcp-config)#dns-server 193.48.57.172&lt;br /&gt;
C9200-E304(dhcp-config)#default-router 10.60.11.254&lt;br /&gt;
C9200-E304(dhcp-config)#exit&lt;br /&gt;
C9200-E304(config)#exit&lt;br /&gt;
C9200-E304#write&lt;br /&gt;
Building configuration...&lt;br /&gt;
[OK]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
ip dhcp pool PoolTom&lt;br /&gt;
 network 10.60.10.0 255.255.255.0&lt;br /&gt;
 dns-server 193.48.57.168 &lt;br /&gt;
 default-router 10.60.10.254 &lt;br /&gt;
!         &lt;br /&gt;
ip dhcp pool PoolEvora&lt;br /&gt;
 network 10.60.11.0 255.255.255.0&lt;br /&gt;
 dns-server 193.48.57.172 &lt;br /&gt;
 default-router 10.60.11.254 &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;VRRP&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
C9200-E304&amp;gt;en &lt;br /&gt;
Password: &lt;br /&gt;
C9200-E304#config t&lt;br /&gt;
Enter configuration commands, one per line.  End with CNTL/Z.&lt;br /&gt;
C9200-E304(config)#interface vlan 28&lt;br /&gt;
C9200-E304(config-if)#ip address 10.60.11.2 255.255.255.0&lt;br /&gt;
C9200-E304(config-if)#ipv6 address 2001:660:4401:60ab::2/64&lt;br /&gt;
C9200-E304(config-if)#vrrp 28 address-family ipv4        &lt;br /&gt;
C9200-E304(config-if-vrrp)#priority 110&lt;br /&gt;
C9200-E304(config-if-vrrp)#address 10.60.11.1 primary&lt;br /&gt;
C9200-E304(config-if-vrrp)#exit&lt;br /&gt;
C9200-E304(config-if)#exit&lt;br /&gt;
C9200-E304(config)#exit&lt;br /&gt;
C9200-E304#write&lt;br /&gt;
Building configuration...&lt;br /&gt;
[OK]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;WIFI e304&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
ssh admin@172.27.0.4 \&lt;br /&gt;
  -o KexAlgorithms=+diffie-hellman-group1-sha1 \&lt;br /&gt;
  -o HostKeyAlgorithms=+ssh-rsa \&lt;br /&gt;
  -o Ciphers=+aes128-cbc \&lt;br /&gt;
  -o MACs=+hmac-sha1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Vsouopme</name></author>
	</entry>
	<entry>
		<id>https://wiki-se.plil.fr/mediawiki/index.php?title=Atelier_SysRes_SE4_2025/2026_E11&amp;diff=12278</id>
		<title>Atelier SysRes SE4 2025/2026 E11</title>
		<link rel="alternate" type="text/html" href="https://wiki-se.plil.fr/mediawiki/index.php?title=Atelier_SysRes_SE4_2025/2026_E11&amp;diff=12278"/>
		<updated>2026-02-19T09:33:04Z</updated>

		<summary type="html">&lt;p&gt;Vsouopme : /* Modification du fichier /etc/fstab pour un montage automatique au démarrage : */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Projet Virtualisation /Administration Systeme-Réseau - Machine SE4.Elf =&lt;br /&gt;
Dans le cadre de ce projet, nnous avons déployés une infrastructure composée de '''deux machines dédiées aux services''' et d’une '''machine mandataire''', le tout à l’aide de l'environnement  '''Xen.'''&lt;br /&gt;
&lt;br /&gt;
== Création des machines virtuelles ==&lt;br /&gt;
Les machines sont créées  sur le Dom0 '''Capbreton.plil.info''' en faisant un '''ssh root@capbreton.plil.info''' &lt;br /&gt;
&lt;br /&gt;
Sur la capbreton.plil.info, &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
xen create-image --hostname=SE4.Elf --dhcp --dir=/usr/local/xen --size=10G --dist=excalibur --memory=2G --bridge=Styx --force&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; '''Xen-create-image''' :  Commande permettant de créer une nouvelle machine virtuelle Xen&lt;br /&gt;
&lt;br /&gt;
'''--hostname=SE4.Elf :''' Pour le nom de la machine &lt;br /&gt;
&lt;br /&gt;
'''--size=10G''' : La taille du disque &lt;br /&gt;
&lt;br /&gt;
'''--bridge=Styx''' : Le nom du bridge &lt;br /&gt;
&lt;br /&gt;
Par la suite il faut creer un fichier dans le répertoire &amp;lt;code&amp;gt;/etc/network/interfaces.d&amp;lt;/code&amp;gt; du Dom0 pour créer notre pont. (NB: Il faut noter que cette etape on peut la faire avant la creation de notre VM&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
auto Styx&lt;br /&gt;
&lt;br /&gt;
iface Styx inet manual&lt;br /&gt;
   bridge_ports none&lt;br /&gt;
   up ip link set $IFACE up&lt;br /&gt;
   down ip link set $IFACE down&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;La commande '''xen list :''' Affiche les '''machines virtuelles''' (VM) qui sont actuellement gérées par Xen (Elle fait la liste des VM allumée).&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
root@capbreton:~# xen list&lt;br /&gt;
SE4.batman                                 322  2048     1     -b----      37.5&lt;br /&gt;
SE4.Moon                                   326  2048     1     -b----      41.1&lt;br /&gt;
SE4.C2                                     332  1024     1     -b----      18.1&lt;br /&gt;
SE4.Tension                                343  2048     1     -b----       7.8&lt;br /&gt;
SE4.CachyOS                                365  2048     1     -b----      10.2&lt;br /&gt;
SE4.RockStar                               367  2048     1     -b----       6.1&lt;br /&gt;
SE4.Kasav                                  368  2048     1     -b----       5.9&lt;br /&gt;
SE4.Elf                                    369  2048     1     -b----       5.6&lt;br /&gt;
SE4.catwoman                               370  2048     1     -b----       6.1&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;-La commande '''xen create /etc/xen/SE4.Elf.cfg''' permet d'allumer la Machine virtuellle.&lt;br /&gt;
&lt;br /&gt;
-La commande xen '''console SE4.Elf''' permet d'acceder  / de se connecter  a la VM.&lt;br /&gt;
&lt;br /&gt;
-La commande '''xen shutdown''' '''SE4.Elf''' permet d'eteindre la machine virtuelle.&lt;br /&gt;
&lt;br /&gt;
Lors de la tentative de connexion, il y'a une un probleme , pour y remedier,  '''Ctrl + AltGr + ] =&amp;gt; vi =&amp;gt; :q! =&amp;gt; reconnexion'''&lt;br /&gt;
&lt;br /&gt;
Pour voir le mot de passe de la VM, '''cat /var/log/xen-tools/SE4.Elf.log'''&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
Installation Summary&lt;br /&gt;
---------------------&lt;br /&gt;
Hostname        :  SE4.Elf&lt;br /&gt;
Distribution    :  excalibur&lt;br /&gt;
MAC Address     :  00:16:3E:83:A3:C7&lt;br /&gt;
IP Address(es)  :  dynamic&lt;br /&gt;
SSH Fingerprint :  SHA256:IrPhxhB4m1s+eaPaLynS6NlE/HfL78+y3ba3DPuHFQU (DSA)&lt;br /&gt;
SSH Fingerprint :  SHA256:RT+MZtlFxC7BrdYORzOcxDX+SKsJrLzOGWWngX2pKz4 (ECDSA)&lt;br /&gt;
SSH Fingerprint :  SHA256:aLYvYqUPX2Q/J5P0nTpdpMyrFD5xopRqkFKuYb7QUo4 (ED25519)&lt;br /&gt;
SSH Fingerprint :  SHA256:b0ddm9FYx4/losJU8/pE9MXx7102ygkAMjChOvPlNhE (RSA)&lt;br /&gt;
Root Password   :  X&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;- La commande '''vi /etc/hostname''' pour changer le nom de la VM&lt;br /&gt;
&lt;br /&gt;
== '''Configuration de la Machine de Services''' ==&lt;br /&gt;
Il faut creer deux partitions LVM de 10G pour votre machine virtuelle et modifiez le fichier de configuration de la machine virtuelle de services pour faire en sorte que les répertoires &amp;lt;code&amp;gt;/'''var'''&amp;lt;/code&amp;gt; et &amp;lt;code&amp;gt;'''/home'''&amp;lt;/code&amp;gt; de la machine virtuelle soient implantés sur ces partitions LVM&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
SE4.Poseidon.home lv_home_SE4Elf lv_var_SE4Elf  SE4.Gaby.home SE4.Poseidon.var SE4.Gaby.var &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Apres nous avons modifié le fichier /etc/xen/SE4.Elf.cfg piur y ajouter deux répertoires&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== '''Création et formatage des partitions''' ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
mkfs -t ext4 /dev/xvdb  # Formatage de la partition pour /var &lt;br /&gt;
mkfs -t ext4 /dev/xvdc  # Formatage de la partition pour /home&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== '''Préparer les partitions et déplacer les données :''' ===&lt;br /&gt;
&lt;br /&gt;
* '''Montage temporaire des partitions dans &amp;lt;code&amp;gt;/mnt&amp;lt;/code&amp;gt; :'''&lt;br /&gt;
&lt;br /&gt;
Pour pouvoir déplacer les données, nous avons du monter les nouvelles partitions LVM dans un répertoire temporaire &amp;lt;code&amp;gt;/mnt&amp;lt;/code&amp;gt;.  On a créé 2 partitions une pour &amp;lt;code&amp;gt;/var&amp;lt;/code&amp;gt; et une &amp;lt;code&amp;gt;/home&amp;lt;/code&amp;gt; sous les noms xvdb et xvdc dans  &amp;lt;code&amp;gt;/dev&amp;lt;/code&amp;gt;  ,que l'on monte avec  :&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
mount /dev/xvdb /mnt&lt;br /&gt;
mount /dev/xvdc /mnt&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* '''Déplacement des fichiers existants'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
mv /var/* /mnt # Déplacement des fichiers de /var vers la nouvelle partition&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== '''Démonter les partitions temporaires :''' ===&lt;br /&gt;
Avant de configurer les montages permanents, on démonte les partitions des répertoires temporaires (&amp;lt;code&amp;gt;/mnt&amp;lt;/code&amp;gt;)&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
umount /mnt # Démontage après transfert des données&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== '''Modification du fichier &amp;lt;code&amp;gt;/etc/fstab&amp;lt;/code&amp;gt; pour un montage automatique au démarrage :''' ===&lt;br /&gt;
On modifie le fichier &amp;lt;code&amp;gt;'''/etc/fstab'''&amp;lt;/code&amp;gt;, qui contient la liste des partitions.&lt;br /&gt;
&lt;br /&gt;
Ajout des nouvelles partitions LVM au fichier &amp;lt;code&amp;gt;/etc/fstab&amp;lt;/code&amp;gt; :&lt;br /&gt;
&lt;br /&gt;
* '''/dev/xvdb /var ext4 defaults 0 2'''&lt;br /&gt;
* '''/dev/xvdc /home ext4 defaults 0''' &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
# /etc/fstab: static file system information.&lt;br /&gt;
#&lt;br /&gt;
# &amp;lt;file system&amp;gt; &amp;lt;mount point&amp;gt; &amp;lt;type&amp;gt; &amp;lt;options&amp;gt; &amp;lt;dump&amp;gt; &amp;lt;pass&amp;gt;&lt;br /&gt;
proc             /proc           proc  defaults   0     0&lt;br /&gt;
devpts            /dev/pts       devpts rw,noexec,nosuid,gid=5,mode=620 0 0 /dev/xvda1 none swap sw 0 0&lt;br /&gt;
/dev/xvda1 none swap sw 0 0&lt;br /&gt;
/dev/xvda2 / ext4 noatime,nodiratime,errors=remount-ro 0 1&lt;br /&gt;
/dev/xvdb /var ext4 defaults 0 2 &lt;br /&gt;
/dev/xvdc /home ext4 defaults 0 2&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== '''Monter les partitions définies dans &amp;lt;code&amp;gt;fstab&amp;lt;/code&amp;gt; :''' ===&lt;br /&gt;
Pour monter toutes les partitions définies dans le fichier &amp;lt;code&amp;gt;/etc/fstab&amp;lt;/code&amp;gt;  :&lt;br /&gt;
 mount -a  # Remontage des partitions définies dans fstab&lt;br /&gt;
Cette commande monte toutes les partitions qui ne sont pas encore montées et qui sont définies dans &amp;lt;code&amp;gt;/etc/fstab&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
remet les données dans le fichier déplacer.&lt;br /&gt;
&lt;br /&gt;
Puis, pour appliquer les changement nous avons redémarré la VM :&lt;br /&gt;
&lt;br /&gt;
== '''Serveur SSH''' ==&lt;br /&gt;
Notre machine virtuelle doit etre accessible par SSH, on autorise donc l'accès par l'utilisateur '''Root en modifiant le fichier de de configuration &amp;lt;code&amp;gt;/etc/ssh/sshd_config  :&amp;lt;/code&amp;gt;'''&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
PermitRootLogin yes&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Il faut ensuite redemarrer le serveur ssh en faisant :&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/etc/ssh# /etc/init.d/ssh restart&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Pour gérer la redirection du SSH, on doit configurer '''nftables''' sur nos machines de service en redirigeant les ports 2201 et 2202&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
nft add table ip nat&lt;br /&gt;
nft add chain ip nat PREROUTING { type nat hook prerouting priority 0 \; }&lt;br /&gt;
nft add rule ip nat PREROUTING tcp dport 2201 dnat to 192.168.50.12:22                 &lt;br /&gt;
nft add rule ip nat PREROUTING tcp dport 2202 dnat to 192.168.50.3:22              &lt;br /&gt;
nft add chain ip nat POSTROUTING { type nat hook postrouting priority 100 \; }&lt;br /&gt;
nft add rule ip nat POSTROUTING masquerade&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Maintenant, on peut se connecter en SSH sur les machiches virtuelles de services:  De Elf, on peut se connecter a Kasav&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/# ssh root@192.168.50.3&lt;br /&gt;
root@192.168.50.3's password: &lt;br /&gt;
Linux Kasav 4.19.0-26-amd64 #1 SMP Debian 4.19.304-1 (2024-01-09) x86_64&lt;br /&gt;
&lt;br /&gt;
The programs included with the Devuan GNU/Linux system are free software;&lt;br /&gt;
the exact distribution terms for each program are described in the&lt;br /&gt;
individual files in /usr/share/doc/*/copyright.&lt;br /&gt;
&lt;br /&gt;
Devuan GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent&lt;br /&gt;
permitted by applicable law.&lt;br /&gt;
Last login: Tue Feb  3 11:34:45 2026 from 192.168.50.12&lt;br /&gt;
root@Kasav:~# &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Serveur DNS''' ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
$TTL 86400&lt;br /&gt;
@ IN SOA ns1.elvis21.tech. admin.elvis21.tech. (&lt;br /&gt;
        3298267246      ;Version&lt;br /&gt;
        3600            ;Refresh&lt;br /&gt;
        1800            ;Retry&lt;br /&gt;
        604800          ;Expire&lt;br /&gt;
        86400 )         ;Minimum TTL&lt;br /&gt;
;&lt;br /&gt;
@  IN NS ns1.elvis21.tech.&lt;br /&gt;
&lt;br /&gt;
ns1 IN A 192.168.50.12&lt;br /&gt;
ns2 IN A 192.168.50.1&lt;br /&gt;
 IN A 192.168.50.12&lt;br /&gt;
      IN AAAA 2001:660:4401:60a0:216:3eff:fe83:a3c8&lt;br /&gt;
www IN A 192.168.50.12&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/etc/bind# cat named.conf.local &lt;br /&gt;
zone &amp;quot;elvis21.tech&amp;quot; {&lt;br /&gt;
    type primary;&lt;br /&gt;
    file &amp;quot;/etc/bind/zones/db.elvis21.tech&amp;quot;;&lt;br /&gt;
    allow-transfer {&lt;br /&gt;
      2001:660:4401:60a0:216:3eff:fe70:7f1c;&lt;br /&gt;
      2001:660:4401:60a0:216:3eff:fe9a:ea1c;&lt;br /&gt;
      };&lt;br /&gt;
    also-notify { 2001:660:4401:60a0:216:3eff:fe70:7f1c; };&lt;br /&gt;
    inline-signing yes;   // DNSSEC automatique&lt;br /&gt;
    key-directory &amp;quot;/etc/bind/keys&amp;quot;; // répertoire des clefs, attention aux droits&lt;br /&gt;
    dnssec-policy &amp;quot;dnssecpolicy&amp;quot;;  // politique pour les clefs de chiffrement&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
zone &amp;quot;kasav.online&amp;quot; {&lt;br /&gt;
    type secondary;&lt;br /&gt;
    file &amp;quot;/etc/bind/backup/db.kasav.online&amp;quot;;&lt;br /&gt;
    primaries { 2001:660:4401:60a0:216:3eff:fe9a:ea1c; };&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
dnssec-policy &amp;quot;dnssecpolicy&amp;quot; {&lt;br /&gt;
  keys {&lt;br /&gt;
    ksk key-directory lifetime unlimited algorithm 13;&lt;br /&gt;
    zsk key-directory lifetime unlimited algorithm 13;&lt;br /&gt;
  };&lt;br /&gt;
  nsec3param;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/etc/bind# named-checkzone elvis21.tech /etc/bind/db.elvis21.tech&lt;br /&gt;
zone elvis21.tech/IN: loaded serial 3298267246&lt;br /&gt;
OK&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
openssl req -nodes -newkey rsa:2048 -sha256 -keyout elvis21.tech.key -out elvis21.csr&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
[[Fichier:ImageDns.png|gauche|vignette|994x994px]]&lt;br /&gt;
&lt;br /&gt;
== Mise en place du serveur Apache (http et https) ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
apt update&lt;br /&gt;
apt install apache2&lt;br /&gt;
systemctl enable --now apache2&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
[[Fichier:Elvis21.tech-DNS.png|gauche|vignette|863x863px]]&lt;br /&gt;
&lt;br /&gt;
== Installation Fail2ban ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/# apt install fail2ban &lt;br /&gt;
Installing:                     &lt;br /&gt;
  fail2ban&lt;br /&gt;
&lt;br /&gt;
root@Elf:/# systemctl status fail2ban&lt;br /&gt;
fail2ban.service - Fail2Ban Service&lt;br /&gt;
    Loaded: loaded (/usr/lib/systemd/system/fail2ban.service, disabled)&lt;br /&gt;
    Active: active (running)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/# service fail2ban status                             &lt;br /&gt;
Status of Authentication failure monitor: fail2ban is running.&lt;br /&gt;
 root@Elf:/# fail2ban-client status&lt;br /&gt;
Status&lt;br /&gt;
|- Number of jail:	1&lt;br /&gt;
`- Jail list:	sshd&lt;br /&gt;
&lt;br /&gt;
root@Elf:/# fail2ban-client status sshd&lt;br /&gt;
Status for the jail: sshd&lt;br /&gt;
|- Filter&lt;br /&gt;
|  |- Currently failed:	0&lt;br /&gt;
|  |- Total failed:	0&lt;br /&gt;
|  `- File list:	/var/log/auth.log&lt;br /&gt;
`- Actions&lt;br /&gt;
   |- Currently banned:	0&lt;br /&gt;
   |- Total banned:	0&lt;br /&gt;
   `- Banned IP list:	&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Mise en place du serveur Apache (http et https) ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/# service apache2 status&lt;br /&gt;
apache2 is running.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== WIFI ==&lt;br /&gt;
Faire ip link&lt;br /&gt;
&lt;br /&gt;
ensuite sudo airodump-ng wlanx  -- Remplacer x par le numero du wlan present &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
BSSID              PWR  Beacons    #Data, #/s  CH   MB   ENC CIPHER  AUTH ESSID&lt;br /&gt;
04:DA:D2:9C:50:54  -62       23       11    0   4   54e. WEP  WEP         cracotte05                         &lt;br /&gt;
04:DA:D2:9C:50:5A  -61        2        1    0   4   54e. WEP  WEP         cracotte11    &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;sudo airodump-ng wlan1 --bssid 04:DA:D2:9C:50:5A  -c4 --write log_airdump&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
sudo airodump-ng wlan1 --write airdump --bssid 04:DA:D2:9C:50:5A -c4&lt;br /&gt;
17:31:10  Created capture file &amp;quot;airdump-04.cap&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
 CH  4 ][ Elapsed: 39 mins ][ 2026-02-10 18:11 ][ fixed channel wlan1: 13 &lt;br /&gt;
&lt;br /&gt;
 BSSID              PWR RXQ  Beacons    #Data, #/s  CH   MB   ENC CIPHER  AUTH ESSID&lt;br /&gt;
&lt;br /&gt;
 04:DA:D2:9C:50:5A  -58   3     9766    43771   21   4   54e. WEP  WEP         cracotte11                                                                                                   &lt;br /&gt;
&lt;br /&gt;
 BSSID              STATION            PWR    Rate    Lost   Frames  Notes  Probes&lt;br /&gt;
&lt;br /&gt;
 04:DA:D2:9C:50:5A  40:A5:EF:01:2E:FA  -77    0 -48e   127    46300                                                                                                                          &lt;br /&gt;
Quitting...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
aircrack-ng airdump-05.cap &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
           Aircrack-ng 1.7 &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                 [00:25:47] Tested 869 keys (got 34546 IVs)&lt;br /&gt;
                          Got 35002 out of 35000 IVsStarting PTW attack with 35002 KB    depth   byte(vote)&lt;br /&gt;
    0    0/  2   FF(50176) 1C(43520) E6(42752) 3F(42496) B6(42496) &lt;br /&gt;
    1    0/  6   FF(48128) AC(46336) 90(42752) 8E(42496) 04(42240) &lt;br /&gt;
    2    0/  1   BD(50688) 7F(43776) 75(42752) E6(41216) F2(41216) &lt;br /&gt;
    3    9/  3   CE(39936) 05(39680) 5C(39680) 9A(39168) F4(39168) &lt;br /&gt;
    4   41/  4   6C(37376) 1E(37120) 80(37120) 88(37120) A7(37120) &lt;br /&gt;
&lt;br /&gt;
             KEY FOUND! [ FF:FF:FF:FF:FA:BC:12:CB:AE:EE:EE:EE:EE ]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
ssh -oKexAlgorithms=+diffie-hellman-group14-sha1 -oHostKeyAlgorithms=+ssh-rsa -oCiphers=+aes128-cbc admin@172.27.0.1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
C9200-E304&amp;gt;en&lt;br /&gt;
Password: &lt;br /&gt;
C9200-E304#config t&lt;br /&gt;
Enter configuration commands, one per line.  End with CNTL/Z.&lt;br /&gt;
C9200-E304(config)#vlan 28&lt;br /&gt;
C9200-E304(config-vlan)#name PoolEvora&lt;br /&gt;
C9200-E304(config-vlan)#exit &lt;br /&gt;
C9200-E304(config)#exit&lt;br /&gt;
C9200-E304#write&lt;br /&gt;
Building configuration...&lt;br /&gt;
[OK]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
C9200-E304#en&lt;br /&gt;
C9200-E304#config t&lt;br /&gt;
Enter configuration commands, one per line.  End with CNTL/Z.&lt;br /&gt;
C9200-E304(config)#ip dhcp pool PoolEvora  &lt;br /&gt;
C9200-E304(dhcp-config)#network 10.60.11.0 255.255.255.0&lt;br /&gt;
C9200-E304(dhcp-config)#dns-server 193.48.57.172&lt;br /&gt;
C9200-E304(dhcp-config)#default-router 10.60.11.254&lt;br /&gt;
C9200-E304(dhcp-config)#exit&lt;br /&gt;
C9200-E304(config)#exit&lt;br /&gt;
C9200-E304#write&lt;br /&gt;
Building configuration...&lt;br /&gt;
[OK]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
ip dhcp pool PoolTom&lt;br /&gt;
 network 10.60.10.0 255.255.255.0&lt;br /&gt;
 dns-server 193.48.57.168 &lt;br /&gt;
 default-router 10.60.10.254 &lt;br /&gt;
!         &lt;br /&gt;
ip dhcp pool PoolEvora&lt;br /&gt;
 network 10.60.11.0 255.255.255.0&lt;br /&gt;
 dns-server 193.48.57.172 &lt;br /&gt;
 default-router 10.60.11.254 &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;VRRP&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
C9200-E304&amp;gt;en &lt;br /&gt;
Password: &lt;br /&gt;
C9200-E304#config t&lt;br /&gt;
Enter configuration commands, one per line.  End with CNTL/Z.&lt;br /&gt;
C9200-E304(config)#interface vlan 28&lt;br /&gt;
C9200-E304(config-if)#ip address 10.60.11.2 255.255.255.0&lt;br /&gt;
C9200-E304(config-if)#ipv6 address 2001:660:4401:60ab::2/64&lt;br /&gt;
C9200-E304(config-if)#vrrp 28 address-family ipv4        &lt;br /&gt;
C9200-E304(config-if-vrrp)#priority 110&lt;br /&gt;
C9200-E304(config-if-vrrp)#address 10.60.11.1 primary&lt;br /&gt;
C9200-E304(config-if-vrrp)#exit&lt;br /&gt;
C9200-E304(config-if)#exit&lt;br /&gt;
C9200-E304(config)#exit&lt;br /&gt;
C9200-E304#write&lt;br /&gt;
Building configuration...&lt;br /&gt;
[OK]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;WIFI e304&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
ssh admin@172.27.0.4 \&lt;br /&gt;
  -o KexAlgorithms=+diffie-hellman-group1-sha1 \&lt;br /&gt;
  -o HostKeyAlgorithms=+ssh-rsa \&lt;br /&gt;
  -o Ciphers=+aes128-cbc \&lt;br /&gt;
  -o MACs=+hmac-sha1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Vsouopme</name></author>
	</entry>
	<entry>
		<id>https://wiki-se.plil.fr/mediawiki/index.php?title=Atelier_SysRes_SE4_2025/2026_E11&amp;diff=12277</id>
		<title>Atelier SysRes SE4 2025/2026 E11</title>
		<link rel="alternate" type="text/html" href="https://wiki-se.plil.fr/mediawiki/index.php?title=Atelier_SysRes_SE4_2025/2026_E11&amp;diff=12277"/>
		<updated>2026-02-19T09:23:40Z</updated>

		<summary type="html">&lt;p&gt;Vsouopme : /* Préparer les partitions et déplacer les données : */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Projet Virtualisation /Administration Systeme-Réseau - Machine SE4.Elf =&lt;br /&gt;
Dans le cadre de ce projet, nnous avons déployés une infrastructure composée de '''deux machines dédiées aux services''' et d’une '''machine mandataire''', le tout à l’aide de l'environnement  '''Xen.'''&lt;br /&gt;
&lt;br /&gt;
== Création des machines virtuelles ==&lt;br /&gt;
Les machines sont créées  sur le Dom0 '''Capbreton.plil.info''' en faisant un '''ssh root@capbreton.plil.info''' &lt;br /&gt;
&lt;br /&gt;
Sur la capbreton.plil.info, &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
xen create-image --hostname=SE4.Elf --dhcp --dir=/usr/local/xen --size=10G --dist=excalibur --memory=2G --bridge=Styx --force&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; '''Xen-create-image''' :  Commande permettant de créer une nouvelle machine virtuelle Xen&lt;br /&gt;
&lt;br /&gt;
'''--hostname=SE4.Elf :''' Pour le nom de la machine &lt;br /&gt;
&lt;br /&gt;
'''--size=10G''' : La taille du disque &lt;br /&gt;
&lt;br /&gt;
'''--bridge=Styx''' : Le nom du bridge &lt;br /&gt;
&lt;br /&gt;
Par la suite il faut creer un fichier dans le répertoire &amp;lt;code&amp;gt;/etc/network/interfaces.d&amp;lt;/code&amp;gt; du Dom0 pour créer notre pont. (NB: Il faut noter que cette etape on peut la faire avant la creation de notre VM&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
auto Styx&lt;br /&gt;
&lt;br /&gt;
iface Styx inet manual&lt;br /&gt;
   bridge_ports none&lt;br /&gt;
   up ip link set $IFACE up&lt;br /&gt;
   down ip link set $IFACE down&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;La commande '''xen list :''' Affiche les '''machines virtuelles''' (VM) qui sont actuellement gérées par Xen (Elle fait la liste des VM allumée).&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
root@capbreton:~# xen list&lt;br /&gt;
SE4.batman                                 322  2048     1     -b----      37.5&lt;br /&gt;
SE4.Moon                                   326  2048     1     -b----      41.1&lt;br /&gt;
SE4.C2                                     332  1024     1     -b----      18.1&lt;br /&gt;
SE4.Tension                                343  2048     1     -b----       7.8&lt;br /&gt;
SE4.CachyOS                                365  2048     1     -b----      10.2&lt;br /&gt;
SE4.RockStar                               367  2048     1     -b----       6.1&lt;br /&gt;
SE4.Kasav                                  368  2048     1     -b----       5.9&lt;br /&gt;
SE4.Elf                                    369  2048     1     -b----       5.6&lt;br /&gt;
SE4.catwoman                               370  2048     1     -b----       6.1&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;-La commande '''xen create /etc/xen/SE4.Elf.cfg''' permet d'allumer la Machine virtuellle.&lt;br /&gt;
&lt;br /&gt;
-La commande xen '''console SE4.Elf''' permet d'acceder  / de se connecter  a la VM.&lt;br /&gt;
&lt;br /&gt;
-La commande '''xen shutdown''' '''SE4.Elf''' permet d'eteindre la machine virtuelle.&lt;br /&gt;
&lt;br /&gt;
Lors de la tentative de connexion, il y'a une un probleme , pour y remedier,  '''Ctrl + AltGr + ] =&amp;gt; vi =&amp;gt; :q! =&amp;gt; reconnexion'''&lt;br /&gt;
&lt;br /&gt;
Pour voir le mot de passe de la VM, '''cat /var/log/xen-tools/SE4.Elf.log'''&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
Installation Summary&lt;br /&gt;
---------------------&lt;br /&gt;
Hostname        :  SE4.Elf&lt;br /&gt;
Distribution    :  excalibur&lt;br /&gt;
MAC Address     :  00:16:3E:83:A3:C7&lt;br /&gt;
IP Address(es)  :  dynamic&lt;br /&gt;
SSH Fingerprint :  SHA256:IrPhxhB4m1s+eaPaLynS6NlE/HfL78+y3ba3DPuHFQU (DSA)&lt;br /&gt;
SSH Fingerprint :  SHA256:RT+MZtlFxC7BrdYORzOcxDX+SKsJrLzOGWWngX2pKz4 (ECDSA)&lt;br /&gt;
SSH Fingerprint :  SHA256:aLYvYqUPX2Q/J5P0nTpdpMyrFD5xopRqkFKuYb7QUo4 (ED25519)&lt;br /&gt;
SSH Fingerprint :  SHA256:b0ddm9FYx4/losJU8/pE9MXx7102ygkAMjChOvPlNhE (RSA)&lt;br /&gt;
Root Password   :  X&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;- La commande '''vi /etc/hostname''' pour changer le nom de la VM&lt;br /&gt;
&lt;br /&gt;
== '''Configuration de la Machine de Services''' ==&lt;br /&gt;
Il faut creer deux partitions LVM de 10G pour votre machine virtuelle et modifiez le fichier de configuration de la machine virtuelle de services pour faire en sorte que les répertoires &amp;lt;code&amp;gt;/'''var'''&amp;lt;/code&amp;gt; et &amp;lt;code&amp;gt;'''/home'''&amp;lt;/code&amp;gt; de la machine virtuelle soient implantés sur ces partitions LVM&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
SE4.Poseidon.home lv_home_SE4Elf lv_var_SE4Elf  SE4.Gaby.home SE4.Poseidon.var SE4.Gaby.var &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Apres nous avons modifié le fichier /etc/xen/SE4.Elf.cfg piur y ajouter deux répertoires&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== '''Création et formatage des partitions''' ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
mkfs -t ext4 /dev/xvdb  # Formatage de la partition pour /var &lt;br /&gt;
mkfs -t ext4 /dev/xvdc  # Formatage de la partition pour /home&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== '''Préparer les partitions et déplacer les données :''' ===&lt;br /&gt;
&lt;br /&gt;
* '''Montage temporaire des partitions dans &amp;lt;code&amp;gt;/mnt&amp;lt;/code&amp;gt; :'''&lt;br /&gt;
&lt;br /&gt;
Pour pouvoir déplacer les données, nous avons du monter les nouvelles partitions LVM dans un répertoire temporaire &amp;lt;code&amp;gt;/mnt&amp;lt;/code&amp;gt;.  On a créé 2 partitions une pour &amp;lt;code&amp;gt;/var&amp;lt;/code&amp;gt; et une &amp;lt;code&amp;gt;/home&amp;lt;/code&amp;gt; sous les noms xvdb et xvdc dans  &amp;lt;code&amp;gt;/dev&amp;lt;/code&amp;gt;  ,que l'on monte avec  :&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
mount /dev/xvdb /mnt&lt;br /&gt;
mount /dev/xvdc /mnt&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* '''Déplacement des fichiers existants'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
mv /var/* /mnt # Déplacement des fichiers de /var vers la nouvelle partition&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== '''Démonter les partitions temporaires :''' ===&lt;br /&gt;
Avant de configurer les montages permanents, on démonte les partitions des répertoires temporaires (&amp;lt;code&amp;gt;/mnt&amp;lt;/code&amp;gt;)&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
umount /mnt # Démontage après transfert des données&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== '''Modification du fichier &amp;lt;code&amp;gt;/etc/fstab&amp;lt;/code&amp;gt; pour un montage automatique au démarrage :''' =====&lt;br /&gt;
On modifie le fichier &amp;lt;code&amp;gt;/etc/fstab&amp;lt;/code&amp;gt;, qui contient la liste des partitions.&lt;br /&gt;
&lt;br /&gt;
Ajout des nouvelles partitions LVM au fichier &amp;lt;code&amp;gt;/etc/fstab&amp;lt;/code&amp;gt; :&lt;br /&gt;
&lt;br /&gt;
* /dev/xvdb /var ext4 defaults 0 2&lt;br /&gt;
* /dev/xvdc /home ext4 defaults 0 2&lt;br /&gt;
&lt;br /&gt;
 # /etc/fstab: static file system information.&lt;br /&gt;
 #&lt;br /&gt;
 # &amp;lt;file system&amp;gt; &amp;lt;mount point&amp;gt;   &amp;lt;type&amp;gt;  &amp;lt;options&amp;gt;       &amp;lt;dump&amp;gt;  &amp;lt;pass&amp;gt;&lt;br /&gt;
 proc            /proc           proc    defaults        0       0&lt;br /&gt;
 devpts          /dev/pts        devpts  rw,noexec,nosuid,gid=5,mode=620 0  0&lt;br /&gt;
 /dev/xvda1 none swap sw 0 0&lt;br /&gt;
 /dev/xvda2 / ext4 noatime,nodiratime,errors=remount-ro 0 1&lt;br /&gt;
 /dev/xvdb /var ext4 defaults 0 2&lt;br /&gt;
 /dev/xvdc /home ext4 defaults 0 2&lt;br /&gt;
&lt;br /&gt;
===== '''Monter les partitions définies dans &amp;lt;code&amp;gt;fstab&amp;lt;/code&amp;gt; :''' =====&lt;br /&gt;
Pour monter toutes les partitions définies dans le fichier &amp;lt;code&amp;gt;/etc/fstab&amp;lt;/code&amp;gt;  :&lt;br /&gt;
 mount -a  # Remontage des partitions définies dans fstab&lt;br /&gt;
Cette commande monte toutes les partitions qui ne sont pas encore montées et qui sont définies dans &amp;lt;code&amp;gt;/etc/fstab&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
remet les données dans le fichier déplacer.&lt;br /&gt;
&lt;br /&gt;
Puis, pour appliquer les changement nous avons redémarré la VM :&lt;br /&gt;
&lt;br /&gt;
== '''Serveur SSH''' ==&lt;br /&gt;
Notre machine virtuelle doit etre accessible par SSH, on autorise donc l'accès par l'utilisateur '''Root en modifiant le fichier de de configuration &amp;lt;code&amp;gt;/etc/ssh/sshd_config  :&amp;lt;/code&amp;gt;'''&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
PermitRootLogin yes&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Il faut ensuite redemarrer le serveur ssh en faisant :&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/etc/ssh# /etc/init.d/ssh restart&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Pour gérer la redirection du SSH, on doit configurer '''nftables''' sur nos machines de service en redirigeant les ports 2201 et 2202&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
nft add table ip nat&lt;br /&gt;
nft add chain ip nat PREROUTING { type nat hook prerouting priority 0 \; }&lt;br /&gt;
nft add rule ip nat PREROUTING tcp dport 2201 dnat to 192.168.50.12:22                 &lt;br /&gt;
nft add rule ip nat PREROUTING tcp dport 2202 dnat to 192.168.50.3:22              &lt;br /&gt;
nft add chain ip nat POSTROUTING { type nat hook postrouting priority 100 \; }&lt;br /&gt;
nft add rule ip nat POSTROUTING masquerade&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Maintenant, on peut se connecter en SSH sur les machiches virtuelles de services:  De Elf, on peut se connecter a Kasav&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/# ssh root@192.168.50.3&lt;br /&gt;
root@192.168.50.3's password: &lt;br /&gt;
Linux Kasav 4.19.0-26-amd64 #1 SMP Debian 4.19.304-1 (2024-01-09) x86_64&lt;br /&gt;
&lt;br /&gt;
The programs included with the Devuan GNU/Linux system are free software;&lt;br /&gt;
the exact distribution terms for each program are described in the&lt;br /&gt;
individual files in /usr/share/doc/*/copyright.&lt;br /&gt;
&lt;br /&gt;
Devuan GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent&lt;br /&gt;
permitted by applicable law.&lt;br /&gt;
Last login: Tue Feb  3 11:34:45 2026 from 192.168.50.12&lt;br /&gt;
root@Kasav:~# &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Serveur DNS''' ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
$TTL 86400&lt;br /&gt;
@ IN SOA ns1.elvis21.tech. admin.elvis21.tech. (&lt;br /&gt;
        3298267246      ;Version&lt;br /&gt;
        3600            ;Refresh&lt;br /&gt;
        1800            ;Retry&lt;br /&gt;
        604800          ;Expire&lt;br /&gt;
        86400 )         ;Minimum TTL&lt;br /&gt;
;&lt;br /&gt;
@  IN NS ns1.elvis21.tech.&lt;br /&gt;
&lt;br /&gt;
ns1 IN A 192.168.50.12&lt;br /&gt;
ns2 IN A 192.168.50.1&lt;br /&gt;
 IN A 192.168.50.12&lt;br /&gt;
      IN AAAA 2001:660:4401:60a0:216:3eff:fe83:a3c8&lt;br /&gt;
www IN A 192.168.50.12&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/etc/bind# cat named.conf.local &lt;br /&gt;
zone &amp;quot;elvis21.tech&amp;quot; {&lt;br /&gt;
    type primary;&lt;br /&gt;
    file &amp;quot;/etc/bind/zones/db.elvis21.tech&amp;quot;;&lt;br /&gt;
    allow-transfer {&lt;br /&gt;
      2001:660:4401:60a0:216:3eff:fe70:7f1c;&lt;br /&gt;
      2001:660:4401:60a0:216:3eff:fe9a:ea1c;&lt;br /&gt;
      };&lt;br /&gt;
    also-notify { 2001:660:4401:60a0:216:3eff:fe70:7f1c; };&lt;br /&gt;
    inline-signing yes;   // DNSSEC automatique&lt;br /&gt;
    key-directory &amp;quot;/etc/bind/keys&amp;quot;; // répertoire des clefs, attention aux droits&lt;br /&gt;
    dnssec-policy &amp;quot;dnssecpolicy&amp;quot;;  // politique pour les clefs de chiffrement&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
zone &amp;quot;kasav.online&amp;quot; {&lt;br /&gt;
    type secondary;&lt;br /&gt;
    file &amp;quot;/etc/bind/backup/db.kasav.online&amp;quot;;&lt;br /&gt;
    primaries { 2001:660:4401:60a0:216:3eff:fe9a:ea1c; };&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
dnssec-policy &amp;quot;dnssecpolicy&amp;quot; {&lt;br /&gt;
  keys {&lt;br /&gt;
    ksk key-directory lifetime unlimited algorithm 13;&lt;br /&gt;
    zsk key-directory lifetime unlimited algorithm 13;&lt;br /&gt;
  };&lt;br /&gt;
  nsec3param;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/etc/bind# named-checkzone elvis21.tech /etc/bind/db.elvis21.tech&lt;br /&gt;
zone elvis21.tech/IN: loaded serial 3298267246&lt;br /&gt;
OK&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
openssl req -nodes -newkey rsa:2048 -sha256 -keyout elvis21.tech.key -out elvis21.csr&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
[[Fichier:ImageDns.png|gauche|vignette|994x994px]]&lt;br /&gt;
&lt;br /&gt;
== Mise en place du serveur Apache (http et https) ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
apt update&lt;br /&gt;
apt install apache2&lt;br /&gt;
systemctl enable --now apache2&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
[[Fichier:Elvis21.tech-DNS.png|gauche|vignette|863x863px]]&lt;br /&gt;
&lt;br /&gt;
== Installation Fail2ban ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/# apt install fail2ban &lt;br /&gt;
Installing:                     &lt;br /&gt;
  fail2ban&lt;br /&gt;
&lt;br /&gt;
root@Elf:/# systemctl status fail2ban&lt;br /&gt;
fail2ban.service - Fail2Ban Service&lt;br /&gt;
    Loaded: loaded (/usr/lib/systemd/system/fail2ban.service, disabled)&lt;br /&gt;
    Active: active (running)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/# service fail2ban status                             &lt;br /&gt;
Status of Authentication failure monitor: fail2ban is running.&lt;br /&gt;
 root@Elf:/# fail2ban-client status&lt;br /&gt;
Status&lt;br /&gt;
|- Number of jail:	1&lt;br /&gt;
`- Jail list:	sshd&lt;br /&gt;
&lt;br /&gt;
root@Elf:/# fail2ban-client status sshd&lt;br /&gt;
Status for the jail: sshd&lt;br /&gt;
|- Filter&lt;br /&gt;
|  |- Currently failed:	0&lt;br /&gt;
|  |- Total failed:	0&lt;br /&gt;
|  `- File list:	/var/log/auth.log&lt;br /&gt;
`- Actions&lt;br /&gt;
   |- Currently banned:	0&lt;br /&gt;
   |- Total banned:	0&lt;br /&gt;
   `- Banned IP list:	&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Mise en place du serveur Apache (http et https) ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/# service apache2 status&lt;br /&gt;
apache2 is running.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== WIFI ==&lt;br /&gt;
Faire ip link&lt;br /&gt;
&lt;br /&gt;
ensuite sudo airodump-ng wlanx  -- Remplacer x par le numero du wlan present &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
BSSID              PWR  Beacons    #Data, #/s  CH   MB   ENC CIPHER  AUTH ESSID&lt;br /&gt;
04:DA:D2:9C:50:54  -62       23       11    0   4   54e. WEP  WEP         cracotte05                         &lt;br /&gt;
04:DA:D2:9C:50:5A  -61        2        1    0   4   54e. WEP  WEP         cracotte11    &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;sudo airodump-ng wlan1 --bssid 04:DA:D2:9C:50:5A  -c4 --write log_airdump&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
sudo airodump-ng wlan1 --write airdump --bssid 04:DA:D2:9C:50:5A -c4&lt;br /&gt;
17:31:10  Created capture file &amp;quot;airdump-04.cap&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
 CH  4 ][ Elapsed: 39 mins ][ 2026-02-10 18:11 ][ fixed channel wlan1: 13 &lt;br /&gt;
&lt;br /&gt;
 BSSID              PWR RXQ  Beacons    #Data, #/s  CH   MB   ENC CIPHER  AUTH ESSID&lt;br /&gt;
&lt;br /&gt;
 04:DA:D2:9C:50:5A  -58   3     9766    43771   21   4   54e. WEP  WEP         cracotte11                                                                                                   &lt;br /&gt;
&lt;br /&gt;
 BSSID              STATION            PWR    Rate    Lost   Frames  Notes  Probes&lt;br /&gt;
&lt;br /&gt;
 04:DA:D2:9C:50:5A  40:A5:EF:01:2E:FA  -77    0 -48e   127    46300                                                                                                                          &lt;br /&gt;
Quitting...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
aircrack-ng airdump-05.cap &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
           Aircrack-ng 1.7 &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                 [00:25:47] Tested 869 keys (got 34546 IVs)&lt;br /&gt;
                          Got 35002 out of 35000 IVsStarting PTW attack with 35002 KB    depth   byte(vote)&lt;br /&gt;
    0    0/  2   FF(50176) 1C(43520) E6(42752) 3F(42496) B6(42496) &lt;br /&gt;
    1    0/  6   FF(48128) AC(46336) 90(42752) 8E(42496) 04(42240) &lt;br /&gt;
    2    0/  1   BD(50688) 7F(43776) 75(42752) E6(41216) F2(41216) &lt;br /&gt;
    3    9/  3   CE(39936) 05(39680) 5C(39680) 9A(39168) F4(39168) &lt;br /&gt;
    4   41/  4   6C(37376) 1E(37120) 80(37120) 88(37120) A7(37120) &lt;br /&gt;
&lt;br /&gt;
             KEY FOUND! [ FF:FF:FF:FF:FA:BC:12:CB:AE:EE:EE:EE:EE ]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
ssh -oKexAlgorithms=+diffie-hellman-group14-sha1 -oHostKeyAlgorithms=+ssh-rsa -oCiphers=+aes128-cbc admin@172.27.0.1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
C9200-E304&amp;gt;en&lt;br /&gt;
Password: &lt;br /&gt;
C9200-E304#config t&lt;br /&gt;
Enter configuration commands, one per line.  End with CNTL/Z.&lt;br /&gt;
C9200-E304(config)#vlan 28&lt;br /&gt;
C9200-E304(config-vlan)#name PoolEvora&lt;br /&gt;
C9200-E304(config-vlan)#exit &lt;br /&gt;
C9200-E304(config)#exit&lt;br /&gt;
C9200-E304#write&lt;br /&gt;
Building configuration...&lt;br /&gt;
[OK]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
C9200-E304#en&lt;br /&gt;
C9200-E304#config t&lt;br /&gt;
Enter configuration commands, one per line.  End with CNTL/Z.&lt;br /&gt;
C9200-E304(config)#ip dhcp pool PoolEvora  &lt;br /&gt;
C9200-E304(dhcp-config)#network 10.60.11.0 255.255.255.0&lt;br /&gt;
C9200-E304(dhcp-config)#dns-server 193.48.57.172&lt;br /&gt;
C9200-E304(dhcp-config)#default-router 10.60.11.254&lt;br /&gt;
C9200-E304(dhcp-config)#exit&lt;br /&gt;
C9200-E304(config)#exit&lt;br /&gt;
C9200-E304#write&lt;br /&gt;
Building configuration...&lt;br /&gt;
[OK]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
ip dhcp pool PoolTom&lt;br /&gt;
 network 10.60.10.0 255.255.255.0&lt;br /&gt;
 dns-server 193.48.57.168 &lt;br /&gt;
 default-router 10.60.10.254 &lt;br /&gt;
!         &lt;br /&gt;
ip dhcp pool PoolEvora&lt;br /&gt;
 network 10.60.11.0 255.255.255.0&lt;br /&gt;
 dns-server 193.48.57.172 &lt;br /&gt;
 default-router 10.60.11.254 &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;VRRP&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
C9200-E304&amp;gt;en &lt;br /&gt;
Password: &lt;br /&gt;
C9200-E304#config t&lt;br /&gt;
Enter configuration commands, one per line.  End with CNTL/Z.&lt;br /&gt;
C9200-E304(config)#interface vlan 28&lt;br /&gt;
C9200-E304(config-if)#ip address 10.60.11.2 255.255.255.0&lt;br /&gt;
C9200-E304(config-if)#ipv6 address 2001:660:4401:60ab::2/64&lt;br /&gt;
C9200-E304(config-if)#vrrp 28 address-family ipv4        &lt;br /&gt;
C9200-E304(config-if-vrrp)#priority 110&lt;br /&gt;
C9200-E304(config-if-vrrp)#address 10.60.11.1 primary&lt;br /&gt;
C9200-E304(config-if-vrrp)#exit&lt;br /&gt;
C9200-E304(config-if)#exit&lt;br /&gt;
C9200-E304(config)#exit&lt;br /&gt;
C9200-E304#write&lt;br /&gt;
Building configuration...&lt;br /&gt;
[OK]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;WIFI e304&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
ssh admin@172.27.0.4 \&lt;br /&gt;
  -o KexAlgorithms=+diffie-hellman-group1-sha1 \&lt;br /&gt;
  -o HostKeyAlgorithms=+ssh-rsa \&lt;br /&gt;
  -o Ciphers=+aes128-cbc \&lt;br /&gt;
  -o MACs=+hmac-sha1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Vsouopme</name></author>
	</entry>
	<entry>
		<id>https://wiki-se.plil.fr/mediawiki/index.php?title=Atelier_SysRes_SE4_2025/2026_E11&amp;diff=12276</id>
		<title>Atelier SysRes SE4 2025/2026 E11</title>
		<link rel="alternate" type="text/html" href="https://wiki-se.plil.fr/mediawiki/index.php?title=Atelier_SysRes_SE4_2025/2026_E11&amp;diff=12276"/>
		<updated>2026-02-19T09:08:16Z</updated>

		<summary type="html">&lt;p&gt;Vsouopme : /* Configuration de la Machine de Services */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Projet Virtualisation /Administration Systeme-Réseau - Machine SE4.Elf =&lt;br /&gt;
Dans le cadre de ce projet, nnous avons déployés une infrastructure composée de '''deux machines dédiées aux services''' et d’une '''machine mandataire''', le tout à l’aide de l'environnement  '''Xen.'''&lt;br /&gt;
&lt;br /&gt;
== Création des machines virtuelles ==&lt;br /&gt;
Les machines sont créées  sur le Dom0 '''Capbreton.plil.info''' en faisant un '''ssh root@capbreton.plil.info''' &lt;br /&gt;
&lt;br /&gt;
Sur la capbreton.plil.info, &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
xen create-image --hostname=SE4.Elf --dhcp --dir=/usr/local/xen --size=10G --dist=excalibur --memory=2G --bridge=Styx --force&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; '''Xen-create-image''' :  Commande permettant de créer une nouvelle machine virtuelle Xen&lt;br /&gt;
&lt;br /&gt;
'''--hostname=SE4.Elf :''' Pour le nom de la machine &lt;br /&gt;
&lt;br /&gt;
'''--size=10G''' : La taille du disque &lt;br /&gt;
&lt;br /&gt;
'''--bridge=Styx''' : Le nom du bridge &lt;br /&gt;
&lt;br /&gt;
Par la suite il faut creer un fichier dans le répertoire &amp;lt;code&amp;gt;/etc/network/interfaces.d&amp;lt;/code&amp;gt; du Dom0 pour créer notre pont. (NB: Il faut noter que cette etape on peut la faire avant la creation de notre VM&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
auto Styx&lt;br /&gt;
&lt;br /&gt;
iface Styx inet manual&lt;br /&gt;
   bridge_ports none&lt;br /&gt;
   up ip link set $IFACE up&lt;br /&gt;
   down ip link set $IFACE down&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;La commande '''xen list :''' Affiche les '''machines virtuelles''' (VM) qui sont actuellement gérées par Xen (Elle fait la liste des VM allumée).&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
root@capbreton:~# xen list&lt;br /&gt;
SE4.batman                                 322  2048     1     -b----      37.5&lt;br /&gt;
SE4.Moon                                   326  2048     1     -b----      41.1&lt;br /&gt;
SE4.C2                                     332  1024     1     -b----      18.1&lt;br /&gt;
SE4.Tension                                343  2048     1     -b----       7.8&lt;br /&gt;
SE4.CachyOS                                365  2048     1     -b----      10.2&lt;br /&gt;
SE4.RockStar                               367  2048     1     -b----       6.1&lt;br /&gt;
SE4.Kasav                                  368  2048     1     -b----       5.9&lt;br /&gt;
SE4.Elf                                    369  2048     1     -b----       5.6&lt;br /&gt;
SE4.catwoman                               370  2048     1     -b----       6.1&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;-La commande '''xen create /etc/xen/SE4.Elf.cfg''' permet d'allumer la Machine virtuellle.&lt;br /&gt;
&lt;br /&gt;
-La commande xen '''console SE4.Elf''' permet d'acceder  / de se connecter  a la VM.&lt;br /&gt;
&lt;br /&gt;
-La commande '''xen shutdown''' '''SE4.Elf''' permet d'eteindre la machine virtuelle.&lt;br /&gt;
&lt;br /&gt;
Lors de la tentative de connexion, il y'a une un probleme , pour y remedier,  '''Ctrl + AltGr + ] =&amp;gt; vi =&amp;gt; :q! =&amp;gt; reconnexion'''&lt;br /&gt;
&lt;br /&gt;
Pour voir le mot de passe de la VM, '''cat /var/log/xen-tools/SE4.Elf.log'''&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
Installation Summary&lt;br /&gt;
---------------------&lt;br /&gt;
Hostname        :  SE4.Elf&lt;br /&gt;
Distribution    :  excalibur&lt;br /&gt;
MAC Address     :  00:16:3E:83:A3:C7&lt;br /&gt;
IP Address(es)  :  dynamic&lt;br /&gt;
SSH Fingerprint :  SHA256:IrPhxhB4m1s+eaPaLynS6NlE/HfL78+y3ba3DPuHFQU (DSA)&lt;br /&gt;
SSH Fingerprint :  SHA256:RT+MZtlFxC7BrdYORzOcxDX+SKsJrLzOGWWngX2pKz4 (ECDSA)&lt;br /&gt;
SSH Fingerprint :  SHA256:aLYvYqUPX2Q/J5P0nTpdpMyrFD5xopRqkFKuYb7QUo4 (ED25519)&lt;br /&gt;
SSH Fingerprint :  SHA256:b0ddm9FYx4/losJU8/pE9MXx7102ygkAMjChOvPlNhE (RSA)&lt;br /&gt;
Root Password   :  X&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;- La commande '''vi /etc/hostname''' pour changer le nom de la VM&lt;br /&gt;
&lt;br /&gt;
== '''Configuration de la Machine de Services''' ==&lt;br /&gt;
Il faut creer deux partitions LVM de 10G pour votre machine virtuelle et modifiez le fichier de configuration de la machine virtuelle de services pour faire en sorte que les répertoires &amp;lt;code&amp;gt;/'''var'''&amp;lt;/code&amp;gt; et &amp;lt;code&amp;gt;'''/home'''&amp;lt;/code&amp;gt; de la machine virtuelle soient implantés sur ces partitions LVM&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
SE4.Poseidon.home lv_home_SE4Elf lv_var_SE4Elf  SE4.Gaby.home SE4.Poseidon.var SE4.Gaby.var &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Apres nous avons modifié le fichier /etc/xen/SE4.Elf.cfg piur y ajouter deux répertoires&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== '''Création et formatage des partitions''' ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
mkfs -t ext4 /dev/xvdb  # Formatage de la partition pour /var &lt;br /&gt;
mkfs -t ext4 /dev/xvdc  # Formatage de la partition pour /home&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== '''Préparer les partitions et déplacer les données :''' ===&lt;br /&gt;
&lt;br /&gt;
* '''Montage temporaire des partitions dans &amp;lt;code&amp;gt;/mnt&amp;lt;/code&amp;gt; :'''&lt;br /&gt;
&lt;br /&gt;
Pour pouvoir déplacer les données, nous avons du monter les nouvelles partitions LVM dans un répertoire temporaire &amp;lt;code&amp;gt;/mnt&amp;lt;/code&amp;gt;.  On a créé 2 partitions une pour &amp;lt;code&amp;gt;/var&amp;lt;/code&amp;gt; et une &amp;lt;code&amp;gt;/home&amp;lt;/code&amp;gt; sous les noms xvdb et xvdc dans  &amp;lt;code&amp;gt;/dev&amp;lt;/code&amp;gt;  ,que l'on monte avec  :&lt;br /&gt;
 mount /dev/xvdb /mnt &lt;br /&gt;
 mount /dev/xvdc /mnt&lt;br /&gt;
&lt;br /&gt;
* '''Déplacement des fichiers existants'''&lt;br /&gt;
&lt;br /&gt;
 mv /var/* /mnt  # Déplacement des fichiers de /var vers la nouvelle partition&lt;br /&gt;
&lt;br /&gt;
===== '''Démonter les partitions temporaires :''' =====&lt;br /&gt;
Avant de configurer les montages permanents, on démonte les partitions des répertoires temporaires (&amp;lt;code&amp;gt;/mnt&amp;lt;/code&amp;gt;)&lt;br /&gt;
 umount /mnt      # Démontage après transfert des données&lt;br /&gt;
&lt;br /&gt;
===== '''Modification du fichier &amp;lt;code&amp;gt;/etc/fstab&amp;lt;/code&amp;gt; pour un montage automatique au démarrage :''' =====&lt;br /&gt;
On modifie le fichier &amp;lt;code&amp;gt;/etc/fstab&amp;lt;/code&amp;gt;, qui contient la liste des partitions.&lt;br /&gt;
&lt;br /&gt;
Ajout des nouvelles partitions LVM au fichier &amp;lt;code&amp;gt;/etc/fstab&amp;lt;/code&amp;gt; :&lt;br /&gt;
&lt;br /&gt;
* /dev/xvdb /var ext4 defaults 0 2&lt;br /&gt;
* /dev/xvdc /home ext4 defaults 0 2&lt;br /&gt;
&lt;br /&gt;
 # /etc/fstab: static file system information.&lt;br /&gt;
 #&lt;br /&gt;
 # &amp;lt;file system&amp;gt; &amp;lt;mount point&amp;gt;   &amp;lt;type&amp;gt;  &amp;lt;options&amp;gt;       &amp;lt;dump&amp;gt;  &amp;lt;pass&amp;gt;&lt;br /&gt;
 proc            /proc           proc    defaults        0       0&lt;br /&gt;
 devpts          /dev/pts        devpts  rw,noexec,nosuid,gid=5,mode=620 0  0&lt;br /&gt;
 /dev/xvda1 none swap sw 0 0&lt;br /&gt;
 /dev/xvda2 / ext4 noatime,nodiratime,errors=remount-ro 0 1&lt;br /&gt;
 /dev/xvdb /var ext4 defaults 0 2&lt;br /&gt;
 /dev/xvdc /home ext4 defaults 0 2&lt;br /&gt;
&lt;br /&gt;
===== '''Monter les partitions définies dans &amp;lt;code&amp;gt;fstab&amp;lt;/code&amp;gt; :''' =====&lt;br /&gt;
Pour monter toutes les partitions définies dans le fichier &amp;lt;code&amp;gt;/etc/fstab&amp;lt;/code&amp;gt;  :&lt;br /&gt;
 mount -a  # Remontage des partitions définies dans fstab&lt;br /&gt;
Cette commande monte toutes les partitions qui ne sont pas encore montées et qui sont définies dans &amp;lt;code&amp;gt;/etc/fstab&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
remet les données dans le fichier déplacer.&lt;br /&gt;
&lt;br /&gt;
Puis, pour appliquer les changement nous avons redémarré la VM :&lt;br /&gt;
&lt;br /&gt;
== '''Serveur SSH''' ==&lt;br /&gt;
Notre machine virtuelle doit etre accessible par SSH, on autorise donc l'accès par l'utilisateur '''Root en modifiant le fichier de de configuration &amp;lt;code&amp;gt;/etc/ssh/sshd_config  :&amp;lt;/code&amp;gt;'''&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
PermitRootLogin yes&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Il faut ensuite redemarrer le serveur ssh en faisant :&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/etc/ssh# /etc/init.d/ssh restart&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Pour gérer la redirection du SSH, on doit configurer '''nftables''' sur nos machines de service en redirigeant les ports 2201 et 2202&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
nft add table ip nat&lt;br /&gt;
nft add chain ip nat PREROUTING { type nat hook prerouting priority 0 \; }&lt;br /&gt;
nft add rule ip nat PREROUTING tcp dport 2201 dnat to 192.168.50.12:22                 &lt;br /&gt;
nft add rule ip nat PREROUTING tcp dport 2202 dnat to 192.168.50.3:22              &lt;br /&gt;
nft add chain ip nat POSTROUTING { type nat hook postrouting priority 100 \; }&lt;br /&gt;
nft add rule ip nat POSTROUTING masquerade&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Maintenant, on peut se connecter en SSH sur les machiches virtuelles de services:  De Elf, on peut se connecter a Kasav&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/# ssh root@192.168.50.3&lt;br /&gt;
root@192.168.50.3's password: &lt;br /&gt;
Linux Kasav 4.19.0-26-amd64 #1 SMP Debian 4.19.304-1 (2024-01-09) x86_64&lt;br /&gt;
&lt;br /&gt;
The programs included with the Devuan GNU/Linux system are free software;&lt;br /&gt;
the exact distribution terms for each program are described in the&lt;br /&gt;
individual files in /usr/share/doc/*/copyright.&lt;br /&gt;
&lt;br /&gt;
Devuan GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent&lt;br /&gt;
permitted by applicable law.&lt;br /&gt;
Last login: Tue Feb  3 11:34:45 2026 from 192.168.50.12&lt;br /&gt;
root@Kasav:~# &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Serveur DNS''' ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
$TTL 86400&lt;br /&gt;
@ IN SOA ns1.elvis21.tech. admin.elvis21.tech. (&lt;br /&gt;
        3298267246      ;Version&lt;br /&gt;
        3600            ;Refresh&lt;br /&gt;
        1800            ;Retry&lt;br /&gt;
        604800          ;Expire&lt;br /&gt;
        86400 )         ;Minimum TTL&lt;br /&gt;
;&lt;br /&gt;
@  IN NS ns1.elvis21.tech.&lt;br /&gt;
&lt;br /&gt;
ns1 IN A 192.168.50.12&lt;br /&gt;
ns2 IN A 192.168.50.1&lt;br /&gt;
 IN A 192.168.50.12&lt;br /&gt;
      IN AAAA 2001:660:4401:60a0:216:3eff:fe83:a3c8&lt;br /&gt;
www IN A 192.168.50.12&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/etc/bind# cat named.conf.local &lt;br /&gt;
zone &amp;quot;elvis21.tech&amp;quot; {&lt;br /&gt;
    type primary;&lt;br /&gt;
    file &amp;quot;/etc/bind/zones/db.elvis21.tech&amp;quot;;&lt;br /&gt;
    allow-transfer {&lt;br /&gt;
      2001:660:4401:60a0:216:3eff:fe70:7f1c;&lt;br /&gt;
      2001:660:4401:60a0:216:3eff:fe9a:ea1c;&lt;br /&gt;
      };&lt;br /&gt;
    also-notify { 2001:660:4401:60a0:216:3eff:fe70:7f1c; };&lt;br /&gt;
    inline-signing yes;   // DNSSEC automatique&lt;br /&gt;
    key-directory &amp;quot;/etc/bind/keys&amp;quot;; // répertoire des clefs, attention aux droits&lt;br /&gt;
    dnssec-policy &amp;quot;dnssecpolicy&amp;quot;;  // politique pour les clefs de chiffrement&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
zone &amp;quot;kasav.online&amp;quot; {&lt;br /&gt;
    type secondary;&lt;br /&gt;
    file &amp;quot;/etc/bind/backup/db.kasav.online&amp;quot;;&lt;br /&gt;
    primaries { 2001:660:4401:60a0:216:3eff:fe9a:ea1c; };&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
dnssec-policy &amp;quot;dnssecpolicy&amp;quot; {&lt;br /&gt;
  keys {&lt;br /&gt;
    ksk key-directory lifetime unlimited algorithm 13;&lt;br /&gt;
    zsk key-directory lifetime unlimited algorithm 13;&lt;br /&gt;
  };&lt;br /&gt;
  nsec3param;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/etc/bind# named-checkzone elvis21.tech /etc/bind/db.elvis21.tech&lt;br /&gt;
zone elvis21.tech/IN: loaded serial 3298267246&lt;br /&gt;
OK&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
openssl req -nodes -newkey rsa:2048 -sha256 -keyout elvis21.tech.key -out elvis21.csr&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
[[Fichier:ImageDns.png|gauche|vignette|994x994px]]&lt;br /&gt;
&lt;br /&gt;
== Mise en place du serveur Apache (http et https) ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
apt update&lt;br /&gt;
apt install apache2&lt;br /&gt;
systemctl enable --now apache2&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
[[Fichier:Elvis21.tech-DNS.png|gauche|vignette|863x863px]]&lt;br /&gt;
&lt;br /&gt;
== Installation Fail2ban ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/# apt install fail2ban &lt;br /&gt;
Installing:                     &lt;br /&gt;
  fail2ban&lt;br /&gt;
&lt;br /&gt;
root@Elf:/# systemctl status fail2ban&lt;br /&gt;
fail2ban.service - Fail2Ban Service&lt;br /&gt;
    Loaded: loaded (/usr/lib/systemd/system/fail2ban.service, disabled)&lt;br /&gt;
    Active: active (running)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/# service fail2ban status                             &lt;br /&gt;
Status of Authentication failure monitor: fail2ban is running.&lt;br /&gt;
 root@Elf:/# fail2ban-client status&lt;br /&gt;
Status&lt;br /&gt;
|- Number of jail:	1&lt;br /&gt;
`- Jail list:	sshd&lt;br /&gt;
&lt;br /&gt;
root@Elf:/# fail2ban-client status sshd&lt;br /&gt;
Status for the jail: sshd&lt;br /&gt;
|- Filter&lt;br /&gt;
|  |- Currently failed:	0&lt;br /&gt;
|  |- Total failed:	0&lt;br /&gt;
|  `- File list:	/var/log/auth.log&lt;br /&gt;
`- Actions&lt;br /&gt;
   |- Currently banned:	0&lt;br /&gt;
   |- Total banned:	0&lt;br /&gt;
   `- Banned IP list:	&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Mise en place du serveur Apache (http et https) ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/# service apache2 status&lt;br /&gt;
apache2 is running.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== WIFI ==&lt;br /&gt;
Faire ip link&lt;br /&gt;
&lt;br /&gt;
ensuite sudo airodump-ng wlanx  -- Remplacer x par le numero du wlan present &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
BSSID              PWR  Beacons    #Data, #/s  CH   MB   ENC CIPHER  AUTH ESSID&lt;br /&gt;
04:DA:D2:9C:50:54  -62       23       11    0   4   54e. WEP  WEP         cracotte05                         &lt;br /&gt;
04:DA:D2:9C:50:5A  -61        2        1    0   4   54e. WEP  WEP         cracotte11    &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;sudo airodump-ng wlan1 --bssid 04:DA:D2:9C:50:5A  -c4 --write log_airdump&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
sudo airodump-ng wlan1 --write airdump --bssid 04:DA:D2:9C:50:5A -c4&lt;br /&gt;
17:31:10  Created capture file &amp;quot;airdump-04.cap&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
 CH  4 ][ Elapsed: 39 mins ][ 2026-02-10 18:11 ][ fixed channel wlan1: 13 &lt;br /&gt;
&lt;br /&gt;
 BSSID              PWR RXQ  Beacons    #Data, #/s  CH   MB   ENC CIPHER  AUTH ESSID&lt;br /&gt;
&lt;br /&gt;
 04:DA:D2:9C:50:5A  -58   3     9766    43771   21   4   54e. WEP  WEP         cracotte11                                                                                                   &lt;br /&gt;
&lt;br /&gt;
 BSSID              STATION            PWR    Rate    Lost   Frames  Notes  Probes&lt;br /&gt;
&lt;br /&gt;
 04:DA:D2:9C:50:5A  40:A5:EF:01:2E:FA  -77    0 -48e   127    46300                                                                                                                          &lt;br /&gt;
Quitting...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
aircrack-ng airdump-05.cap &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
           Aircrack-ng 1.7 &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                 [00:25:47] Tested 869 keys (got 34546 IVs)&lt;br /&gt;
                          Got 35002 out of 35000 IVsStarting PTW attack with 35002 KB    depth   byte(vote)&lt;br /&gt;
    0    0/  2   FF(50176) 1C(43520) E6(42752) 3F(42496) B6(42496) &lt;br /&gt;
    1    0/  6   FF(48128) AC(46336) 90(42752) 8E(42496) 04(42240) &lt;br /&gt;
    2    0/  1   BD(50688) 7F(43776) 75(42752) E6(41216) F2(41216) &lt;br /&gt;
    3    9/  3   CE(39936) 05(39680) 5C(39680) 9A(39168) F4(39168) &lt;br /&gt;
    4   41/  4   6C(37376) 1E(37120) 80(37120) 88(37120) A7(37120) &lt;br /&gt;
&lt;br /&gt;
             KEY FOUND! [ FF:FF:FF:FF:FA:BC:12:CB:AE:EE:EE:EE:EE ]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
ssh -oKexAlgorithms=+diffie-hellman-group14-sha1 -oHostKeyAlgorithms=+ssh-rsa -oCiphers=+aes128-cbc admin@172.27.0.1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
C9200-E304&amp;gt;en&lt;br /&gt;
Password: &lt;br /&gt;
C9200-E304#config t&lt;br /&gt;
Enter configuration commands, one per line.  End with CNTL/Z.&lt;br /&gt;
C9200-E304(config)#vlan 28&lt;br /&gt;
C9200-E304(config-vlan)#name PoolEvora&lt;br /&gt;
C9200-E304(config-vlan)#exit &lt;br /&gt;
C9200-E304(config)#exit&lt;br /&gt;
C9200-E304#write&lt;br /&gt;
Building configuration...&lt;br /&gt;
[OK]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
C9200-E304#en&lt;br /&gt;
C9200-E304#config t&lt;br /&gt;
Enter configuration commands, one per line.  End with CNTL/Z.&lt;br /&gt;
C9200-E304(config)#ip dhcp pool PoolEvora  &lt;br /&gt;
C9200-E304(dhcp-config)#network 10.60.11.0 255.255.255.0&lt;br /&gt;
C9200-E304(dhcp-config)#dns-server 193.48.57.172&lt;br /&gt;
C9200-E304(dhcp-config)#default-router 10.60.11.254&lt;br /&gt;
C9200-E304(dhcp-config)#exit&lt;br /&gt;
C9200-E304(config)#exit&lt;br /&gt;
C9200-E304#write&lt;br /&gt;
Building configuration...&lt;br /&gt;
[OK]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
ip dhcp pool PoolTom&lt;br /&gt;
 network 10.60.10.0 255.255.255.0&lt;br /&gt;
 dns-server 193.48.57.168 &lt;br /&gt;
 default-router 10.60.10.254 &lt;br /&gt;
!         &lt;br /&gt;
ip dhcp pool PoolEvora&lt;br /&gt;
 network 10.60.11.0 255.255.255.0&lt;br /&gt;
 dns-server 193.48.57.172 &lt;br /&gt;
 default-router 10.60.11.254 &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;VRRP&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
C9200-E304&amp;gt;en &lt;br /&gt;
Password: &lt;br /&gt;
C9200-E304#config t&lt;br /&gt;
Enter configuration commands, one per line.  End with CNTL/Z.&lt;br /&gt;
C9200-E304(config)#interface vlan 28&lt;br /&gt;
C9200-E304(config-if)#ip address 10.60.11.2 255.255.255.0&lt;br /&gt;
C9200-E304(config-if)#ipv6 address 2001:660:4401:60ab::2/64&lt;br /&gt;
C9200-E304(config-if)#vrrp 28 address-family ipv4        &lt;br /&gt;
C9200-E304(config-if-vrrp)#priority 110&lt;br /&gt;
C9200-E304(config-if-vrrp)#address 10.60.11.1 primary&lt;br /&gt;
C9200-E304(config-if-vrrp)#exit&lt;br /&gt;
C9200-E304(config-if)#exit&lt;br /&gt;
C9200-E304(config)#exit&lt;br /&gt;
C9200-E304#write&lt;br /&gt;
Building configuration...&lt;br /&gt;
[OK]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;WIFI e304&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
ssh admin@172.27.0.4 \&lt;br /&gt;
  -o KexAlgorithms=+diffie-hellman-group1-sha1 \&lt;br /&gt;
  -o HostKeyAlgorithms=+ssh-rsa \&lt;br /&gt;
  -o Ciphers=+aes128-cbc \&lt;br /&gt;
  -o MACs=+hmac-sha1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Vsouopme</name></author>
	</entry>
	<entry>
		<id>https://wiki-se.plil.fr/mediawiki/index.php?title=SE4_IdO_s%C3%A9curit%C3%A9_syst%C3%A8me/r%C3%A9seau_2025/2026&amp;diff=12271</id>
		<title>SE4 IdO sécurité système/réseau 2025/2026</title>
		<link rel="alternate" type="text/html" href="https://wiki-se.plil.fr/mediawiki/index.php?title=SE4_IdO_s%C3%A9curit%C3%A9_syst%C3%A8me/r%C3%A9seau_2025/2026&amp;diff=12271"/>
		<updated>2026-02-17T09:14:41Z</updated>

		<summary type="html">&lt;p&gt;Vsouopme : /* Répartition des binômes pour les travaux pratiques &amp;quot;administration système et réseau&amp;quot; */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Répartition des binômes pour les travaux pratiques &amp;quot;administration système et réseau&amp;quot; =&lt;br /&gt;
&lt;br /&gt;
Préfixe des noms de machine : &amp;lt;code&amp;gt;SE4&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Domaines Internet à louer sur [[gandi.net]]. Identifiant &amp;lt;code&amp;gt;pifou&amp;lt;/code&amp;gt;. Regardez le montant prévu sur le compte avant de louer un domaine.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Cahier !! Elève !! Nom de domaine&lt;br /&gt;
! Nom de machine de services !! Nom de machine mandataire&lt;br /&gt;
|-&lt;br /&gt;
| [[Atelier SysRes SE4 2025/2026 E1 | Cahier n°1]] || Pierre CASIMIRI || merteuil.tech || SE4.Merteuil||SE4.Rosemonde&lt;br /&gt;
|-&lt;br /&gt;
| [[Atelier SysRes SE4 2025/2026 E2 | Cahier n°2]] || Agathe HOUDUSSE || valmont.tech || SE4.Valmont||SE4.Rosemonde&lt;br /&gt;
|-&lt;br /&gt;
| [[Atelier SysRes SE4 2025/2026 E3 | Cahier n°3]] || Lilia GHAZALI || kirchhoff.live|| SE4.Tension||SE4.Kirchhoff&lt;br /&gt;
|-&lt;br /&gt;
| [[Atelier SysRes SE4 2025/2026 E4 | Cahier n°4]] || Marin GOURVEST || courant.online|| SE4.Courant||SE4.Kirchhoff&lt;br /&gt;
|-&lt;br /&gt;
| [[Atelier SysRes SE4 2025/2026 E5 | Cahier n°5]] || Cédric PAYET || archlinuxbtw.lol|| SE4.CachyOS||SE4.LinusTorvalds&lt;br /&gt;
|-&lt;br /&gt;
| [[Atelier SysRes SE4 2025/2026 E6 | Cahier n°6]] || Thomas DELOBELLE || archlinux.lol|| SE4.Manjaro||SE4.LinusTorvalds&lt;br /&gt;
|-&lt;br /&gt;
| [[Atelier SysRes SE4 2025/2026 E7 | Cahier n°7]] || Ibrahim TEPELI || c2vts.fr|| SE4.C2||SE4.Garage&lt;br /&gt;
|-&lt;br /&gt;
| [[Atelier SysRes SE4 2025/2026 E8 | Cahier n°8]] || Yassine YAHIANI || rs7.online|| SE4.RS7||SE4.Garage&lt;br /&gt;
|-&lt;br /&gt;
| [[Atelier SysRes SE4 2025/2026 E9 | Cahier n°9]] || Aurèle VANGHELUWE || tompere.online|| SE4-Tompere1||SE4-Tompere0&lt;br /&gt;
|-&lt;br /&gt;
| [[Atelier SysRes SE4 2025/2026 E10 | Cahier n°10]] || Tom MERIEN || tompere2.xyz|| SE4-Tompere2||SE4-Tompere0&lt;br /&gt;
|-&lt;br /&gt;
| [[Atelier SysRes SE4 2025/2026 E11 | Cahier n°11]] || Varesse Evora Souop Metse || elvis21.tech|| SE4.Elf||SE4.RockStar&lt;br /&gt;
|-&lt;br /&gt;
| [[Atelier SysRes SE4 2025/2026 E12 | Cahier n°12]] || Mario Sylainx S. GAUTHIER || kasav.online|| SE4.Kasav||SE4.RockStar&lt;br /&gt;
|-&lt;br /&gt;
| [[Atelier SysRes SE4 2025/2026 E13 | Cahier n°13]] || Billel Cheklat || deadpool.tech|| SE4.catwoman||SE4.superman&lt;br /&gt;
|-&lt;br /&gt;
| [[Atelier SysRes SE4 2025/2026 E14 | Cahier n°14]] || Antonin Biernacki || deadpool.tech|| SE4.batman||SE4.superman&lt;br /&gt;
|-&lt;br /&gt;
| [[Atelier SysRes SE4 2025/2026 E15 | Cahier n°15]] || Mohamed Salhi || msalhi.online|| SE4.Moon||SE4.Solstice&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Nom machine mandataire !! IPv4 publique machine mandataire !! Elèves &lt;br /&gt;
|-&lt;br /&gt;
| SE4.Rosemonde|| 193.48.57.165|| Pierre CASIMIRI &amp;amp; Agathe HOUDUSSE&lt;br /&gt;
|-&lt;br /&gt;
| SE4.Kirchhoff|| 193.48.57.171|| Lilia GHAZALI &amp;amp; Marin GOURVEST&lt;br /&gt;
|-&lt;br /&gt;
| SE4.LinusTorvalds|| 193.48.57.166|| Cédric PAYET &amp;amp; Thomas DELOBELLE&lt;br /&gt;
|-&lt;br /&gt;
| SE4.Garage|| 193.48.57.170|| Ibrahim TEPELI &amp;amp; Yassine YAHIANI &lt;br /&gt;
|-&lt;br /&gt;
| SE4-Tompere0|| 193.48.57.168|| Aurèle VANGHELUWE &amp;amp; Tom MERIEN&lt;br /&gt;
|-&lt;br /&gt;
| SE4.superman|| 193.48.57.169|| Billel Cheklat &amp;amp; Antonin Biernacki&lt;br /&gt;
|-&lt;br /&gt;
| SE4.RockStar|| 193.48.57.172|| Varesse Evora Souop Metse &amp;amp; GAUTHIER Mario Sylainx S.&lt;br /&gt;
|-&lt;br /&gt;
| SE4.Solstice|| &amp;lt;code&amp;gt;193.48.57.167&amp;lt;/code&amp;gt;|| Mohamed Salhi &lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Tableau des commutateurs virtuels =&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Noms des élèves !! Nom du fichier de configuration !! Réseau IPv4 utilisé &lt;br /&gt;
|-&lt;br /&gt;
| CASIMIRI / HOUDUSSE || pont_gercourt || 192.168.3.0/24&lt;br /&gt;
|-&lt;br /&gt;
|PAYET / DELOBELLE&lt;br /&gt;
|pont_pacman&lt;br /&gt;
|192.168.10.0/24&lt;br /&gt;
|-&lt;br /&gt;
|MERIEN / VANGHELUWE&lt;br /&gt;
|pont_pere&lt;br /&gt;
|192.168.0.0/24&lt;br /&gt;
|-&lt;br /&gt;
|CHEKLAT / BIERNACKI&lt;br /&gt;
|pont_ironman&lt;br /&gt;
|192.168.69.0/24&lt;br /&gt;
|-&lt;br /&gt;
|SALHI&lt;br /&gt;
|pont_msalhi&lt;br /&gt;
|192.168.20.0/24&lt;br /&gt;
|-&lt;br /&gt;
|GOURVEST/GHAZALI&lt;br /&gt;
|pont_diviseur&lt;br /&gt;
|192.168.67.0/24&lt;br /&gt;
|-&lt;br /&gt;
|YAHIANI / TEPELI&lt;br /&gt;
|pontclio&lt;br /&gt;
|192.168.7.0/24&lt;br /&gt;
|-&lt;br /&gt;
|GAUTHIER / SOUOP METSE&lt;br /&gt;
|Styx&lt;br /&gt;
|192.168.50.0/24&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Tableau des réseaux virtuels =&lt;br /&gt;
&lt;br /&gt;
VLAN privés :&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Nom !! Numéro &lt;br /&gt;
|-&lt;br /&gt;
| VLAN1 || 1&lt;br /&gt;
|-&lt;br /&gt;
| MV-PROMO || 2 &lt;br /&gt;
|-&lt;br /&gt;
|E1-Pierre&lt;br /&gt;
|11&lt;br /&gt;
|-&lt;br /&gt;
|E2-Agathe&lt;br /&gt;
|12&lt;br /&gt;
|-&lt;br /&gt;
|E5-Cedric&lt;br /&gt;
|15&lt;br /&gt;
|-&lt;br /&gt;
|E6-Thomas&lt;br /&gt;
|16&lt;br /&gt;
|-&lt;br /&gt;
|E9-Aurele&lt;br /&gt;
|19&lt;br /&gt;
|-&lt;br /&gt;
|E10-Tom&lt;br /&gt;
|20&lt;br /&gt;
|-&lt;br /&gt;
|E13-Billel&lt;br /&gt;
|23&lt;br /&gt;
|-&lt;br /&gt;
|E14-Antonin&lt;br /&gt;
|24&lt;br /&gt;
|-&lt;br /&gt;
|E15-MSalhi&lt;br /&gt;
|25&lt;br /&gt;
|-&lt;br /&gt;
|E11-Evora&lt;br /&gt;
|28&lt;br /&gt;
|-&lt;br /&gt;
|E12-Gauthier&lt;br /&gt;
|21&lt;br /&gt;
|-&lt;br /&gt;
|E8-Yassine&lt;br /&gt;
|18&lt;br /&gt;
|-&lt;br /&gt;
|E7-Ibrahim&lt;br /&gt;
|17&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
VLAN communs avec l'école :&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Nom !! Numéro &lt;br /&gt;
|-&lt;br /&gt;
| INTERCO1 || 530 &lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Schéma de câblage =&lt;br /&gt;
&lt;br /&gt;
Vous avez des éléments réseaux et des panneaux de brassage fibres dans les locaux techniques SR31 et SR52 ainsi que dans les salles E304 et E306.&lt;br /&gt;
&lt;br /&gt;
Le plan doit donc comporter, pour chaque connexion, les locaux d'origine et de destination ainsi que l'identifiant des ports d'origine et de destination.&lt;br /&gt;
&lt;br /&gt;
= Plan d'adressage =&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Nom VLAN !! Réseau IPv4 !! Réseau IPv6 &lt;br /&gt;
|-&lt;br /&gt;
| MV-PROMO || &amp;lt;code&amp;gt;193.48.57.160/27&amp;lt;/code&amp;gt; || &amp;lt;/code&amp;gt;2001:660:4401:60a0::/64&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| PoolPierre || &amp;lt;code&amp;gt;10.60.1.0/24&amp;lt;/code&amp;gt; || &amp;lt;/code&amp;gt;2001:660:4401:60a1::/64&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| PoolAgathe || &amp;lt;code&amp;gt;10.60.2.0/24&amp;lt;/code&amp;gt; || &amp;lt;/code&amp;gt;2001:660:4401:60a2::/64&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|PoolCedric&lt;br /&gt;
|&amp;lt;code&amp;gt;10.60.5.0/24&amp;lt;/code&amp;gt;&lt;br /&gt;
|2001:660:4401:60a5::/64&lt;br /&gt;
|-&lt;br /&gt;
|PoolThomas&lt;br /&gt;
|&amp;lt;code&amp;gt;10.60.6.0/24&amp;lt;/code&amp;gt;&lt;br /&gt;
|2001:660:4401:60a6::/64&lt;br /&gt;
|-&lt;br /&gt;
|PoolBillel&lt;br /&gt;
|&amp;lt;code&amp;gt;10.60.13.0/24&amp;lt;/code&amp;gt;&lt;br /&gt;
|2001:660:4401:60ad::/64&lt;br /&gt;
|-&lt;br /&gt;
|PoolAurele&lt;br /&gt;
|&amp;lt;code&amp;gt;10.60.9.0/24&amp;lt;/code&amp;gt;&lt;br /&gt;
|2001:660:4401:60a9::/64&lt;br /&gt;
|-&lt;br /&gt;
|PoolTom&lt;br /&gt;
|&amp;lt;code&amp;gt;10.60.10.0/24&amp;lt;/code&amp;gt;&lt;br /&gt;
|2001:660:4401:60aa::/64&lt;br /&gt;
|-&lt;br /&gt;
|PoolSalhi&lt;br /&gt;
|&amp;lt;code&amp;gt;10.60.15.0/24&amp;lt;/code&amp;gt;&lt;br /&gt;
|2001:660:4401:60b1::/64&lt;br /&gt;
|-&lt;br /&gt;
|PoolAntonin&lt;br /&gt;
|&amp;lt;code&amp;gt;10.60.14.0/24&amp;lt;/code&amp;gt;&lt;br /&gt;
|2001:660:4401:60ae::/64&lt;br /&gt;
|-&lt;br /&gt;
|PoolYassine&lt;br /&gt;
|10.60.8.0/24&lt;br /&gt;
|2001:660:4401:60a8::/64&lt;br /&gt;
|-&lt;br /&gt;
|PoolEvora&lt;br /&gt;
|10.60.11.0/24&lt;br /&gt;
|2001:660:4401:60ab::/64&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Adresses IPv4 des éléments réseau dans VLAN1&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Elément !! Adresse &lt;br /&gt;
|-&lt;br /&gt;
| Routeur C9200-E304 || 172.27.0.1/16&lt;br /&gt;
|-&lt;br /&gt;
| Routeur C9200-E306 || 172.27.0.2/16&lt;br /&gt;
|-&lt;br /&gt;
| Borne Wi-Fi E306 || 172.27.0.3/16&lt;br /&gt;
|-&lt;br /&gt;
| Borne Wi-Fi E304 || 172.27.0.4/16&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Informations VRRP =&lt;br /&gt;
&lt;br /&gt;
Pour chaque VLAN et pour chaque instance VRRP dans le VLAN listez les adresses IPv4 propres ainsi que l'unique IPv4 virtuelle.&lt;br /&gt;
&lt;br /&gt;
== VLAN des machines virtuelles ==&lt;br /&gt;
&lt;br /&gt;
Une seule instance VRRP dans le VLAN des machines virtuelles.&lt;br /&gt;
&lt;br /&gt;
Adresse IPv4 virtuelle : &amp;lt;code&amp;gt;193.48.57.162&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Routeur !! IPv4 propre &lt;br /&gt;
|-&lt;br /&gt;
| C9200 E304 || &amp;lt;code&amp;gt;193.48.57.163&amp;lt;/code&amp;gt;&lt;br /&gt;
|- &lt;br /&gt;
| C9200 E306 || &amp;lt;code&amp;gt;193.48.57.164&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== VLAN ... ==&lt;/div&gt;</summary>
		<author><name>Vsouopme</name></author>
	</entry>
	<entry>
		<id>https://wiki-se.plil.fr/mediawiki/index.php?title=Atelier_SysRes_SE4_2025/2026_E11&amp;diff=12233</id>
		<title>Atelier SysRes SE4 2025/2026 E11</title>
		<link rel="alternate" type="text/html" href="https://wiki-se.plil.fr/mediawiki/index.php?title=Atelier_SysRes_SE4_2025/2026_E11&amp;diff=12233"/>
		<updated>2026-02-10T17:55:01Z</updated>

		<summary type="html">&lt;p&gt;Vsouopme : /* WIFI */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Projet Virtualisation /Administration Systeme-Réseau - Machine SE4.Elf =&lt;br /&gt;
Dans le cadre de ce projet, nnous avons déployés une infrastructure composée de '''deux machines dédiées aux services''' et d’une '''machine mandataire''', le tout à l’aide de l'environnement  '''Xen.'''&lt;br /&gt;
&lt;br /&gt;
== Création des machines virtuelles ==&lt;br /&gt;
Les machines sont créées  sur le Dom0 '''Capbreton.plil.info''' en faisant un '''ssh root@capbreton.plil.info''' &lt;br /&gt;
&lt;br /&gt;
Sur la capbreton.plil.info, &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
xen create-image --hostname=SE4.Elf --dhcp --dir=/usr/local/xen --size=10G --dist=excalibur --memory=2G --bridge=Styx --force&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; '''Xen-create-image''' :  Commande permettant de créer une nouvelle machine virtuelle Xen&lt;br /&gt;
&lt;br /&gt;
'''--hostname=SE4.Elf :''' Pour le nom de la machine &lt;br /&gt;
&lt;br /&gt;
'''--size=10G''' : La taille du disque &lt;br /&gt;
&lt;br /&gt;
'''--bridge=Styx''' : Le nom du bridge &lt;br /&gt;
&lt;br /&gt;
Par la suite il faut creer un fichier dans le répertoire &amp;lt;code&amp;gt;/etc/network/interfaces.d&amp;lt;/code&amp;gt; du Dom0 pour créer notre pont. (NB: Il faut noter que cette etape on peut la faire avant la creation de notre VM&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
auto Styx&lt;br /&gt;
&lt;br /&gt;
iface Styx inet manual&lt;br /&gt;
   bridge_ports none&lt;br /&gt;
   up ip link set $IFACE up&lt;br /&gt;
   down ip link set $IFACE down&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;La commande '''xen list :''' Affiche les '''machines virtuelles''' (VM) qui sont actuellement gérées par Xen (Elle fait la liste des VM allumée).&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
root@capbreton:~# xen list&lt;br /&gt;
SE4.batman                                 322  2048     1     -b----      37.5&lt;br /&gt;
SE4.Moon                                   326  2048     1     -b----      41.1&lt;br /&gt;
SE4.C2                                     332  1024     1     -b----      18.1&lt;br /&gt;
SE4.Tension                                343  2048     1     -b----       7.8&lt;br /&gt;
SE4.CachyOS                                365  2048     1     -b----      10.2&lt;br /&gt;
SE4.RockStar                               367  2048     1     -b----       6.1&lt;br /&gt;
SE4.Kasav                                  368  2048     1     -b----       5.9&lt;br /&gt;
SE4.Elf                                    369  2048     1     -b----       5.6&lt;br /&gt;
SE4.catwoman                               370  2048     1     -b----       6.1&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;-La commande '''xen create /etc/xen/SE4.Elf.cfg''' permet d'allumer la Machine virtuellle.&lt;br /&gt;
&lt;br /&gt;
-La commande xen '''console SE4.Elf''' permet d'acceder  / de se connecter  a la VM.&lt;br /&gt;
&lt;br /&gt;
-La commande '''xen shutdown''' '''SE4.Elf''' permet d'eteindre la machine virtuelle.&lt;br /&gt;
&lt;br /&gt;
Lors de la tentative de connexion, il y'a une un probleme , pour y remedier,  '''Ctrl + AltGr + ] =&amp;gt; vi =&amp;gt; :q! =&amp;gt; reconnexion'''&lt;br /&gt;
&lt;br /&gt;
Pour voir le mot de passe de la VM, '''cat /var/log/xen-tools/SE4.Elf.log'''&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
Installation Summary&lt;br /&gt;
---------------------&lt;br /&gt;
Hostname        :  SE4.Elf&lt;br /&gt;
Distribution    :  excalibur&lt;br /&gt;
MAC Address     :  00:16:3E:83:A3:C7&lt;br /&gt;
IP Address(es)  :  dynamic&lt;br /&gt;
SSH Fingerprint :  SHA256:IrPhxhB4m1s+eaPaLynS6NlE/HfL78+y3ba3DPuHFQU (DSA)&lt;br /&gt;
SSH Fingerprint :  SHA256:RT+MZtlFxC7BrdYORzOcxDX+SKsJrLzOGWWngX2pKz4 (ECDSA)&lt;br /&gt;
SSH Fingerprint :  SHA256:aLYvYqUPX2Q/J5P0nTpdpMyrFD5xopRqkFKuYb7QUo4 (ED25519)&lt;br /&gt;
SSH Fingerprint :  SHA256:b0ddm9FYx4/losJU8/pE9MXx7102ygkAMjChOvPlNhE (RSA)&lt;br /&gt;
Root Password   :  X&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;- La commande '''vi /etc/hostname''' pour changer le nom de la VM&lt;br /&gt;
&lt;br /&gt;
== '''Configuration de la Machine de Services''' ==&lt;br /&gt;
Il faut creer deux partitions LVM de 10G pour votre machine virtuelle et modifiez le fichier de configuration de la machine virtuelle de services pour faire en sorte que les répertoires &amp;lt;code&amp;gt;/'''var'''&amp;lt;/code&amp;gt; et &amp;lt;code&amp;gt;'''/home'''&amp;lt;/code&amp;gt; de la machine virtuelle soient implantés sur ces partitions LVM&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
SE4.Poseidon.home lv_home_SE4Elf lv_var_SE4Elf  SE4.Gaby.home SE4.Poseidon.var SE4.Gaby.var &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Serveur SSH''' ==&lt;br /&gt;
Notre machine virtuelle doit etre accessible par SSH, on autorise donc l'accès par l'utilisateur '''Root en modifiant le fichier de de configuration &amp;lt;code&amp;gt;/etc/ssh/sshd_config  :&amp;lt;/code&amp;gt;'''&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
PermitRootLogin yes&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Il faut ensuite redemarrer le serveur ssh en faisant :&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/etc/ssh# /etc/init.d/ssh restart&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Pour gérer la redirection du SSH, on doit configurer '''nftables''' sur nos machines de service en redirigeant les ports 2201 et 2202&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
nft add table ip nat&lt;br /&gt;
nft add chain ip nat PREROUTING { type nat hook prerouting priority 0 \; }&lt;br /&gt;
nft add rule ip nat PREROUTING tcp dport 2201 dnat to 192.168.50.12:22                 &lt;br /&gt;
nft add rule ip nat PREROUTING tcp dport 2202 dnat to 192.168.50.3:22              &lt;br /&gt;
nft add chain ip nat POSTROUTING { type nat hook postrouting priority 100 \; }&lt;br /&gt;
nft add rule ip nat POSTROUTING masquerade&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Maintenant, on peut se connecter en SSH sur les machiches virtuelles de services:  De Elf, on peut se connecter a Kasav&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/# ssh root@192.168.50.3&lt;br /&gt;
root@192.168.50.3's password: &lt;br /&gt;
Linux Kasav 4.19.0-26-amd64 #1 SMP Debian 4.19.304-1 (2024-01-09) x86_64&lt;br /&gt;
&lt;br /&gt;
The programs included with the Devuan GNU/Linux system are free software;&lt;br /&gt;
the exact distribution terms for each program are described in the&lt;br /&gt;
individual files in /usr/share/doc/*/copyright.&lt;br /&gt;
&lt;br /&gt;
Devuan GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent&lt;br /&gt;
permitted by applicable law.&lt;br /&gt;
Last login: Tue Feb  3 11:34:45 2026 from 192.168.50.12&lt;br /&gt;
root@Kasav:~# &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Serveur DNS''' ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
$TTL 86400&lt;br /&gt;
@ IN SOA ns1.elvis21.tech. admin.elvis21.tech. (&lt;br /&gt;
        3298267246      ;Version&lt;br /&gt;
        3600            ;Refresh&lt;br /&gt;
        1800            ;Retry&lt;br /&gt;
        604800          ;Expire&lt;br /&gt;
        86400 )         ;Minimum TTL&lt;br /&gt;
;&lt;br /&gt;
@  IN NS ns1.elvis21.tech.&lt;br /&gt;
&lt;br /&gt;
ns1 IN A 192.168.50.12&lt;br /&gt;
ns2 IN A 192.168.50.1&lt;br /&gt;
 IN A 192.168.50.12&lt;br /&gt;
      IN AAAA 2001:660:4401:60a0:216:3eff:fe83:a3c8&lt;br /&gt;
www IN A 192.168.50.12&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/etc/bind# cat named.conf.local &lt;br /&gt;
zone &amp;quot;elvis21.tech&amp;quot; {&lt;br /&gt;
    type primary;&lt;br /&gt;
    file &amp;quot;/etc/bind/zones/db.elvis21.tech&amp;quot;;&lt;br /&gt;
    allow-transfer {&lt;br /&gt;
      2001:660:4401:60a0:216:3eff:fe70:7f1c;&lt;br /&gt;
      2001:660:4401:60a0:216:3eff:fe9a:ea1c;&lt;br /&gt;
      };&lt;br /&gt;
    also-notify { 2001:660:4401:60a0:216:3eff:fe70:7f1c; };&lt;br /&gt;
    inline-signing yes;   // DNSSEC automatique&lt;br /&gt;
    key-directory &amp;quot;/etc/bind/keys&amp;quot;; // répertoire des clefs, attention aux droits&lt;br /&gt;
    dnssec-policy &amp;quot;dnssecpolicy&amp;quot;;  // politique pour les clefs de chiffrement&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
zone &amp;quot;kasav.online&amp;quot; {&lt;br /&gt;
    type secondary;&lt;br /&gt;
    file &amp;quot;/etc/bind/backup/db.kasav.online&amp;quot;;&lt;br /&gt;
    primaries { 2001:660:4401:60a0:216:3eff:fe9a:ea1c; };&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
dnssec-policy &amp;quot;dnssecpolicy&amp;quot; {&lt;br /&gt;
  keys {&lt;br /&gt;
    ksk key-directory lifetime unlimited algorithm 13;&lt;br /&gt;
    zsk key-directory lifetime unlimited algorithm 13;&lt;br /&gt;
  };&lt;br /&gt;
  nsec3param;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/etc/bind# named-checkzone elvis21.tech /etc/bind/db.elvis21.tech&lt;br /&gt;
zone elvis21.tech/IN: loaded serial 3298267246&lt;br /&gt;
OK&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
openssl req -nodes -newkey rsa:2048 -sha256 -keyout elvis21.tech.key -out elvis21.csr&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
[[Fichier:ImageDns.png|gauche|vignette|994x994px]]&lt;br /&gt;
&lt;br /&gt;
== Mise en place du serveur Apache (http et https) ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
apt update&lt;br /&gt;
apt install apache2&lt;br /&gt;
systemctl enable --now apache2&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
[[Fichier:Elvis21.tech-DNS.png|gauche|vignette|863x863px]]&lt;br /&gt;
&lt;br /&gt;
== Installation Fail2ban ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/# apt install fail2ban &lt;br /&gt;
Installing:                     &lt;br /&gt;
  fail2ban&lt;br /&gt;
&lt;br /&gt;
root@Elf:/# systemctl status fail2ban&lt;br /&gt;
fail2ban.service - Fail2Ban Service&lt;br /&gt;
    Loaded: loaded (/usr/lib/systemd/system/fail2ban.service, disabled)&lt;br /&gt;
    Active: active (running)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/# service fail2ban status                             &lt;br /&gt;
Status of Authentication failure monitor: fail2ban is running.&lt;br /&gt;
 root@Elf:/# fail2ban-client status&lt;br /&gt;
Status&lt;br /&gt;
|- Number of jail:	1&lt;br /&gt;
`- Jail list:	sshd&lt;br /&gt;
&lt;br /&gt;
root@Elf:/# fail2ban-client status sshd&lt;br /&gt;
Status for the jail: sshd&lt;br /&gt;
|- Filter&lt;br /&gt;
|  |- Currently failed:	0&lt;br /&gt;
|  |- Total failed:	0&lt;br /&gt;
|  `- File list:	/var/log/auth.log&lt;br /&gt;
`- Actions&lt;br /&gt;
   |- Currently banned:	0&lt;br /&gt;
   |- Total banned:	0&lt;br /&gt;
   `- Banned IP list:	&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Mise en place du serveur Apache (http et https) ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/# service apache2 status&lt;br /&gt;
apache2 is running.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== WIFI ==&lt;br /&gt;
Faire ip link&lt;br /&gt;
&lt;br /&gt;
ensuite sudo airodump-ng wlanx  -- Remplacer x par le numero du wlan present &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
BSSID              PWR  Beacons    #Data, #/s  CH   MB   ENC CIPHER  AUTH ESSID&lt;br /&gt;
04:DA:D2:9C:50:54  -62       23       11    0   4   54e. WEP  WEP         cracotte05                         &lt;br /&gt;
04:DA:D2:9C:50:5A  -61        2        1    0   4   54e. WEP  WEP         cracotte11    &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;sudo airodump-ng wlan1 --bssid 04:DA:D2:9C:50:5A  -c4 --write log_airdump&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
sudo airodump-ng wlan1 --write airdump --bssid 04:DA:D2:9C:50:5A -c4&lt;br /&gt;
17:31:10  Created capture file &amp;quot;airdump-04.cap&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
 CH  4 ][ Elapsed: 39 mins ][ 2026-02-10 18:11 ][ fixed channel wlan1: 13 &lt;br /&gt;
&lt;br /&gt;
 BSSID              PWR RXQ  Beacons    #Data, #/s  CH   MB   ENC CIPHER  AUTH ESSID&lt;br /&gt;
&lt;br /&gt;
 04:DA:D2:9C:50:5A  -58   3     9766    43771   21   4   54e. WEP  WEP         cracotte11                                                                                                   &lt;br /&gt;
&lt;br /&gt;
 BSSID              STATION            PWR    Rate    Lost   Frames  Notes  Probes&lt;br /&gt;
&lt;br /&gt;
 04:DA:D2:9C:50:5A  40:A5:EF:01:2E:FA  -77    0 -48e   127    46300                                                                                                                          &lt;br /&gt;
Quitting...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
aircrack-ng airdump-05.cap &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
           Aircrack-ng 1.7 &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                 [00:25:47] Tested 869 keys (got 34546 IVs)&lt;br /&gt;
                          Got 35002 out of 35000 IVsStarting PTW attack with 35002 KB    depth   byte(vote)&lt;br /&gt;
    0    0/  2   FF(50176) 1C(43520) E6(42752) 3F(42496) B6(42496) &lt;br /&gt;
    1    0/  6   FF(48128) AC(46336) 90(42752) 8E(42496) 04(42240) &lt;br /&gt;
    2    0/  1   BD(50688) 7F(43776) 75(42752) E6(41216) F2(41216) &lt;br /&gt;
    3    9/  3   CE(39936) 05(39680) 5C(39680) 9A(39168) F4(39168) &lt;br /&gt;
    4   41/  4   6C(37376) 1E(37120) 80(37120) 88(37120) A7(37120) &lt;br /&gt;
&lt;br /&gt;
             KEY FOUND! [ FF:FF:FF:FF:FA:BC:12:CB:AE:EE:EE:EE:EE ]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
ssh -oKexAlgorithms=+diffie-hellman-group14-sha1 -oHostKeyAlgorithms=+ssh-rsa -oCiphers=+aes128-cbc admin@172.27.0.1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
C9200-E304&amp;gt;en&lt;br /&gt;
Password: &lt;br /&gt;
C9200-E304#config t&lt;br /&gt;
Enter configuration commands, one per line.  End with CNTL/Z.&lt;br /&gt;
C9200-E304(config)#vlan 28&lt;br /&gt;
C9200-E304(config-vlan)#name PoolEvora&lt;br /&gt;
C9200-E304(config-vlan)#exit &lt;br /&gt;
C9200-E304(config)#exit&lt;br /&gt;
C9200-E304#write&lt;br /&gt;
Building configuration...&lt;br /&gt;
[OK]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
C9200-E304#en&lt;br /&gt;
C9200-E304#config t&lt;br /&gt;
Enter configuration commands, one per line.  End with CNTL/Z.&lt;br /&gt;
C9200-E304(config)#ip dhcp pool PoolEvora  &lt;br /&gt;
C9200-E304(dhcp-config)#network 10.60.11.0 255.255.255.0&lt;br /&gt;
C9200-E304(dhcp-config)#dns-server 193.48.57.172&lt;br /&gt;
C9200-E304(dhcp-config)#default-router 10.60.11.254&lt;br /&gt;
C9200-E304(dhcp-config)#exit&lt;br /&gt;
C9200-E304(config)#exit&lt;br /&gt;
C9200-E304#write&lt;br /&gt;
Building configuration...&lt;br /&gt;
[OK]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
ip dhcp pool PoolTom&lt;br /&gt;
 network 10.60.10.0 255.255.255.0&lt;br /&gt;
 dns-server 193.48.57.168 &lt;br /&gt;
 default-router 10.60.10.254 &lt;br /&gt;
!         &lt;br /&gt;
ip dhcp pool PoolEvora&lt;br /&gt;
 network 10.60.11.0 255.255.255.0&lt;br /&gt;
 dns-server 193.48.57.172 &lt;br /&gt;
 default-router 10.60.11.254 &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;VRRP&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
C9200-E304&amp;gt;en &lt;br /&gt;
Password: &lt;br /&gt;
C9200-E304#config t&lt;br /&gt;
Enter configuration commands, one per line.  End with CNTL/Z.&lt;br /&gt;
C9200-E304(config)#interface vlan 28&lt;br /&gt;
C9200-E304(config-if)#ip address 10.60.11.2 255.255.255.0&lt;br /&gt;
C9200-E304(config-if)#ipv6 address 2001:660:4401:60ab::2/64&lt;br /&gt;
C9200-E304(config-if)#vrrp 28 address-family ipv4        &lt;br /&gt;
C9200-E304(config-if-vrrp)#priority 110&lt;br /&gt;
C9200-E304(config-if-vrrp)#address 10.60.11.1 primary&lt;br /&gt;
C9200-E304(config-if-vrrp)#exit&lt;br /&gt;
C9200-E304(config-if)#exit&lt;br /&gt;
C9200-E304(config)#exit&lt;br /&gt;
C9200-E304#write&lt;br /&gt;
Building configuration...&lt;br /&gt;
[OK]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;WIFI e304&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
ssh admin@172.27.0.4 \&lt;br /&gt;
  -o KexAlgorithms=+diffie-hellman-group1-sha1 \&lt;br /&gt;
  -o HostKeyAlgorithms=+ssh-rsa \&lt;br /&gt;
  -o Ciphers=+aes128-cbc \&lt;br /&gt;
  -o MACs=+hmac-sha1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Vsouopme</name></author>
	</entry>
	<entry>
		<id>https://wiki-se.plil.fr/mediawiki/index.php?title=Atelier_SysRes_SE4_2025/2026_E11&amp;diff=12229</id>
		<title>Atelier SysRes SE4 2025/2026 E11</title>
		<link rel="alternate" type="text/html" href="https://wiki-se.plil.fr/mediawiki/index.php?title=Atelier_SysRes_SE4_2025/2026_E11&amp;diff=12229"/>
		<updated>2026-02-10T17:40:48Z</updated>

		<summary type="html">&lt;p&gt;Vsouopme : /* WIFI */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Projet Virtualisation /Administration Systeme-Réseau - Machine SE4.Elf =&lt;br /&gt;
Dans le cadre de ce projet, nnous avons déployés une infrastructure composée de '''deux machines dédiées aux services''' et d’une '''machine mandataire''', le tout à l’aide de l'environnement  '''Xen.'''&lt;br /&gt;
&lt;br /&gt;
== Création des machines virtuelles ==&lt;br /&gt;
Les machines sont créées  sur le Dom0 '''Capbreton.plil.info''' en faisant un '''ssh root@capbreton.plil.info''' &lt;br /&gt;
&lt;br /&gt;
Sur la capbreton.plil.info, &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
xen create-image --hostname=SE4.Elf --dhcp --dir=/usr/local/xen --size=10G --dist=excalibur --memory=2G --bridge=Styx --force&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; '''Xen-create-image''' :  Commande permettant de créer une nouvelle machine virtuelle Xen&lt;br /&gt;
&lt;br /&gt;
'''--hostname=SE4.Elf :''' Pour le nom de la machine &lt;br /&gt;
&lt;br /&gt;
'''--size=10G''' : La taille du disque &lt;br /&gt;
&lt;br /&gt;
'''--bridge=Styx''' : Le nom du bridge &lt;br /&gt;
&lt;br /&gt;
Par la suite il faut creer un fichier dans le répertoire &amp;lt;code&amp;gt;/etc/network/interfaces.d&amp;lt;/code&amp;gt; du Dom0 pour créer notre pont. (NB: Il faut noter que cette etape on peut la faire avant la creation de notre VM&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
auto Styx&lt;br /&gt;
&lt;br /&gt;
iface Styx inet manual&lt;br /&gt;
   bridge_ports none&lt;br /&gt;
   up ip link set $IFACE up&lt;br /&gt;
   down ip link set $IFACE down&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;La commande '''xen list :''' Affiche les '''machines virtuelles''' (VM) qui sont actuellement gérées par Xen (Elle fait la liste des VM allumée).&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
root@capbreton:~# xen list&lt;br /&gt;
SE4.batman                                 322  2048     1     -b----      37.5&lt;br /&gt;
SE4.Moon                                   326  2048     1     -b----      41.1&lt;br /&gt;
SE4.C2                                     332  1024     1     -b----      18.1&lt;br /&gt;
SE4.Tension                                343  2048     1     -b----       7.8&lt;br /&gt;
SE4.CachyOS                                365  2048     1     -b----      10.2&lt;br /&gt;
SE4.RockStar                               367  2048     1     -b----       6.1&lt;br /&gt;
SE4.Kasav                                  368  2048     1     -b----       5.9&lt;br /&gt;
SE4.Elf                                    369  2048     1     -b----       5.6&lt;br /&gt;
SE4.catwoman                               370  2048     1     -b----       6.1&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;-La commande '''xen create /etc/xen/SE4.Elf.cfg''' permet d'allumer la Machine virtuellle.&lt;br /&gt;
&lt;br /&gt;
-La commande xen '''console SE4.Elf''' permet d'acceder  / de se connecter  a la VM.&lt;br /&gt;
&lt;br /&gt;
-La commande '''xen shutdown''' '''SE4.Elf''' permet d'eteindre la machine virtuelle.&lt;br /&gt;
&lt;br /&gt;
Lors de la tentative de connexion, il y'a une un probleme , pour y remedier,  '''Ctrl + AltGr + ] =&amp;gt; vi =&amp;gt; :q! =&amp;gt; reconnexion'''&lt;br /&gt;
&lt;br /&gt;
Pour voir le mot de passe de la VM, '''cat /var/log/xen-tools/SE4.Elf.log'''&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
Installation Summary&lt;br /&gt;
---------------------&lt;br /&gt;
Hostname        :  SE4.Elf&lt;br /&gt;
Distribution    :  excalibur&lt;br /&gt;
MAC Address     :  00:16:3E:83:A3:C7&lt;br /&gt;
IP Address(es)  :  dynamic&lt;br /&gt;
SSH Fingerprint :  SHA256:IrPhxhB4m1s+eaPaLynS6NlE/HfL78+y3ba3DPuHFQU (DSA)&lt;br /&gt;
SSH Fingerprint :  SHA256:RT+MZtlFxC7BrdYORzOcxDX+SKsJrLzOGWWngX2pKz4 (ECDSA)&lt;br /&gt;
SSH Fingerprint :  SHA256:aLYvYqUPX2Q/J5P0nTpdpMyrFD5xopRqkFKuYb7QUo4 (ED25519)&lt;br /&gt;
SSH Fingerprint :  SHA256:b0ddm9FYx4/losJU8/pE9MXx7102ygkAMjChOvPlNhE (RSA)&lt;br /&gt;
Root Password   :  X&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;- La commande '''vi /etc/hostname''' pour changer le nom de la VM&lt;br /&gt;
&lt;br /&gt;
== '''Configuration de la Machine de Services''' ==&lt;br /&gt;
Il faut creer deux partitions LVM de 10G pour votre machine virtuelle et modifiez le fichier de configuration de la machine virtuelle de services pour faire en sorte que les répertoires &amp;lt;code&amp;gt;/'''var'''&amp;lt;/code&amp;gt; et &amp;lt;code&amp;gt;'''/home'''&amp;lt;/code&amp;gt; de la machine virtuelle soient implantés sur ces partitions LVM&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
SE4.Poseidon.home lv_home_SE4Elf lv_var_SE4Elf  SE4.Gaby.home SE4.Poseidon.var SE4.Gaby.var &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Serveur SSH''' ==&lt;br /&gt;
Notre machine virtuelle doit etre accessible par SSH, on autorise donc l'accès par l'utilisateur '''Root en modifiant le fichier de de configuration &amp;lt;code&amp;gt;/etc/ssh/sshd_config  :&amp;lt;/code&amp;gt;'''&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
PermitRootLogin yes&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Il faut ensuite redemarrer le serveur ssh en faisant :&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/etc/ssh# /etc/init.d/ssh restart&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Pour gérer la redirection du SSH, on doit configurer '''nftables''' sur nos machines de service en redirigeant les ports 2201 et 2202&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
nft add table ip nat&lt;br /&gt;
nft add chain ip nat PREROUTING { type nat hook prerouting priority 0 \; }&lt;br /&gt;
nft add rule ip nat PREROUTING tcp dport 2201 dnat to 192.168.50.12:22                 &lt;br /&gt;
nft add rule ip nat PREROUTING tcp dport 2202 dnat to 192.168.50.3:22              &lt;br /&gt;
nft add chain ip nat POSTROUTING { type nat hook postrouting priority 100 \; }&lt;br /&gt;
nft add rule ip nat POSTROUTING masquerade&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Maintenant, on peut se connecter en SSH sur les machiches virtuelles de services:  De Elf, on peut se connecter a Kasav&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/# ssh root@192.168.50.3&lt;br /&gt;
root@192.168.50.3's password: &lt;br /&gt;
Linux Kasav 4.19.0-26-amd64 #1 SMP Debian 4.19.304-1 (2024-01-09) x86_64&lt;br /&gt;
&lt;br /&gt;
The programs included with the Devuan GNU/Linux system are free software;&lt;br /&gt;
the exact distribution terms for each program are described in the&lt;br /&gt;
individual files in /usr/share/doc/*/copyright.&lt;br /&gt;
&lt;br /&gt;
Devuan GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent&lt;br /&gt;
permitted by applicable law.&lt;br /&gt;
Last login: Tue Feb  3 11:34:45 2026 from 192.168.50.12&lt;br /&gt;
root@Kasav:~# &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Serveur DNS''' ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
$TTL 86400&lt;br /&gt;
@ IN SOA ns1.elvis21.tech. admin.elvis21.tech. (&lt;br /&gt;
        3298267246      ;Version&lt;br /&gt;
        3600            ;Refresh&lt;br /&gt;
        1800            ;Retry&lt;br /&gt;
        604800          ;Expire&lt;br /&gt;
        86400 )         ;Minimum TTL&lt;br /&gt;
;&lt;br /&gt;
@  IN NS ns1.elvis21.tech.&lt;br /&gt;
&lt;br /&gt;
ns1 IN A 192.168.50.12&lt;br /&gt;
ns2 IN A 192.168.50.1&lt;br /&gt;
 IN A 192.168.50.12&lt;br /&gt;
      IN AAAA 2001:660:4401:60a0:216:3eff:fe83:a3c8&lt;br /&gt;
www IN A 192.168.50.12&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/etc/bind# cat named.conf.local &lt;br /&gt;
zone &amp;quot;elvis21.tech&amp;quot; {&lt;br /&gt;
    type primary;&lt;br /&gt;
    file &amp;quot;/etc/bind/zones/db.elvis21.tech&amp;quot;;&lt;br /&gt;
    allow-transfer {&lt;br /&gt;
      2001:660:4401:60a0:216:3eff:fe70:7f1c;&lt;br /&gt;
      2001:660:4401:60a0:216:3eff:fe9a:ea1c;&lt;br /&gt;
      };&lt;br /&gt;
    also-notify { 2001:660:4401:60a0:216:3eff:fe70:7f1c; };&lt;br /&gt;
    inline-signing yes;   // DNSSEC automatique&lt;br /&gt;
    key-directory &amp;quot;/etc/bind/keys&amp;quot;; // répertoire des clefs, attention aux droits&lt;br /&gt;
    dnssec-policy &amp;quot;dnssecpolicy&amp;quot;;  // politique pour les clefs de chiffrement&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
zone &amp;quot;kasav.online&amp;quot; {&lt;br /&gt;
    type secondary;&lt;br /&gt;
    file &amp;quot;/etc/bind/backup/db.kasav.online&amp;quot;;&lt;br /&gt;
    primaries { 2001:660:4401:60a0:216:3eff:fe9a:ea1c; };&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
dnssec-policy &amp;quot;dnssecpolicy&amp;quot; {&lt;br /&gt;
  keys {&lt;br /&gt;
    ksk key-directory lifetime unlimited algorithm 13;&lt;br /&gt;
    zsk key-directory lifetime unlimited algorithm 13;&lt;br /&gt;
  };&lt;br /&gt;
  nsec3param;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/etc/bind# named-checkzone elvis21.tech /etc/bind/db.elvis21.tech&lt;br /&gt;
zone elvis21.tech/IN: loaded serial 3298267246&lt;br /&gt;
OK&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
openssl req -nodes -newkey rsa:2048 -sha256 -keyout elvis21.tech.key -out elvis21.csr&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
[[Fichier:ImageDns.png|gauche|vignette|994x994px]]&lt;br /&gt;
&lt;br /&gt;
== Mise en place du serveur Apache (http et https) ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
apt update&lt;br /&gt;
apt install apache2&lt;br /&gt;
systemctl enable --now apache2&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
[[Fichier:Elvis21.tech-DNS.png|gauche|vignette|863x863px]]&lt;br /&gt;
&lt;br /&gt;
== Installation Fail2ban ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/# apt install fail2ban &lt;br /&gt;
Installing:                     &lt;br /&gt;
  fail2ban&lt;br /&gt;
&lt;br /&gt;
root@Elf:/# systemctl status fail2ban&lt;br /&gt;
fail2ban.service - Fail2Ban Service&lt;br /&gt;
    Loaded: loaded (/usr/lib/systemd/system/fail2ban.service, disabled)&lt;br /&gt;
    Active: active (running)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/# service fail2ban status                             &lt;br /&gt;
Status of Authentication failure monitor: fail2ban is running.&lt;br /&gt;
 root@Elf:/# fail2ban-client status&lt;br /&gt;
Status&lt;br /&gt;
|- Number of jail:	1&lt;br /&gt;
`- Jail list:	sshd&lt;br /&gt;
&lt;br /&gt;
root@Elf:/# fail2ban-client status sshd&lt;br /&gt;
Status for the jail: sshd&lt;br /&gt;
|- Filter&lt;br /&gt;
|  |- Currently failed:	0&lt;br /&gt;
|  |- Total failed:	0&lt;br /&gt;
|  `- File list:	/var/log/auth.log&lt;br /&gt;
`- Actions&lt;br /&gt;
   |- Currently banned:	0&lt;br /&gt;
   |- Total banned:	0&lt;br /&gt;
   `- Banned IP list:	&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Mise en place du serveur Apache (http et https) ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/# service apache2 status&lt;br /&gt;
apache2 is running.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== WIFI ==&lt;br /&gt;
Faire ip link&lt;br /&gt;
&lt;br /&gt;
ensuite sudo airodump-ng wlanx  -- Remplacer x par le numero du wlan present &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
BSSID              PWR  Beacons    #Data, #/s  CH   MB   ENC CIPHER  AUTH ESSID&lt;br /&gt;
04:DA:D2:9C:50:54  -62       23       11    0   4   54e. WEP  WEP         cracotte05                         &lt;br /&gt;
04:DA:D2:9C:50:5A  -61        2        1    0   4   54e. WEP  WEP         cracotte11    &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;sudo airodump-ng wlan1 --bssid 04:DA:D2:9C:50:5A  -c4 --write log_airdump&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
sudo airodump-ng wlan1 --write airdump --bssid 04:DA:D2:9C:50:5A -c4&lt;br /&gt;
17:31:10  Created capture file &amp;quot;airdump-04.cap&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
 CH  4 ][ Elapsed: 39 mins ][ 2026-02-10 18:11 ][ fixed channel wlan1: 13 &lt;br /&gt;
&lt;br /&gt;
 BSSID              PWR RXQ  Beacons    #Data, #/s  CH   MB   ENC CIPHER  AUTH ESSID&lt;br /&gt;
&lt;br /&gt;
 04:DA:D2:9C:50:5A  -58   3     9766    43771   21   4   54e. WEP  WEP         cracotte11                                                                                                   &lt;br /&gt;
&lt;br /&gt;
 BSSID              STATION            PWR    Rate    Lost   Frames  Notes  Probes&lt;br /&gt;
&lt;br /&gt;
 04:DA:D2:9C:50:5A  40:A5:EF:01:2E:FA  -77    0 -48e   127    46300                                                                                                                          &lt;br /&gt;
Quitting...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
aircrack-ng airdump-05.cap &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
           Aircrack-ng 1.7 &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                 [00:25:47] Tested 869 keys (got 34546 IVs)&lt;br /&gt;
                          Got 35002 out of 35000 IVsStarting PTW attack with 35002 KB    depth   byte(vote)&lt;br /&gt;
    0    0/  2   FF(50176) 1C(43520) E6(42752) 3F(42496) B6(42496) &lt;br /&gt;
    1    0/  6   FF(48128) AC(46336) 90(42752) 8E(42496) 04(42240) &lt;br /&gt;
    2    0/  1   BD(50688) 7F(43776) 75(42752) E6(41216) F2(41216) &lt;br /&gt;
    3    9/  3   CE(39936) 05(39680) 5C(39680) 9A(39168) F4(39168) &lt;br /&gt;
    4   41/  4   6C(37376) 1E(37120) 80(37120) 88(37120) A7(37120) &lt;br /&gt;
&lt;br /&gt;
             KEY FOUND! [ FF:FF:FF:FF:FA:BC:12:CB:AE:EE:EE:EE:EE ]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
ssh -oKexAlgorithms=+diffie-hellman-group14-sha1 -oHostKeyAlgorithms=+ssh-rsa -oCiphers=+aes128-cbc admin@172.27.0.1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
C9200-E304&amp;gt;en&lt;br /&gt;
Password: &lt;br /&gt;
C9200-E304#config t&lt;br /&gt;
Enter configuration commands, one per line.  End with CNTL/Z.&lt;br /&gt;
C9200-E304(config)#vlan 28&lt;br /&gt;
C9200-E304(config-vlan)#name PoolEvora&lt;br /&gt;
C9200-E304(config-vlan)#exit &lt;br /&gt;
C9200-E304(config)#exit&lt;br /&gt;
C9200-E304#write&lt;br /&gt;
Building configuration...&lt;br /&gt;
[OK]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
C9200-E304#en&lt;br /&gt;
C9200-E304#config t&lt;br /&gt;
Enter configuration commands, one per line.  End with CNTL/Z.&lt;br /&gt;
C9200-E304(config)#ip dhcp pool PoolEvora  &lt;br /&gt;
C9200-E304(dhcp-config)#network 10.60.11.0 255.255.255.0&lt;br /&gt;
C9200-E304(dhcp-config)#dns-server 193.48.57.172&lt;br /&gt;
C9200-E304(dhcp-config)#default-router 10.60.11.254&lt;br /&gt;
C9200-E304(dhcp-config)#exit&lt;br /&gt;
C9200-E304(config)#exit&lt;br /&gt;
C9200-E304#write&lt;br /&gt;
Building configuration...&lt;br /&gt;
[OK]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
ip dhcp pool PoolTom&lt;br /&gt;
 network 10.60.10.0 255.255.255.0&lt;br /&gt;
 dns-server 193.48.57.168 &lt;br /&gt;
 default-router 10.60.10.254 &lt;br /&gt;
!         &lt;br /&gt;
ip dhcp pool PoolEvora&lt;br /&gt;
 network 10.60.11.0 255.255.255.0&lt;br /&gt;
 dns-server 193.48.57.172 &lt;br /&gt;
 default-router 10.60.11.254 &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;VRRP&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
C9200-E304&amp;gt;en &lt;br /&gt;
Password: &lt;br /&gt;
C9200-E304#config t&lt;br /&gt;
Enter configuration commands, one per line.  End with CNTL/Z.&lt;br /&gt;
C9200-E304(config)#interface vlan 28&lt;br /&gt;
C9200-E304(config-if)#ip address 10.60.11.2 255.255.255.0&lt;br /&gt;
C9200-E304(config-if)#ipv6 address 2001:660:4401:60ab::2/64&lt;br /&gt;
C9200-E304(config-if)#vrrp 28 address-family ipv4        &lt;br /&gt;
C9200-E304(config-if-vrrp)#priority 110&lt;br /&gt;
C9200-E304(config-if-vrrp)#address 10.60.11.1 primary&lt;br /&gt;
C9200-E304(config-if-vrrp)#exit&lt;br /&gt;
C9200-E304(config-if)#exit&lt;br /&gt;
C9200-E304(config)#exit&lt;br /&gt;
C9200-E304#write&lt;br /&gt;
Building configuration...&lt;br /&gt;
[OK]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Vsouopme</name></author>
	</entry>
	<entry>
		<id>https://wiki-se.plil.fr/mediawiki/index.php?title=Atelier_SysRes_SE4_2025/2026_E11&amp;diff=12226</id>
		<title>Atelier SysRes SE4 2025/2026 E11</title>
		<link rel="alternate" type="text/html" href="https://wiki-se.plil.fr/mediawiki/index.php?title=Atelier_SysRes_SE4_2025/2026_E11&amp;diff=12226"/>
		<updated>2026-02-10T17:19:05Z</updated>

		<summary type="html">&lt;p&gt;Vsouopme : /* Mise en place du serveur Apache (http et https) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Projet Virtualisation /Administration Systeme-Réseau - Machine SE4.Elf =&lt;br /&gt;
Dans le cadre de ce projet, nnous avons déployés une infrastructure composée de '''deux machines dédiées aux services''' et d’une '''machine mandataire''', le tout à l’aide de l'environnement  '''Xen.'''&lt;br /&gt;
&lt;br /&gt;
== Création des machines virtuelles ==&lt;br /&gt;
Les machines sont créées  sur le Dom0 '''Capbreton.plil.info''' en faisant un '''ssh root@capbreton.plil.info''' &lt;br /&gt;
&lt;br /&gt;
Sur la capbreton.plil.info, &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
xen create-image --hostname=SE4.Elf --dhcp --dir=/usr/local/xen --size=10G --dist=excalibur --memory=2G --bridge=Styx --force&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; '''Xen-create-image''' :  Commande permettant de créer une nouvelle machine virtuelle Xen&lt;br /&gt;
&lt;br /&gt;
'''--hostname=SE4.Elf :''' Pour le nom de la machine &lt;br /&gt;
&lt;br /&gt;
'''--size=10G''' : La taille du disque &lt;br /&gt;
&lt;br /&gt;
'''--bridge=Styx''' : Le nom du bridge &lt;br /&gt;
&lt;br /&gt;
Par la suite il faut creer un fichier dans le répertoire &amp;lt;code&amp;gt;/etc/network/interfaces.d&amp;lt;/code&amp;gt; du Dom0 pour créer notre pont. (NB: Il faut noter que cette etape on peut la faire avant la creation de notre VM&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
auto Styx&lt;br /&gt;
&lt;br /&gt;
iface Styx inet manual&lt;br /&gt;
   bridge_ports none&lt;br /&gt;
   up ip link set $IFACE up&lt;br /&gt;
   down ip link set $IFACE down&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;La commande '''xen list :''' Affiche les '''machines virtuelles''' (VM) qui sont actuellement gérées par Xen (Elle fait la liste des VM allumée).&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
root@capbreton:~# xen list&lt;br /&gt;
SE4.batman                                 322  2048     1     -b----      37.5&lt;br /&gt;
SE4.Moon                                   326  2048     1     -b----      41.1&lt;br /&gt;
SE4.C2                                     332  1024     1     -b----      18.1&lt;br /&gt;
SE4.Tension                                343  2048     1     -b----       7.8&lt;br /&gt;
SE4.CachyOS                                365  2048     1     -b----      10.2&lt;br /&gt;
SE4.RockStar                               367  2048     1     -b----       6.1&lt;br /&gt;
SE4.Kasav                                  368  2048     1     -b----       5.9&lt;br /&gt;
SE4.Elf                                    369  2048     1     -b----       5.6&lt;br /&gt;
SE4.catwoman                               370  2048     1     -b----       6.1&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;-La commande '''xen create /etc/xen/SE4.Elf.cfg''' permet d'allumer la Machine virtuellle.&lt;br /&gt;
&lt;br /&gt;
-La commande xen '''console SE4.Elf''' permet d'acceder  / de se connecter  a la VM.&lt;br /&gt;
&lt;br /&gt;
-La commande '''xen shutdown''' '''SE4.Elf''' permet d'eteindre la machine virtuelle.&lt;br /&gt;
&lt;br /&gt;
Lors de la tentative de connexion, il y'a une un probleme , pour y remedier,  '''Ctrl + AltGr + ] =&amp;gt; vi =&amp;gt; :q! =&amp;gt; reconnexion'''&lt;br /&gt;
&lt;br /&gt;
Pour voir le mot de passe de la VM, '''cat /var/log/xen-tools/SE4.Elf.log'''&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
Installation Summary&lt;br /&gt;
---------------------&lt;br /&gt;
Hostname        :  SE4.Elf&lt;br /&gt;
Distribution    :  excalibur&lt;br /&gt;
MAC Address     :  00:16:3E:83:A3:C7&lt;br /&gt;
IP Address(es)  :  dynamic&lt;br /&gt;
SSH Fingerprint :  SHA256:IrPhxhB4m1s+eaPaLynS6NlE/HfL78+y3ba3DPuHFQU (DSA)&lt;br /&gt;
SSH Fingerprint :  SHA256:RT+MZtlFxC7BrdYORzOcxDX+SKsJrLzOGWWngX2pKz4 (ECDSA)&lt;br /&gt;
SSH Fingerprint :  SHA256:aLYvYqUPX2Q/J5P0nTpdpMyrFD5xopRqkFKuYb7QUo4 (ED25519)&lt;br /&gt;
SSH Fingerprint :  SHA256:b0ddm9FYx4/losJU8/pE9MXx7102ygkAMjChOvPlNhE (RSA)&lt;br /&gt;
Root Password   :  X&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;- La commande '''vi /etc/hostname''' pour changer le nom de la VM&lt;br /&gt;
&lt;br /&gt;
== '''Configuration de la Machine de Services''' ==&lt;br /&gt;
Il faut creer deux partitions LVM de 10G pour votre machine virtuelle et modifiez le fichier de configuration de la machine virtuelle de services pour faire en sorte que les répertoires &amp;lt;code&amp;gt;/'''var'''&amp;lt;/code&amp;gt; et &amp;lt;code&amp;gt;'''/home'''&amp;lt;/code&amp;gt; de la machine virtuelle soient implantés sur ces partitions LVM&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
SE4.Poseidon.home lv_home_SE4Elf lv_var_SE4Elf  SE4.Gaby.home SE4.Poseidon.var SE4.Gaby.var &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Serveur SSH''' ==&lt;br /&gt;
Notre machine virtuelle doit etre accessible par SSH, on autorise donc l'accès par l'utilisateur '''Root en modifiant le fichier de de configuration &amp;lt;code&amp;gt;/etc/ssh/sshd_config  :&amp;lt;/code&amp;gt;'''&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
PermitRootLogin yes&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Il faut ensuite redemarrer le serveur ssh en faisant :&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/etc/ssh# /etc/init.d/ssh restart&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Pour gérer la redirection du SSH, on doit configurer '''nftables''' sur nos machines de service en redirigeant les ports 2201 et 2202&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
nft add table ip nat&lt;br /&gt;
nft add chain ip nat PREROUTING { type nat hook prerouting priority 0 \; }&lt;br /&gt;
nft add rule ip nat PREROUTING tcp dport 2201 dnat to 192.168.50.12:22                 &lt;br /&gt;
nft add rule ip nat PREROUTING tcp dport 2202 dnat to 192.168.50.3:22              &lt;br /&gt;
nft add chain ip nat POSTROUTING { type nat hook postrouting priority 100 \; }&lt;br /&gt;
nft add rule ip nat POSTROUTING masquerade&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Maintenant, on peut se connecter en SSH sur les machiches virtuelles de services:  De Elf, on peut se connecter a Kasav&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/# ssh root@192.168.50.3&lt;br /&gt;
root@192.168.50.3's password: &lt;br /&gt;
Linux Kasav 4.19.0-26-amd64 #1 SMP Debian 4.19.304-1 (2024-01-09) x86_64&lt;br /&gt;
&lt;br /&gt;
The programs included with the Devuan GNU/Linux system are free software;&lt;br /&gt;
the exact distribution terms for each program are described in the&lt;br /&gt;
individual files in /usr/share/doc/*/copyright.&lt;br /&gt;
&lt;br /&gt;
Devuan GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent&lt;br /&gt;
permitted by applicable law.&lt;br /&gt;
Last login: Tue Feb  3 11:34:45 2026 from 192.168.50.12&lt;br /&gt;
root@Kasav:~# &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Serveur DNS''' ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
$TTL 86400&lt;br /&gt;
@ IN SOA ns1.elvis21.tech. admin.elvis21.tech. (&lt;br /&gt;
        3298267246      ;Version&lt;br /&gt;
        3600            ;Refresh&lt;br /&gt;
        1800            ;Retry&lt;br /&gt;
        604800          ;Expire&lt;br /&gt;
        86400 )         ;Minimum TTL&lt;br /&gt;
;&lt;br /&gt;
@  IN NS ns1.elvis21.tech.&lt;br /&gt;
&lt;br /&gt;
ns1 IN A 192.168.50.12&lt;br /&gt;
ns2 IN A 192.168.50.1&lt;br /&gt;
 IN A 192.168.50.12&lt;br /&gt;
      IN AAAA 2001:660:4401:60a0:216:3eff:fe83:a3c8&lt;br /&gt;
www IN A 192.168.50.12&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/etc/bind# cat named.conf.local &lt;br /&gt;
zone &amp;quot;elvis21.tech&amp;quot; {&lt;br /&gt;
    type primary;&lt;br /&gt;
    file &amp;quot;/etc/bind/zones/db.elvis21.tech&amp;quot;;&lt;br /&gt;
    allow-transfer {&lt;br /&gt;
      2001:660:4401:60a0:216:3eff:fe70:7f1c;&lt;br /&gt;
      2001:660:4401:60a0:216:3eff:fe9a:ea1c;&lt;br /&gt;
      };&lt;br /&gt;
    also-notify { 2001:660:4401:60a0:216:3eff:fe70:7f1c; };&lt;br /&gt;
    inline-signing yes;   // DNSSEC automatique&lt;br /&gt;
    key-directory &amp;quot;/etc/bind/keys&amp;quot;; // répertoire des clefs, attention aux droits&lt;br /&gt;
    dnssec-policy &amp;quot;dnssecpolicy&amp;quot;;  // politique pour les clefs de chiffrement&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
zone &amp;quot;kasav.online&amp;quot; {&lt;br /&gt;
    type secondary;&lt;br /&gt;
    file &amp;quot;/etc/bind/backup/db.kasav.online&amp;quot;;&lt;br /&gt;
    primaries { 2001:660:4401:60a0:216:3eff:fe9a:ea1c; };&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
dnssec-policy &amp;quot;dnssecpolicy&amp;quot; {&lt;br /&gt;
  keys {&lt;br /&gt;
    ksk key-directory lifetime unlimited algorithm 13;&lt;br /&gt;
    zsk key-directory lifetime unlimited algorithm 13;&lt;br /&gt;
  };&lt;br /&gt;
  nsec3param;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/etc/bind# named-checkzone elvis21.tech /etc/bind/db.elvis21.tech&lt;br /&gt;
zone elvis21.tech/IN: loaded serial 3298267246&lt;br /&gt;
OK&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
openssl req -nodes -newkey rsa:2048 -sha256 -keyout elvis21.tech.key -out elvis21.csr&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
[[Fichier:ImageDns.png|gauche|vignette|994x994px]]&lt;br /&gt;
&lt;br /&gt;
== Mise en place du serveur Apache (http et https) ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
apt update&lt;br /&gt;
apt install apache2&lt;br /&gt;
systemctl enable --now apache2&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
[[Fichier:Elvis21.tech-DNS.png|gauche|vignette|863x863px]]&lt;br /&gt;
&lt;br /&gt;
== Installation Fail2ban ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/# apt install fail2ban &lt;br /&gt;
Installing:                     &lt;br /&gt;
  fail2ban&lt;br /&gt;
&lt;br /&gt;
root@Elf:/# systemctl status fail2ban&lt;br /&gt;
fail2ban.service - Fail2Ban Service&lt;br /&gt;
    Loaded: loaded (/usr/lib/systemd/system/fail2ban.service, disabled)&lt;br /&gt;
    Active: active (running)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/# service fail2ban status                             &lt;br /&gt;
Status of Authentication failure monitor: fail2ban is running.&lt;br /&gt;
 root@Elf:/# fail2ban-client status&lt;br /&gt;
Status&lt;br /&gt;
|- Number of jail:	1&lt;br /&gt;
`- Jail list:	sshd&lt;br /&gt;
&lt;br /&gt;
root@Elf:/# fail2ban-client status sshd&lt;br /&gt;
Status for the jail: sshd&lt;br /&gt;
|- Filter&lt;br /&gt;
|  |- Currently failed:	0&lt;br /&gt;
|  |- Total failed:	0&lt;br /&gt;
|  `- File list:	/var/log/auth.log&lt;br /&gt;
`- Actions&lt;br /&gt;
   |- Currently banned:	0&lt;br /&gt;
   |- Total banned:	0&lt;br /&gt;
   `- Banned IP list:	&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Mise en place du serveur Apache (http et https) ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/# service apache2 status&lt;br /&gt;
apache2 is running.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== WIFI ==&lt;br /&gt;
Faire ip link&lt;br /&gt;
&lt;br /&gt;
ensuite sudo airodump-ng wlanx  -- Remplacer x par le numero du wlan present &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
BSSID              PWR  Beacons    #Data, #/s  CH   MB   ENC CIPHER  AUTH ESSID&lt;br /&gt;
04:DA:D2:9C:50:54  -62       23       11    0   4   54e. WEP  WEP         cracotte05                         &lt;br /&gt;
04:DA:D2:9C:50:5A  -61        2        1    0   4   54e. WEP  WEP         cracotte11    &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;sudo airodump-ng wlan1 --bssid 04:DA:D2:9C:50:5A  -c4 --write log_airdump&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
sudo airodump-ng wlan1 --write airdump --bssid 04:DA:D2:9C:50:5A -c4&lt;br /&gt;
17:31:10  Created capture file &amp;quot;airdump-04.cap&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
 CH  4 ][ Elapsed: 39 mins ][ 2026-02-10 18:11 ][ fixed channel wlan1: 13 &lt;br /&gt;
&lt;br /&gt;
 BSSID              PWR RXQ  Beacons    #Data, #/s  CH   MB   ENC CIPHER  AUTH ESSID&lt;br /&gt;
&lt;br /&gt;
 04:DA:D2:9C:50:5A  -58   3     9766    43771   21   4   54e. WEP  WEP         cracotte11                                                                                                   &lt;br /&gt;
&lt;br /&gt;
 BSSID              STATION            PWR    Rate    Lost   Frames  Notes  Probes&lt;br /&gt;
&lt;br /&gt;
 04:DA:D2:9C:50:5A  40:A5:EF:01:2E:FA  -77    0 -48e   127    46300                                                                                                                          &lt;br /&gt;
Quitting...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
aircrack-ng airdump-05.cap &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
           Aircrack-ng 1.7 &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                 [00:25:47] Tested 869 keys (got 34546 IVs)&lt;br /&gt;
                          Got 35002 out of 35000 IVsStarting PTW attack with 35002 KB    depth   byte(vote)&lt;br /&gt;
    0    0/  2   FF(50176) 1C(43520) E6(42752) 3F(42496) B6(42496) &lt;br /&gt;
    1    0/  6   FF(48128) AC(46336) 90(42752) 8E(42496) 04(42240) &lt;br /&gt;
    2    0/  1   BD(50688) 7F(43776) 75(42752) E6(41216) F2(41216) &lt;br /&gt;
    3    9/  3   CE(39936) 05(39680) 5C(39680) 9A(39168) F4(39168) &lt;br /&gt;
    4   41/  4   6C(37376) 1E(37120) 80(37120) 88(37120) A7(37120) &lt;br /&gt;
&lt;br /&gt;
             KEY FOUND! [ FF:FF:FF:FF:FA:BC:12:CB:AE:EE:EE:EE:EE ]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
ssh -oKexAlgorithms=+diffie-hellman-group14-sha1 -oHostKeyAlgorithms=+ssh-rsa -oCiphers=+aes128-cbc admin@172.27.0.1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
C9200-E304&amp;gt;en&lt;br /&gt;
Password: &lt;br /&gt;
C9200-E304#config t&lt;br /&gt;
Enter configuration commands, one per line.  End with CNTL/Z.&lt;br /&gt;
C9200-E304(config)#vlan 28&lt;br /&gt;
C9200-E304(config-vlan)#name PoolEvora&lt;br /&gt;
C9200-E304(config-vlan)#exit &lt;br /&gt;
C9200-E304(config)#exit&lt;br /&gt;
C9200-E304#write&lt;br /&gt;
Building configuration...&lt;br /&gt;
[OK]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
C9200-E304#en&lt;br /&gt;
C9200-E304#config t&lt;br /&gt;
Enter configuration commands, one per line.  End with CNTL/Z.&lt;br /&gt;
C9200-E304(config)#ip dhcp pool PoolEvora  &lt;br /&gt;
C9200-E304(dhcp-config)#network 10.60.11.0 255.255.255.0&lt;br /&gt;
C9200-E304(dhcp-config)#dns-server 193.48.57.172&lt;br /&gt;
C9200-E304(dhcp-config)#default-router 10.60.11.254&lt;br /&gt;
C9200-E304(dhcp-config)#exit&lt;br /&gt;
C9200-E304(config)#exit&lt;br /&gt;
C9200-E304#write&lt;br /&gt;
Building configuration...&lt;br /&gt;
[OK]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
ip dhcp pool PoolTom&lt;br /&gt;
 network 10.60.10.0 255.255.255.0&lt;br /&gt;
 dns-server 193.48.57.168 &lt;br /&gt;
 default-router 10.60.10.254 &lt;br /&gt;
!         &lt;br /&gt;
ip dhcp pool PoolEvora&lt;br /&gt;
 network 10.60.11.0 255.255.255.0&lt;br /&gt;
 dns-server 193.48.57.172 &lt;br /&gt;
 default-router 10.60.11.254 &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Vsouopme</name></author>
	</entry>
	<entry>
		<id>https://wiki-se.plil.fr/mediawiki/index.php?title=SE4_IdO_s%C3%A9curit%C3%A9_syst%C3%A8me/r%C3%A9seau_2025/2026&amp;diff=12224</id>
		<title>SE4 IdO sécurité système/réseau 2025/2026</title>
		<link rel="alternate" type="text/html" href="https://wiki-se.plil.fr/mediawiki/index.php?title=SE4_IdO_s%C3%A9curit%C3%A9_syst%C3%A8me/r%C3%A9seau_2025/2026&amp;diff=12224"/>
		<updated>2026-02-10T17:14:51Z</updated>

		<summary type="html">&lt;p&gt;Vsouopme : /* Tableau des commutateurs virtuels */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Répartition des binômes pour les travaux pratiques &amp;quot;administration système et réseau&amp;quot; =&lt;br /&gt;
&lt;br /&gt;
Préfixe des noms de machine : &amp;lt;code&amp;gt;SE4&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Domaines Internet à louer sur [[gandi.net]]. Identifiant &amp;lt;code&amp;gt;pifou&amp;lt;/code&amp;gt;. Regardez le montant prévu sur le compte avant de louer un domaine.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Cahier !! Elève !! Nom de domaine&lt;br /&gt;
! Nom de machine de services !! Nom de machine mandataire&lt;br /&gt;
|-&lt;br /&gt;
| [[Atelier SysRes SE4 2025/2026 E1 | Cahier n°1]] || Pierre CASIMIRI || merteuil.tech || SE4.Merteuil||SE4.Rosemonde&lt;br /&gt;
|-&lt;br /&gt;
| [[Atelier SysRes SE4 2025/2026 E2 | Cahier n°2]] || Agathe HOUDUSSE || valmont.tech || SE4.Valmont||SE4.Rosemonde&lt;br /&gt;
|-&lt;br /&gt;
| [[Atelier SysRes SE4 2025/2026 E3 | Cahier n°3]] || Lilia GHAZALI || kirchhoff.live|| SE4.Tension||SE4.Kirchhoff&lt;br /&gt;
|-&lt;br /&gt;
| [[Atelier SysRes SE4 2025/2026 E4 | Cahier n°4]] || Marin GOURVEST || courant.online|| SE4.Courant||SE4.Kirchhoff&lt;br /&gt;
|-&lt;br /&gt;
| [[Atelier SysRes SE4 2025/2026 E5 | Cahier n°5]] || Cédric PAYET || archlinuxbtw.lol|| SE4.CachyOS||SE4.LinusTorvalds&lt;br /&gt;
|-&lt;br /&gt;
| [[Atelier SysRes SE4 2025/2026 E6 | Cahier n°6]] || Thomas DELOBELLE || archlinux.lol|| SE4.Manjaro||SE4.LinusTorvalds&lt;br /&gt;
|-&lt;br /&gt;
| [[Atelier SysRes SE4 2025/2026 E7 | Cahier n°7]] || Ibrahim TEPELI || c2vts.fr|| SE4.C2||SE4.Garage&lt;br /&gt;
|-&lt;br /&gt;
| [[Atelier SysRes SE4 2025/2026 E8 | Cahier n°8]] || Yassine YAHIANI || rs7.online|| SE4.RS7||SE4.Garage&lt;br /&gt;
|-&lt;br /&gt;
| [[Atelier SysRes SE4 2025/2026 E9 | Cahier n°9]] || Aurèle VANGHELUWE || tompere.online|| SE4-Tompere1||SE4-Tompere0&lt;br /&gt;
|-&lt;br /&gt;
| [[Atelier SysRes SE4 2025/2026 E10 | Cahier n°10]] || Tom MERIEN || tompere2.xyz|| SE4-Tompere2||SE4-Tompere0&lt;br /&gt;
|-&lt;br /&gt;
| [[Atelier SysRes SE4 2025/2026 E11 | Cahier n°11]] || Varesse Evora Souop Metse || elvis21.shop|| SE4.Elf||SE4.RockStar&lt;br /&gt;
|-&lt;br /&gt;
| [[Atelier SysRes SE4 2025/2026 E12 | Cahier n°12]] || Mario Sylainx S. GAUTHIER || kasav.online|| SE4.Kasav||SE4.RockStar&lt;br /&gt;
|-&lt;br /&gt;
| [[Atelier SysRes SE4 2025/2026 E13 | Cahier n°13]] || Billel Cheklat || deadpool.tech|| SE4.catwoman||SE4.superman&lt;br /&gt;
|-&lt;br /&gt;
| [[Atelier SysRes SE4 2025/2026 E14 | Cahier n°14]] || Antonin Biernacki || deadpool.tech|| SE4.batman||SE4.superman&lt;br /&gt;
|-&lt;br /&gt;
| [[Atelier SysRes SE4 2025/2026 E15 | Cahier n°15]] || Mohamed Salhi || msalhi.online|| SE4.Moon||SE4.Solstice&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Nom machine mandataire !! IPv4 publique machine mandataire !! Elèves &lt;br /&gt;
|-&lt;br /&gt;
| SE4.Rosemonde|| 193.48.57.165|| Pierre CASIMIRI &amp;amp; Agathe HOUDUSSE&lt;br /&gt;
|-&lt;br /&gt;
| SE4.Kirchhoff|| 193.48.57.171|| Lilia GHAZALI &amp;amp; Marin GOURVEST&lt;br /&gt;
|-&lt;br /&gt;
| SE4.LinusTorvalds|| 193.48.57.166|| Cédric PAYET &amp;amp; Thomas DELOBELLE&lt;br /&gt;
|-&lt;br /&gt;
| SE4.Garage|| 193.48.57.170|| Ibrahim TEPELI &amp;amp; Yassine YAHIANI &lt;br /&gt;
|-&lt;br /&gt;
| SE4-Tompere0|| 193.48.57.168|| Aurèle VANGHELUWE &amp;amp; Tom MERIEN&lt;br /&gt;
|-&lt;br /&gt;
| SE4.superman|| 193.48.57.169|| Billel Cheklat &amp;amp; Antonin Biernacki&lt;br /&gt;
|-&lt;br /&gt;
| SE4.RockStar|| 193.48.57.172|| Varesse Evora Souop Metse &amp;amp; GAUTHIER Mario Sylainx S.&lt;br /&gt;
|-&lt;br /&gt;
| SE4.Solstice|| &amp;lt;code&amp;gt;193.48.57.167&amp;lt;/code&amp;gt;|| Mohamed Salhi &lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Tableau des commutateurs virtuels =&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Noms des élèves !! Nom du fichier de configuration !! Réseau IPv4 utilisé &lt;br /&gt;
|-&lt;br /&gt;
| CASIMIRI / HOUDUSSE || pont_gercourt || 192.168.3.0/24&lt;br /&gt;
|-&lt;br /&gt;
|PAYET / DELOBELLE&lt;br /&gt;
|pont_pacman&lt;br /&gt;
|192.168.10.0/24&lt;br /&gt;
|-&lt;br /&gt;
|MERIEN / VANGHELUWE&lt;br /&gt;
|pont_pere&lt;br /&gt;
|192.168.0.0/24&lt;br /&gt;
|-&lt;br /&gt;
|CHEKLAT / BIERNACKI&lt;br /&gt;
|pont_ironman&lt;br /&gt;
|192.168.69.0/24&lt;br /&gt;
|-&lt;br /&gt;
|SALHI&lt;br /&gt;
|pont_msalhi&lt;br /&gt;
|192.168.20.0/24&lt;br /&gt;
|-&lt;br /&gt;
|GOURVEST/GHAZALI&lt;br /&gt;
|pont_diviseur&lt;br /&gt;
|192.168.67.0/24&lt;br /&gt;
|-&lt;br /&gt;
|YAHIANI / TEPELI&lt;br /&gt;
|pontclio&lt;br /&gt;
|192.168.7.0/24&lt;br /&gt;
|-&lt;br /&gt;
|GAUTHIER / SOUOP METSE&lt;br /&gt;
|Styx&lt;br /&gt;
|192.168.50.0/24&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Tableau des réseaux virtuels =&lt;br /&gt;
&lt;br /&gt;
VLAN privés :&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Nom !! Numéro &lt;br /&gt;
|-&lt;br /&gt;
| VLAN1 || 1&lt;br /&gt;
|-&lt;br /&gt;
| MV-PROMO || 2 &lt;br /&gt;
|-&lt;br /&gt;
|E1-Pierre&lt;br /&gt;
|11&lt;br /&gt;
|-&lt;br /&gt;
|E2-Agathe&lt;br /&gt;
|12&lt;br /&gt;
|-&lt;br /&gt;
|E5-Cedric&lt;br /&gt;
|15&lt;br /&gt;
|-&lt;br /&gt;
|E6-Thomas&lt;br /&gt;
|16&lt;br /&gt;
|-&lt;br /&gt;
|E9-Aurele&lt;br /&gt;
|19&lt;br /&gt;
|-&lt;br /&gt;
|E10-Tom&lt;br /&gt;
|20&lt;br /&gt;
|-&lt;br /&gt;
|E13-Billel&lt;br /&gt;
|23&lt;br /&gt;
|-&lt;br /&gt;
|E14-Antonin&lt;br /&gt;
|24&lt;br /&gt;
|-&lt;br /&gt;
|E15-MSalhi&lt;br /&gt;
|25&lt;br /&gt;
|-&lt;br /&gt;
|E11-Evora&lt;br /&gt;
|28&lt;br /&gt;
|-&lt;br /&gt;
|E12-Gauthier&lt;br /&gt;
|21&lt;br /&gt;
|-&lt;br /&gt;
|E8-Yassine&lt;br /&gt;
|18&lt;br /&gt;
|-&lt;br /&gt;
|E7-Ibrahim&lt;br /&gt;
|17&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
VLAN communs avec l'école :&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Nom !! Numéro &lt;br /&gt;
|-&lt;br /&gt;
| INTERCO1 || 530 &lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Schéma de câblage =&lt;br /&gt;
&lt;br /&gt;
Vous avez des éléments réseaux et des panneaux de brassage fibres dans les locaux techniques SR31 et SR52 ainsi que dans les salles E304 et E306.&lt;br /&gt;
&lt;br /&gt;
Le plan doit donc comporter, pour chaque connexion, les locaux d'origine et de destination ainsi que l'identifiant des ports d'origine et de destination.&lt;br /&gt;
&lt;br /&gt;
= Plan d'adressage =&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Nom VLAN !! Réseau IPv4 !! Réseau IPv6 &lt;br /&gt;
|-&lt;br /&gt;
| MV-PROMO || &amp;lt;code&amp;gt;193.48.57.160/27&amp;lt;/code&amp;gt; || &amp;lt;/code&amp;gt;2001:660:4401:60a0::/64&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| PoolPierre || &amp;lt;code&amp;gt;10.60.1.0/24&amp;lt;/code&amp;gt; || &amp;lt;/code&amp;gt;2001:660:4401:60a1::/64&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| PoolAgathe || &amp;lt;code&amp;gt;10.60.2.0/24&amp;lt;/code&amp;gt; || &amp;lt;/code&amp;gt;2001:660:4401:60a2::/64&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|PoolCedric&lt;br /&gt;
|&amp;lt;code&amp;gt;10.60.5.0/24&amp;lt;/code&amp;gt;&lt;br /&gt;
|2001:660:4401:60a5::/64&lt;br /&gt;
|-&lt;br /&gt;
|PoolThomas&lt;br /&gt;
|&amp;lt;code&amp;gt;10.60.6.0/24&amp;lt;/code&amp;gt;&lt;br /&gt;
|2001:660:4401:60a6::/64&lt;br /&gt;
|-&lt;br /&gt;
|PoolBillel&lt;br /&gt;
|&amp;lt;code&amp;gt;10.60.13.0/24&amp;lt;/code&amp;gt;&lt;br /&gt;
|2001:660:4401:60ad::/64&lt;br /&gt;
|-&lt;br /&gt;
|PoolAurele&lt;br /&gt;
|&amp;lt;code&amp;gt;10.60.9.0/24&amp;lt;/code&amp;gt;&lt;br /&gt;
|2001:660:4401:60a9::/64&lt;br /&gt;
|-&lt;br /&gt;
|PoolTom&lt;br /&gt;
|&amp;lt;code&amp;gt;10.60.10.0/24&amp;lt;/code&amp;gt;&lt;br /&gt;
|2001:660:4401:60aa::/64&lt;br /&gt;
|-&lt;br /&gt;
|PoolSalhi&lt;br /&gt;
|&amp;lt;code&amp;gt;10.60.15.0/24&amp;lt;/code&amp;gt;&lt;br /&gt;
|2001:660:4401:60b1::/64&lt;br /&gt;
|-&lt;br /&gt;
|PoolAntonin&lt;br /&gt;
|&amp;lt;code&amp;gt;10.60.14.0/24&amp;lt;/code&amp;gt;&lt;br /&gt;
|2001:660:4401:60ae::/64&lt;br /&gt;
|-&lt;br /&gt;
|PoolYassine&lt;br /&gt;
|10.60.8.0/24&lt;br /&gt;
|2001:660:4401:60a8::/64&lt;br /&gt;
|-&lt;br /&gt;
|PoolEvora&lt;br /&gt;
|10.60.11.0/24&lt;br /&gt;
|2001:660:4401:60ab::/64&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Adresses IPv4 des éléments réseau dans VLAN1&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Elément !! Adresse &lt;br /&gt;
|-&lt;br /&gt;
| Routeur C9200-E304 || 172.27.0.1/16&lt;br /&gt;
|-&lt;br /&gt;
| Routeur C9200-E306 || 172.27.0.2/16&lt;br /&gt;
|-&lt;br /&gt;
| Borne Wi-Fi E306 || 172.27.0.3/16&lt;br /&gt;
|-&lt;br /&gt;
| Borne Wi-Fi E304 || 172.27.0.4/16&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Informations VRRP =&lt;br /&gt;
&lt;br /&gt;
Pour chaque VLAN et pour chaque instance VRRP dans le VLAN listez les adresses IPv4 propres ainsi que l'unique IPv4 virtuelle.&lt;br /&gt;
&lt;br /&gt;
== VLAN des machines virtuelles ==&lt;br /&gt;
&lt;br /&gt;
Une seule instance VRRP dans le VLAN des machines virtuelles.&lt;br /&gt;
&lt;br /&gt;
Adresse IPv4 virtuelle : &amp;lt;code&amp;gt;193.48.57.162&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Routeur !! IPv4 propre &lt;br /&gt;
|-&lt;br /&gt;
| C9200 E304 || &amp;lt;code&amp;gt;193.48.57.163&amp;lt;/code&amp;gt;&lt;br /&gt;
|- &lt;br /&gt;
| C9200 E306 || &amp;lt;code&amp;gt;193.48.57.164&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== VLAN ... ==&lt;/div&gt;</summary>
		<author><name>Vsouopme</name></author>
	</entry>
	<entry>
		<id>https://wiki-se.plil.fr/mediawiki/index.php?title=Atelier_SysRes_SE4_2025/2026_E11&amp;diff=12223</id>
		<title>Atelier SysRes SE4 2025/2026 E11</title>
		<link rel="alternate" type="text/html" href="https://wiki-se.plil.fr/mediawiki/index.php?title=Atelier_SysRes_SE4_2025/2026_E11&amp;diff=12223"/>
		<updated>2026-02-10T17:13:47Z</updated>

		<summary type="html">&lt;p&gt;Vsouopme : /* WIFI */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Projet Virtualisation /Administration Systeme-Réseau - Machine SE4.Elf =&lt;br /&gt;
Dans le cadre de ce projet, nnous avons déployés une infrastructure composée de '''deux machines dédiées aux services''' et d’une '''machine mandataire''', le tout à l’aide de l'environnement  '''Xen.'''&lt;br /&gt;
&lt;br /&gt;
== Création des machines virtuelles ==&lt;br /&gt;
Les machines sont créées  sur le Dom0 '''Capbreton.plil.info''' en faisant un '''ssh root@capbreton.plil.info''' &lt;br /&gt;
&lt;br /&gt;
Sur la capbreton.plil.info, &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
xen create-image --hostname=SE4.Elf --dhcp --dir=/usr/local/xen --size=10G --dist=excalibur --memory=2G --bridge=Styx --force&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; '''Xen-create-image''' :  Commande permettant de créer une nouvelle machine virtuelle Xen&lt;br /&gt;
&lt;br /&gt;
'''--hostname=SE4.Elf :''' Pour le nom de la machine &lt;br /&gt;
&lt;br /&gt;
'''--size=10G''' : La taille du disque &lt;br /&gt;
&lt;br /&gt;
'''--bridge=Styx''' : Le nom du bridge &lt;br /&gt;
&lt;br /&gt;
Par la suite il faut creer un fichier dans le répertoire &amp;lt;code&amp;gt;/etc/network/interfaces.d&amp;lt;/code&amp;gt; du Dom0 pour créer notre pont. (NB: Il faut noter que cette etape on peut la faire avant la creation de notre VM&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
auto Styx&lt;br /&gt;
&lt;br /&gt;
iface Styx inet manual&lt;br /&gt;
   bridge_ports none&lt;br /&gt;
   up ip link set $IFACE up&lt;br /&gt;
   down ip link set $IFACE down&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;La commande '''xen list :''' Affiche les '''machines virtuelles''' (VM) qui sont actuellement gérées par Xen (Elle fait la liste des VM allumée).&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
root@capbreton:~# xen list&lt;br /&gt;
SE4.batman                                 322  2048     1     -b----      37.5&lt;br /&gt;
SE4.Moon                                   326  2048     1     -b----      41.1&lt;br /&gt;
SE4.C2                                     332  1024     1     -b----      18.1&lt;br /&gt;
SE4.Tension                                343  2048     1     -b----       7.8&lt;br /&gt;
SE4.CachyOS                                365  2048     1     -b----      10.2&lt;br /&gt;
SE4.RockStar                               367  2048     1     -b----       6.1&lt;br /&gt;
SE4.Kasav                                  368  2048     1     -b----       5.9&lt;br /&gt;
SE4.Elf                                    369  2048     1     -b----       5.6&lt;br /&gt;
SE4.catwoman                               370  2048     1     -b----       6.1&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;-La commande '''xen create /etc/xen/SE4.Elf.cfg''' permet d'allumer la Machine virtuellle.&lt;br /&gt;
&lt;br /&gt;
-La commande xen '''console SE4.Elf''' permet d'acceder  / de se connecter  a la VM.&lt;br /&gt;
&lt;br /&gt;
-La commande '''xen shutdown''' '''SE4.Elf''' permet d'eteindre la machine virtuelle.&lt;br /&gt;
&lt;br /&gt;
Lors de la tentative de connexion, il y'a une un probleme , pour y remedier,  '''Ctrl + AltGr + ] =&amp;gt; vi =&amp;gt; :q! =&amp;gt; reconnexion'''&lt;br /&gt;
&lt;br /&gt;
Pour voir le mot de passe de la VM, '''cat /var/log/xen-tools/SE4.Elf.log'''&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
Installation Summary&lt;br /&gt;
---------------------&lt;br /&gt;
Hostname        :  SE4.Elf&lt;br /&gt;
Distribution    :  excalibur&lt;br /&gt;
MAC Address     :  00:16:3E:83:A3:C7&lt;br /&gt;
IP Address(es)  :  dynamic&lt;br /&gt;
SSH Fingerprint :  SHA256:IrPhxhB4m1s+eaPaLynS6NlE/HfL78+y3ba3DPuHFQU (DSA)&lt;br /&gt;
SSH Fingerprint :  SHA256:RT+MZtlFxC7BrdYORzOcxDX+SKsJrLzOGWWngX2pKz4 (ECDSA)&lt;br /&gt;
SSH Fingerprint :  SHA256:aLYvYqUPX2Q/J5P0nTpdpMyrFD5xopRqkFKuYb7QUo4 (ED25519)&lt;br /&gt;
SSH Fingerprint :  SHA256:b0ddm9FYx4/losJU8/pE9MXx7102ygkAMjChOvPlNhE (RSA)&lt;br /&gt;
Root Password   :  X&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;- La commande '''vi /etc/hostname''' pour changer le nom de la VM&lt;br /&gt;
&lt;br /&gt;
== '''Configuration de la Machine de Services''' ==&lt;br /&gt;
Il faut creer deux partitions LVM de 10G pour votre machine virtuelle et modifiez le fichier de configuration de la machine virtuelle de services pour faire en sorte que les répertoires &amp;lt;code&amp;gt;/'''var'''&amp;lt;/code&amp;gt; et &amp;lt;code&amp;gt;'''/home'''&amp;lt;/code&amp;gt; de la machine virtuelle soient implantés sur ces partitions LVM&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
SE4.Poseidon.home lv_home_SE4Elf lv_var_SE4Elf  SE4.Gaby.home SE4.Poseidon.var SE4.Gaby.var &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Serveur SSH''' ==&lt;br /&gt;
Notre machine virtuelle doit etre accessible par SSH, on autorise donc l'accès par l'utilisateur '''Root en modifiant le fichier de de configuration &amp;lt;code&amp;gt;/etc/ssh/sshd_config  :&amp;lt;/code&amp;gt;'''&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
PermitRootLogin yes&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Il faut ensuite redemarrer le serveur ssh en faisant :&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/etc/ssh# /etc/init.d/ssh restart&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Pour gérer la redirection du SSH, on doit configurer '''nftables''' sur nos machines de service en redirigeant les ports 2201 et 2202&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
nft add table ip nat&lt;br /&gt;
nft add chain ip nat PREROUTING { type nat hook prerouting priority 0 \; }&lt;br /&gt;
nft add rule ip nat PREROUTING tcp dport 2201 dnat to 192.168.50.12:22                 &lt;br /&gt;
nft add rule ip nat PREROUTING tcp dport 2202 dnat to 192.168.50.3:22              &lt;br /&gt;
nft add chain ip nat POSTROUTING { type nat hook postrouting priority 100 \; }&lt;br /&gt;
nft add rule ip nat POSTROUTING masquerade&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Maintenant, on peut se connecter en SSH sur les machiches virtuelles de services:  De Elf, on peut se connecter a Kasav&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/# ssh root@192.168.50.3&lt;br /&gt;
root@192.168.50.3's password: &lt;br /&gt;
Linux Kasav 4.19.0-26-amd64 #1 SMP Debian 4.19.304-1 (2024-01-09) x86_64&lt;br /&gt;
&lt;br /&gt;
The programs included with the Devuan GNU/Linux system are free software;&lt;br /&gt;
the exact distribution terms for each program are described in the&lt;br /&gt;
individual files in /usr/share/doc/*/copyright.&lt;br /&gt;
&lt;br /&gt;
Devuan GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent&lt;br /&gt;
permitted by applicable law.&lt;br /&gt;
Last login: Tue Feb  3 11:34:45 2026 from 192.168.50.12&lt;br /&gt;
root@Kasav:~# &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Serveur DNS''' ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
$TTL 86400&lt;br /&gt;
@ IN SOA ns1.elvis21.tech. admin.elvis21.tech. (&lt;br /&gt;
        3298267246      ;Version&lt;br /&gt;
        3600            ;Refresh&lt;br /&gt;
        1800            ;Retry&lt;br /&gt;
        604800          ;Expire&lt;br /&gt;
        86400 )         ;Minimum TTL&lt;br /&gt;
;&lt;br /&gt;
@  IN NS ns1.elvis21.tech.&lt;br /&gt;
&lt;br /&gt;
ns1 IN A 192.168.50.12&lt;br /&gt;
ns2 IN A 192.168.50.1&lt;br /&gt;
 IN A 192.168.50.12&lt;br /&gt;
      IN AAAA 2001:660:4401:60a0:216:3eff:fe83:a3c8&lt;br /&gt;
www IN A 192.168.50.12&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/etc/bind# cat named.conf.local &lt;br /&gt;
zone &amp;quot;elvis21.tech&amp;quot; {&lt;br /&gt;
    type primary;&lt;br /&gt;
    file &amp;quot;/etc/bind/zones/db.elvis21.tech&amp;quot;;&lt;br /&gt;
    allow-transfer {&lt;br /&gt;
      2001:660:4401:60a0:216:3eff:fe70:7f1c;&lt;br /&gt;
      2001:660:4401:60a0:216:3eff:fe9a:ea1c;&lt;br /&gt;
      };&lt;br /&gt;
    also-notify { 2001:660:4401:60a0:216:3eff:fe70:7f1c; };&lt;br /&gt;
    inline-signing yes;   // DNSSEC automatique&lt;br /&gt;
    key-directory &amp;quot;/etc/bind/keys&amp;quot;; // répertoire des clefs, attention aux droits&lt;br /&gt;
    dnssec-policy &amp;quot;dnssecpolicy&amp;quot;;  // politique pour les clefs de chiffrement&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
zone &amp;quot;kasav.online&amp;quot; {&lt;br /&gt;
    type secondary;&lt;br /&gt;
    file &amp;quot;/etc/bind/backup/db.kasav.online&amp;quot;;&lt;br /&gt;
    primaries { 2001:660:4401:60a0:216:3eff:fe9a:ea1c; };&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
dnssec-policy &amp;quot;dnssecpolicy&amp;quot; {&lt;br /&gt;
  keys {&lt;br /&gt;
    ksk key-directory lifetime unlimited algorithm 13;&lt;br /&gt;
    zsk key-directory lifetime unlimited algorithm 13;&lt;br /&gt;
  };&lt;br /&gt;
  nsec3param;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/etc/bind# named-checkzone elvis21.tech /etc/bind/db.elvis21.tech&lt;br /&gt;
zone elvis21.tech/IN: loaded serial 3298267246&lt;br /&gt;
OK&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
openssl req -nodes -newkey rsa:2048 -sha256 -keyout elvis21.tech.key -out elvis21.csr&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
[[Fichier:ImageDns.png|gauche|vignette|994x994px]]&lt;br /&gt;
&lt;br /&gt;
== Mise en place du serveur Apache (http et https) ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
apt update&lt;br /&gt;
apt install apache2&lt;br /&gt;
systemctl enable --now apache2&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
[[Fichier:Elvis21.tech-DNS.png|gauche|vignette|863x863px]]&lt;br /&gt;
&lt;br /&gt;
== Installation Fail2ban ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/# apt install fail2ban &lt;br /&gt;
Installing:                     &lt;br /&gt;
  fail2ban&lt;br /&gt;
&lt;br /&gt;
root@Elf:/# systemctl status fail2ban&lt;br /&gt;
fail2ban.service - Fail2Ban Service&lt;br /&gt;
    Loaded: loaded (/usr/lib/systemd/system/fail2ban.service, disabled)&lt;br /&gt;
    Active: active (running)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/# service fail2ban status                             &lt;br /&gt;
Status of Authentication failure monitor: fail2ban is running.&lt;br /&gt;
 root@Elf:/# fail2ban-client status&lt;br /&gt;
Status&lt;br /&gt;
|- Number of jail:	1&lt;br /&gt;
`- Jail list:	sshd&lt;br /&gt;
&lt;br /&gt;
root@Elf:/# fail2ban-client status sshd&lt;br /&gt;
Status for the jail: sshd&lt;br /&gt;
|- Filter&lt;br /&gt;
|  |- Currently failed:	0&lt;br /&gt;
|  |- Total failed:	0&lt;br /&gt;
|  `- File list:	/var/log/auth.log&lt;br /&gt;
`- Actions&lt;br /&gt;
   |- Currently banned:	0&lt;br /&gt;
   |- Total banned:	0&lt;br /&gt;
   `- Banned IP list:	&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Mise en place du serveur Apache (http et https) ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/# service apache2 status&lt;br /&gt;
apache2 is running.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== WIFI ==&lt;br /&gt;
Faire ip link&lt;br /&gt;
&lt;br /&gt;
ensuite sudo airodump-ng wlanx  -- Remplacer x par le numero du wlan present &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
BSSID              PWR  Beacons    #Data, #/s  CH   MB   ENC CIPHER  AUTH ESSID&lt;br /&gt;
04:DA:D2:9C:50:54  -62       23       11    0   4   54e. WEP  WEP         cracotte05                         &lt;br /&gt;
04:DA:D2:9C:50:5A  -61        2        1    0   4   54e. WEP  WEP         cracotte11    &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;sudo airodump-ng wlan1 --bssid 04:DA:D2:9C:50:5A  -c4 --write log_airdump&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
ssh -oKexAlgorithms=+diffie-hellman-group14-sha1 -oHostKeyAlgorithms=+ssh-rsa -oCiphers=+aes128-cbc admin@172.27.0.1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
C9200-E304&amp;gt;en&lt;br /&gt;
Password: &lt;br /&gt;
C9200-E304#config t&lt;br /&gt;
Enter configuration commands, one per line.  End with CNTL/Z.&lt;br /&gt;
C9200-E304(config)#vlan 28&lt;br /&gt;
C9200-E304(config-vlan)#name PoolEvora&lt;br /&gt;
C9200-E304(config-vlan)#exit &lt;br /&gt;
C9200-E304(config)#exit&lt;br /&gt;
C9200-E304#write&lt;br /&gt;
Building configuration...&lt;br /&gt;
[OK]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
C9200-E304#en&lt;br /&gt;
C9200-E304#config t&lt;br /&gt;
Enter configuration commands, one per line.  End with CNTL/Z.&lt;br /&gt;
C9200-E304(config)#ip dhcp pool PoolEvora  &lt;br /&gt;
C9200-E304(dhcp-config)#network 10.60.11.0 255.255.255.0&lt;br /&gt;
C9200-E304(dhcp-config)#dns-server 193.48.57.172&lt;br /&gt;
C9200-E304(dhcp-config)#default-router 10.60.11.254&lt;br /&gt;
C9200-E304(dhcp-config)#exit&lt;br /&gt;
C9200-E304(config)#exit&lt;br /&gt;
C9200-E304#write&lt;br /&gt;
Building configuration...&lt;br /&gt;
[OK]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
ip dhcp pool PoolTom&lt;br /&gt;
 network 10.60.10.0 255.255.255.0&lt;br /&gt;
 dns-server 193.48.57.168 &lt;br /&gt;
 default-router 10.60.10.254 &lt;br /&gt;
!         &lt;br /&gt;
ip dhcp pool PoolEvora&lt;br /&gt;
 network 10.60.11.0 255.255.255.0&lt;br /&gt;
 dns-server 193.48.57.172 &lt;br /&gt;
 default-router 10.60.11.254 &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Vsouopme</name></author>
	</entry>
	<entry>
		<id>https://wiki-se.plil.fr/mediawiki/index.php?title=Atelier_SysRes_SE4_2025/2026_E11&amp;diff=12222</id>
		<title>Atelier SysRes SE4 2025/2026 E11</title>
		<link rel="alternate" type="text/html" href="https://wiki-se.plil.fr/mediawiki/index.php?title=Atelier_SysRes_SE4_2025/2026_E11&amp;diff=12222"/>
		<updated>2026-02-10T17:13:11Z</updated>

		<summary type="html">&lt;p&gt;Vsouopme : /* WIFI */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Projet Virtualisation /Administration Systeme-Réseau - Machine SE4.Elf =&lt;br /&gt;
Dans le cadre de ce projet, nnous avons déployés une infrastructure composée de '''deux machines dédiées aux services''' et d’une '''machine mandataire''', le tout à l’aide de l'environnement  '''Xen.'''&lt;br /&gt;
&lt;br /&gt;
== Création des machines virtuelles ==&lt;br /&gt;
Les machines sont créées  sur le Dom0 '''Capbreton.plil.info''' en faisant un '''ssh root@capbreton.plil.info''' &lt;br /&gt;
&lt;br /&gt;
Sur la capbreton.plil.info, &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
xen create-image --hostname=SE4.Elf --dhcp --dir=/usr/local/xen --size=10G --dist=excalibur --memory=2G --bridge=Styx --force&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; '''Xen-create-image''' :  Commande permettant de créer une nouvelle machine virtuelle Xen&lt;br /&gt;
&lt;br /&gt;
'''--hostname=SE4.Elf :''' Pour le nom de la machine &lt;br /&gt;
&lt;br /&gt;
'''--size=10G''' : La taille du disque &lt;br /&gt;
&lt;br /&gt;
'''--bridge=Styx''' : Le nom du bridge &lt;br /&gt;
&lt;br /&gt;
Par la suite il faut creer un fichier dans le répertoire &amp;lt;code&amp;gt;/etc/network/interfaces.d&amp;lt;/code&amp;gt; du Dom0 pour créer notre pont. (NB: Il faut noter que cette etape on peut la faire avant la creation de notre VM&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
auto Styx&lt;br /&gt;
&lt;br /&gt;
iface Styx inet manual&lt;br /&gt;
   bridge_ports none&lt;br /&gt;
   up ip link set $IFACE up&lt;br /&gt;
   down ip link set $IFACE down&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;La commande '''xen list :''' Affiche les '''machines virtuelles''' (VM) qui sont actuellement gérées par Xen (Elle fait la liste des VM allumée).&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
root@capbreton:~# xen list&lt;br /&gt;
SE4.batman                                 322  2048     1     -b----      37.5&lt;br /&gt;
SE4.Moon                                   326  2048     1     -b----      41.1&lt;br /&gt;
SE4.C2                                     332  1024     1     -b----      18.1&lt;br /&gt;
SE4.Tension                                343  2048     1     -b----       7.8&lt;br /&gt;
SE4.CachyOS                                365  2048     1     -b----      10.2&lt;br /&gt;
SE4.RockStar                               367  2048     1     -b----       6.1&lt;br /&gt;
SE4.Kasav                                  368  2048     1     -b----       5.9&lt;br /&gt;
SE4.Elf                                    369  2048     1     -b----       5.6&lt;br /&gt;
SE4.catwoman                               370  2048     1     -b----       6.1&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;-La commande '''xen create /etc/xen/SE4.Elf.cfg''' permet d'allumer la Machine virtuellle.&lt;br /&gt;
&lt;br /&gt;
-La commande xen '''console SE4.Elf''' permet d'acceder  / de se connecter  a la VM.&lt;br /&gt;
&lt;br /&gt;
-La commande '''xen shutdown''' '''SE4.Elf''' permet d'eteindre la machine virtuelle.&lt;br /&gt;
&lt;br /&gt;
Lors de la tentative de connexion, il y'a une un probleme , pour y remedier,  '''Ctrl + AltGr + ] =&amp;gt; vi =&amp;gt; :q! =&amp;gt; reconnexion'''&lt;br /&gt;
&lt;br /&gt;
Pour voir le mot de passe de la VM, '''cat /var/log/xen-tools/SE4.Elf.log'''&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
Installation Summary&lt;br /&gt;
---------------------&lt;br /&gt;
Hostname        :  SE4.Elf&lt;br /&gt;
Distribution    :  excalibur&lt;br /&gt;
MAC Address     :  00:16:3E:83:A3:C7&lt;br /&gt;
IP Address(es)  :  dynamic&lt;br /&gt;
SSH Fingerprint :  SHA256:IrPhxhB4m1s+eaPaLynS6NlE/HfL78+y3ba3DPuHFQU (DSA)&lt;br /&gt;
SSH Fingerprint :  SHA256:RT+MZtlFxC7BrdYORzOcxDX+SKsJrLzOGWWngX2pKz4 (ECDSA)&lt;br /&gt;
SSH Fingerprint :  SHA256:aLYvYqUPX2Q/J5P0nTpdpMyrFD5xopRqkFKuYb7QUo4 (ED25519)&lt;br /&gt;
SSH Fingerprint :  SHA256:b0ddm9FYx4/losJU8/pE9MXx7102ygkAMjChOvPlNhE (RSA)&lt;br /&gt;
Root Password   :  X&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;- La commande '''vi /etc/hostname''' pour changer le nom de la VM&lt;br /&gt;
&lt;br /&gt;
== '''Configuration de la Machine de Services''' ==&lt;br /&gt;
Il faut creer deux partitions LVM de 10G pour votre machine virtuelle et modifiez le fichier de configuration de la machine virtuelle de services pour faire en sorte que les répertoires &amp;lt;code&amp;gt;/'''var'''&amp;lt;/code&amp;gt; et &amp;lt;code&amp;gt;'''/home'''&amp;lt;/code&amp;gt; de la machine virtuelle soient implantés sur ces partitions LVM&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
SE4.Poseidon.home lv_home_SE4Elf lv_var_SE4Elf  SE4.Gaby.home SE4.Poseidon.var SE4.Gaby.var &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Serveur SSH''' ==&lt;br /&gt;
Notre machine virtuelle doit etre accessible par SSH, on autorise donc l'accès par l'utilisateur '''Root en modifiant le fichier de de configuration &amp;lt;code&amp;gt;/etc/ssh/sshd_config  :&amp;lt;/code&amp;gt;'''&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
PermitRootLogin yes&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Il faut ensuite redemarrer le serveur ssh en faisant :&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/etc/ssh# /etc/init.d/ssh restart&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Pour gérer la redirection du SSH, on doit configurer '''nftables''' sur nos machines de service en redirigeant les ports 2201 et 2202&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
nft add table ip nat&lt;br /&gt;
nft add chain ip nat PREROUTING { type nat hook prerouting priority 0 \; }&lt;br /&gt;
nft add rule ip nat PREROUTING tcp dport 2201 dnat to 192.168.50.12:22                 &lt;br /&gt;
nft add rule ip nat PREROUTING tcp dport 2202 dnat to 192.168.50.3:22              &lt;br /&gt;
nft add chain ip nat POSTROUTING { type nat hook postrouting priority 100 \; }&lt;br /&gt;
nft add rule ip nat POSTROUTING masquerade&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Maintenant, on peut se connecter en SSH sur les machiches virtuelles de services:  De Elf, on peut se connecter a Kasav&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/# ssh root@192.168.50.3&lt;br /&gt;
root@192.168.50.3's password: &lt;br /&gt;
Linux Kasav 4.19.0-26-amd64 #1 SMP Debian 4.19.304-1 (2024-01-09) x86_64&lt;br /&gt;
&lt;br /&gt;
The programs included with the Devuan GNU/Linux system are free software;&lt;br /&gt;
the exact distribution terms for each program are described in the&lt;br /&gt;
individual files in /usr/share/doc/*/copyright.&lt;br /&gt;
&lt;br /&gt;
Devuan GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent&lt;br /&gt;
permitted by applicable law.&lt;br /&gt;
Last login: Tue Feb  3 11:34:45 2026 from 192.168.50.12&lt;br /&gt;
root@Kasav:~# &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Serveur DNS''' ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
$TTL 86400&lt;br /&gt;
@ IN SOA ns1.elvis21.tech. admin.elvis21.tech. (&lt;br /&gt;
        3298267246      ;Version&lt;br /&gt;
        3600            ;Refresh&lt;br /&gt;
        1800            ;Retry&lt;br /&gt;
        604800          ;Expire&lt;br /&gt;
        86400 )         ;Minimum TTL&lt;br /&gt;
;&lt;br /&gt;
@  IN NS ns1.elvis21.tech.&lt;br /&gt;
&lt;br /&gt;
ns1 IN A 192.168.50.12&lt;br /&gt;
ns2 IN A 192.168.50.1&lt;br /&gt;
 IN A 192.168.50.12&lt;br /&gt;
      IN AAAA 2001:660:4401:60a0:216:3eff:fe83:a3c8&lt;br /&gt;
www IN A 192.168.50.12&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/etc/bind# cat named.conf.local &lt;br /&gt;
zone &amp;quot;elvis21.tech&amp;quot; {&lt;br /&gt;
    type primary;&lt;br /&gt;
    file &amp;quot;/etc/bind/zones/db.elvis21.tech&amp;quot;;&lt;br /&gt;
    allow-transfer {&lt;br /&gt;
      2001:660:4401:60a0:216:3eff:fe70:7f1c;&lt;br /&gt;
      2001:660:4401:60a0:216:3eff:fe9a:ea1c;&lt;br /&gt;
      };&lt;br /&gt;
    also-notify { 2001:660:4401:60a0:216:3eff:fe70:7f1c; };&lt;br /&gt;
    inline-signing yes;   // DNSSEC automatique&lt;br /&gt;
    key-directory &amp;quot;/etc/bind/keys&amp;quot;; // répertoire des clefs, attention aux droits&lt;br /&gt;
    dnssec-policy &amp;quot;dnssecpolicy&amp;quot;;  // politique pour les clefs de chiffrement&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
zone &amp;quot;kasav.online&amp;quot; {&lt;br /&gt;
    type secondary;&lt;br /&gt;
    file &amp;quot;/etc/bind/backup/db.kasav.online&amp;quot;;&lt;br /&gt;
    primaries { 2001:660:4401:60a0:216:3eff:fe9a:ea1c; };&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
dnssec-policy &amp;quot;dnssecpolicy&amp;quot; {&lt;br /&gt;
  keys {&lt;br /&gt;
    ksk key-directory lifetime unlimited algorithm 13;&lt;br /&gt;
    zsk key-directory lifetime unlimited algorithm 13;&lt;br /&gt;
  };&lt;br /&gt;
  nsec3param;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/etc/bind# named-checkzone elvis21.tech /etc/bind/db.elvis21.tech&lt;br /&gt;
zone elvis21.tech/IN: loaded serial 3298267246&lt;br /&gt;
OK&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
openssl req -nodes -newkey rsa:2048 -sha256 -keyout elvis21.tech.key -out elvis21.csr&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
[[Fichier:ImageDns.png|gauche|vignette|994x994px]]&lt;br /&gt;
&lt;br /&gt;
== Mise en place du serveur Apache (http et https) ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
apt update&lt;br /&gt;
apt install apache2&lt;br /&gt;
systemctl enable --now apache2&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
[[Fichier:Elvis21.tech-DNS.png|gauche|vignette|863x863px]]&lt;br /&gt;
&lt;br /&gt;
== Installation Fail2ban ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/# apt install fail2ban &lt;br /&gt;
Installing:                     &lt;br /&gt;
  fail2ban&lt;br /&gt;
&lt;br /&gt;
root@Elf:/# systemctl status fail2ban&lt;br /&gt;
fail2ban.service - Fail2Ban Service&lt;br /&gt;
    Loaded: loaded (/usr/lib/systemd/system/fail2ban.service, disabled)&lt;br /&gt;
    Active: active (running)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/# service fail2ban status                             &lt;br /&gt;
Status of Authentication failure monitor: fail2ban is running.&lt;br /&gt;
 root@Elf:/# fail2ban-client status&lt;br /&gt;
Status&lt;br /&gt;
|- Number of jail:	1&lt;br /&gt;
`- Jail list:	sshd&lt;br /&gt;
&lt;br /&gt;
root@Elf:/# fail2ban-client status sshd&lt;br /&gt;
Status for the jail: sshd&lt;br /&gt;
|- Filter&lt;br /&gt;
|  |- Currently failed:	0&lt;br /&gt;
|  |- Total failed:	0&lt;br /&gt;
|  `- File list:	/var/log/auth.log&lt;br /&gt;
`- Actions&lt;br /&gt;
   |- Currently banned:	0&lt;br /&gt;
   |- Total banned:	0&lt;br /&gt;
   `- Banned IP list:	&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Mise en place du serveur Apache (http et https) ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/# service apache2 status&lt;br /&gt;
apache2 is running.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== WIFI ==&lt;br /&gt;
Faire ip link&lt;br /&gt;
&lt;br /&gt;
ensuite sudo airodump-ng wlanx  -- Remplacer x par le numero du wlan present &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
BSSID              PWR  Beacons    #Data, #/s  CH   MB   ENC CIPHER  AUTH ESSID&lt;br /&gt;
04:DA:D2:9C:50:54  -62       23       11    0   4   54e. WEP  WEP         cracotte05                         &lt;br /&gt;
04:DA:D2:9C:50:5A  -61        2        1    0   4   54e. WEP  WEP         cracotte11    &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;sudo airodump-ng wlan1 --bssid 04:DA:D2:9C:50:5A  -c4 --write log_airdump&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
ssh -oKexAlgorithms=+diffie-hellman-group14-sha1 -oHostKeyAlgorithms=+ssh-rsa -oCiphers=+aes128-cbc admin@172.27.0.1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
C9200-E304&amp;gt;en&lt;br /&gt;
Password: &lt;br /&gt;
C9200-E304#config t&lt;br /&gt;
Enter configuration commands, one per line.  End with CNTL/Z.&lt;br /&gt;
C9200-E304(config)#vlan 28&lt;br /&gt;
C9200-E304(config-vlan)#name PoolEvora&lt;br /&gt;
C9200-E304(config-vlan)#exit &lt;br /&gt;
C9200-E304(config)#exit&lt;br /&gt;
C9200-E304#write&lt;br /&gt;
Building configuration...&lt;br /&gt;
[OK]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
C9200-E304#en&lt;br /&gt;
C9200-E304#config t&lt;br /&gt;
Enter configuration commands, one per line.  End with CNTL/Z.&lt;br /&gt;
C9200-E304(config)#ip dhcp pool PoolEvora  &lt;br /&gt;
C9200-E304(dhcp-config)#network 10.60.11.0 255.255.255.0&lt;br /&gt;
C9200-E304(dhcp-config)#dns-server 193.48.57.172&lt;br /&gt;
C9200-E304(dhcp-config)#default-router 10.60.11.254&lt;br /&gt;
C9200-E304(dhcp-config)#exit&lt;br /&gt;
C9200-E304(config)#exit&lt;br /&gt;
C9200-E304#write&lt;br /&gt;
Building configuration...&lt;br /&gt;
[OK]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Vsouopme</name></author>
	</entry>
	<entry>
		<id>https://wiki-se.plil.fr/mediawiki/index.php?title=Atelier_SysRes_SE4_2025/2026_E11&amp;diff=12219</id>
		<title>Atelier SysRes SE4 2025/2026 E11</title>
		<link rel="alternate" type="text/html" href="https://wiki-se.plil.fr/mediawiki/index.php?title=Atelier_SysRes_SE4_2025/2026_E11&amp;diff=12219"/>
		<updated>2026-02-10T17:05:40Z</updated>

		<summary type="html">&lt;p&gt;Vsouopme : /* WIFI */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Projet Virtualisation /Administration Systeme-Réseau - Machine SE4.Elf =&lt;br /&gt;
Dans le cadre de ce projet, nnous avons déployés une infrastructure composée de '''deux machines dédiées aux services''' et d’une '''machine mandataire''', le tout à l’aide de l'environnement  '''Xen.'''&lt;br /&gt;
&lt;br /&gt;
== Création des machines virtuelles ==&lt;br /&gt;
Les machines sont créées  sur le Dom0 '''Capbreton.plil.info''' en faisant un '''ssh root@capbreton.plil.info''' &lt;br /&gt;
&lt;br /&gt;
Sur la capbreton.plil.info, &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
xen create-image --hostname=SE4.Elf --dhcp --dir=/usr/local/xen --size=10G --dist=excalibur --memory=2G --bridge=Styx --force&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; '''Xen-create-image''' :  Commande permettant de créer une nouvelle machine virtuelle Xen&lt;br /&gt;
&lt;br /&gt;
'''--hostname=SE4.Elf :''' Pour le nom de la machine &lt;br /&gt;
&lt;br /&gt;
'''--size=10G''' : La taille du disque &lt;br /&gt;
&lt;br /&gt;
'''--bridge=Styx''' : Le nom du bridge &lt;br /&gt;
&lt;br /&gt;
Par la suite il faut creer un fichier dans le répertoire &amp;lt;code&amp;gt;/etc/network/interfaces.d&amp;lt;/code&amp;gt; du Dom0 pour créer notre pont. (NB: Il faut noter que cette etape on peut la faire avant la creation de notre VM&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
auto Styx&lt;br /&gt;
&lt;br /&gt;
iface Styx inet manual&lt;br /&gt;
   bridge_ports none&lt;br /&gt;
   up ip link set $IFACE up&lt;br /&gt;
   down ip link set $IFACE down&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;La commande '''xen list :''' Affiche les '''machines virtuelles''' (VM) qui sont actuellement gérées par Xen (Elle fait la liste des VM allumée).&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
root@capbreton:~# xen list&lt;br /&gt;
SE4.batman                                 322  2048     1     -b----      37.5&lt;br /&gt;
SE4.Moon                                   326  2048     1     -b----      41.1&lt;br /&gt;
SE4.C2                                     332  1024     1     -b----      18.1&lt;br /&gt;
SE4.Tension                                343  2048     1     -b----       7.8&lt;br /&gt;
SE4.CachyOS                                365  2048     1     -b----      10.2&lt;br /&gt;
SE4.RockStar                               367  2048     1     -b----       6.1&lt;br /&gt;
SE4.Kasav                                  368  2048     1     -b----       5.9&lt;br /&gt;
SE4.Elf                                    369  2048     1     -b----       5.6&lt;br /&gt;
SE4.catwoman                               370  2048     1     -b----       6.1&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;-La commande '''xen create /etc/xen/SE4.Elf.cfg''' permet d'allumer la Machine virtuellle.&lt;br /&gt;
&lt;br /&gt;
-La commande xen '''console SE4.Elf''' permet d'acceder  / de se connecter  a la VM.&lt;br /&gt;
&lt;br /&gt;
-La commande '''xen shutdown''' '''SE4.Elf''' permet d'eteindre la machine virtuelle.&lt;br /&gt;
&lt;br /&gt;
Lors de la tentative de connexion, il y'a une un probleme , pour y remedier,  '''Ctrl + AltGr + ] =&amp;gt; vi =&amp;gt; :q! =&amp;gt; reconnexion'''&lt;br /&gt;
&lt;br /&gt;
Pour voir le mot de passe de la VM, '''cat /var/log/xen-tools/SE4.Elf.log'''&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
Installation Summary&lt;br /&gt;
---------------------&lt;br /&gt;
Hostname        :  SE4.Elf&lt;br /&gt;
Distribution    :  excalibur&lt;br /&gt;
MAC Address     :  00:16:3E:83:A3:C7&lt;br /&gt;
IP Address(es)  :  dynamic&lt;br /&gt;
SSH Fingerprint :  SHA256:IrPhxhB4m1s+eaPaLynS6NlE/HfL78+y3ba3DPuHFQU (DSA)&lt;br /&gt;
SSH Fingerprint :  SHA256:RT+MZtlFxC7BrdYORzOcxDX+SKsJrLzOGWWngX2pKz4 (ECDSA)&lt;br /&gt;
SSH Fingerprint :  SHA256:aLYvYqUPX2Q/J5P0nTpdpMyrFD5xopRqkFKuYb7QUo4 (ED25519)&lt;br /&gt;
SSH Fingerprint :  SHA256:b0ddm9FYx4/losJU8/pE9MXx7102ygkAMjChOvPlNhE (RSA)&lt;br /&gt;
Root Password   :  X&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;- La commande '''vi /etc/hostname''' pour changer le nom de la VM&lt;br /&gt;
&lt;br /&gt;
== '''Configuration de la Machine de Services''' ==&lt;br /&gt;
Il faut creer deux partitions LVM de 10G pour votre machine virtuelle et modifiez le fichier de configuration de la machine virtuelle de services pour faire en sorte que les répertoires &amp;lt;code&amp;gt;/'''var'''&amp;lt;/code&amp;gt; et &amp;lt;code&amp;gt;'''/home'''&amp;lt;/code&amp;gt; de la machine virtuelle soient implantés sur ces partitions LVM&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
SE4.Poseidon.home lv_home_SE4Elf lv_var_SE4Elf  SE4.Gaby.home SE4.Poseidon.var SE4.Gaby.var &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Serveur SSH''' ==&lt;br /&gt;
Notre machine virtuelle doit etre accessible par SSH, on autorise donc l'accès par l'utilisateur '''Root en modifiant le fichier de de configuration &amp;lt;code&amp;gt;/etc/ssh/sshd_config  :&amp;lt;/code&amp;gt;'''&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
PermitRootLogin yes&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Il faut ensuite redemarrer le serveur ssh en faisant :&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/etc/ssh# /etc/init.d/ssh restart&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Pour gérer la redirection du SSH, on doit configurer '''nftables''' sur nos machines de service en redirigeant les ports 2201 et 2202&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
nft add table ip nat&lt;br /&gt;
nft add chain ip nat PREROUTING { type nat hook prerouting priority 0 \; }&lt;br /&gt;
nft add rule ip nat PREROUTING tcp dport 2201 dnat to 192.168.50.12:22                 &lt;br /&gt;
nft add rule ip nat PREROUTING tcp dport 2202 dnat to 192.168.50.3:22              &lt;br /&gt;
nft add chain ip nat POSTROUTING { type nat hook postrouting priority 100 \; }&lt;br /&gt;
nft add rule ip nat POSTROUTING masquerade&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Maintenant, on peut se connecter en SSH sur les machiches virtuelles de services:  De Elf, on peut se connecter a Kasav&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/# ssh root@192.168.50.3&lt;br /&gt;
root@192.168.50.3's password: &lt;br /&gt;
Linux Kasav 4.19.0-26-amd64 #1 SMP Debian 4.19.304-1 (2024-01-09) x86_64&lt;br /&gt;
&lt;br /&gt;
The programs included with the Devuan GNU/Linux system are free software;&lt;br /&gt;
the exact distribution terms for each program are described in the&lt;br /&gt;
individual files in /usr/share/doc/*/copyright.&lt;br /&gt;
&lt;br /&gt;
Devuan GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent&lt;br /&gt;
permitted by applicable law.&lt;br /&gt;
Last login: Tue Feb  3 11:34:45 2026 from 192.168.50.12&lt;br /&gt;
root@Kasav:~# &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Serveur DNS''' ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
$TTL 86400&lt;br /&gt;
@ IN SOA ns1.elvis21.tech. admin.elvis21.tech. (&lt;br /&gt;
        3298267246      ;Version&lt;br /&gt;
        3600            ;Refresh&lt;br /&gt;
        1800            ;Retry&lt;br /&gt;
        604800          ;Expire&lt;br /&gt;
        86400 )         ;Minimum TTL&lt;br /&gt;
;&lt;br /&gt;
@  IN NS ns1.elvis21.tech.&lt;br /&gt;
&lt;br /&gt;
ns1 IN A 192.168.50.12&lt;br /&gt;
ns2 IN A 192.168.50.1&lt;br /&gt;
 IN A 192.168.50.12&lt;br /&gt;
      IN AAAA 2001:660:4401:60a0:216:3eff:fe83:a3c8&lt;br /&gt;
www IN A 192.168.50.12&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/etc/bind# cat named.conf.local &lt;br /&gt;
zone &amp;quot;elvis21.tech&amp;quot; {&lt;br /&gt;
    type primary;&lt;br /&gt;
    file &amp;quot;/etc/bind/zones/db.elvis21.tech&amp;quot;;&lt;br /&gt;
    allow-transfer {&lt;br /&gt;
      2001:660:4401:60a0:216:3eff:fe70:7f1c;&lt;br /&gt;
      2001:660:4401:60a0:216:3eff:fe9a:ea1c;&lt;br /&gt;
      };&lt;br /&gt;
    also-notify { 2001:660:4401:60a0:216:3eff:fe70:7f1c; };&lt;br /&gt;
    inline-signing yes;   // DNSSEC automatique&lt;br /&gt;
    key-directory &amp;quot;/etc/bind/keys&amp;quot;; // répertoire des clefs, attention aux droits&lt;br /&gt;
    dnssec-policy &amp;quot;dnssecpolicy&amp;quot;;  // politique pour les clefs de chiffrement&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
zone &amp;quot;kasav.online&amp;quot; {&lt;br /&gt;
    type secondary;&lt;br /&gt;
    file &amp;quot;/etc/bind/backup/db.kasav.online&amp;quot;;&lt;br /&gt;
    primaries { 2001:660:4401:60a0:216:3eff:fe9a:ea1c; };&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
dnssec-policy &amp;quot;dnssecpolicy&amp;quot; {&lt;br /&gt;
  keys {&lt;br /&gt;
    ksk key-directory lifetime unlimited algorithm 13;&lt;br /&gt;
    zsk key-directory lifetime unlimited algorithm 13;&lt;br /&gt;
  };&lt;br /&gt;
  nsec3param;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/etc/bind# named-checkzone elvis21.tech /etc/bind/db.elvis21.tech&lt;br /&gt;
zone elvis21.tech/IN: loaded serial 3298267246&lt;br /&gt;
OK&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
openssl req -nodes -newkey rsa:2048 -sha256 -keyout elvis21.tech.key -out elvis21.csr&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
[[Fichier:ImageDns.png|gauche|vignette|994x994px]]&lt;br /&gt;
&lt;br /&gt;
== Mise en place du serveur Apache (http et https) ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
apt update&lt;br /&gt;
apt install apache2&lt;br /&gt;
systemctl enable --now apache2&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
[[Fichier:Elvis21.tech-DNS.png|gauche|vignette|863x863px]]&lt;br /&gt;
&lt;br /&gt;
== Installation Fail2ban ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/# apt install fail2ban &lt;br /&gt;
Installing:                     &lt;br /&gt;
  fail2ban&lt;br /&gt;
&lt;br /&gt;
root@Elf:/# systemctl status fail2ban&lt;br /&gt;
fail2ban.service - Fail2Ban Service&lt;br /&gt;
    Loaded: loaded (/usr/lib/systemd/system/fail2ban.service, disabled)&lt;br /&gt;
    Active: active (running)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/# service fail2ban status                             &lt;br /&gt;
Status of Authentication failure monitor: fail2ban is running.&lt;br /&gt;
 root@Elf:/# fail2ban-client status&lt;br /&gt;
Status&lt;br /&gt;
|- Number of jail:	1&lt;br /&gt;
`- Jail list:	sshd&lt;br /&gt;
&lt;br /&gt;
root@Elf:/# fail2ban-client status sshd&lt;br /&gt;
Status for the jail: sshd&lt;br /&gt;
|- Filter&lt;br /&gt;
|  |- Currently failed:	0&lt;br /&gt;
|  |- Total failed:	0&lt;br /&gt;
|  `- File list:	/var/log/auth.log&lt;br /&gt;
`- Actions&lt;br /&gt;
   |- Currently banned:	0&lt;br /&gt;
   |- Total banned:	0&lt;br /&gt;
   `- Banned IP list:	&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Mise en place du serveur Apache (http et https) ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/# service apache2 status&lt;br /&gt;
apache2 is running.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== WIFI ==&lt;br /&gt;
Faire ip link&lt;br /&gt;
&lt;br /&gt;
ensuite sudo airodump-ng wlanx  -- Remplacer x par le numero du wlan present &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
BSSID              PWR  Beacons    #Data, #/s  CH   MB   ENC CIPHER  AUTH ESSID&lt;br /&gt;
04:DA:D2:9C:50:54  -62       23       11    0   4   54e. WEP  WEP         cracotte05                         &lt;br /&gt;
04:DA:D2:9C:50:5A  -61        2        1    0   4   54e. WEP  WEP         cracotte11    &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;sudo airodump-ng wlan1 --bssid 04:DA:D2:9C:50:5A  -c4 --write log_airdump&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
ssh -oKexAlgorithms=+diffie-hellman-group14-sha1 -oHostKeyAlgorithms=+ssh-rsa -oCiphers=+aes128-cbc admin@172.27.0.1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
C9200-E304&amp;gt;en&lt;br /&gt;
Password: &lt;br /&gt;
C9200-E304#config t&lt;br /&gt;
Enter configuration commands, one per line.  End with CNTL/Z.&lt;br /&gt;
C9200-E304(config)#vlan 28&lt;br /&gt;
C9200-E304(config-vlan)#name PoolEvora&lt;br /&gt;
C9200-E304(config-vlan)#exit &lt;br /&gt;
C9200-E304(config)#exit&lt;br /&gt;
C9200-E304#write&lt;br /&gt;
Building configuration...&lt;br /&gt;
[OK]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Vsouopme</name></author>
	</entry>
	<entry>
		<id>https://wiki-se.plil.fr/mediawiki/index.php?title=SE4_IdO_s%C3%A9curit%C3%A9_syst%C3%A8me/r%C3%A9seau_2025/2026&amp;diff=12217</id>
		<title>SE4 IdO sécurité système/réseau 2025/2026</title>
		<link rel="alternate" type="text/html" href="https://wiki-se.plil.fr/mediawiki/index.php?title=SE4_IdO_s%C3%A9curit%C3%A9_syst%C3%A8me/r%C3%A9seau_2025/2026&amp;diff=12217"/>
		<updated>2026-02-10T16:59:36Z</updated>

		<summary type="html">&lt;p&gt;Vsouopme : /* Plan d'adressage */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Répartition des binômes pour les travaux pratiques &amp;quot;administration système et réseau&amp;quot; =&lt;br /&gt;
&lt;br /&gt;
Préfixe des noms de machine : &amp;lt;code&amp;gt;SE4&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Domaines Internet à louer sur [[gandi.net]]. Identifiant &amp;lt;code&amp;gt;pifou&amp;lt;/code&amp;gt;. Regardez le montant prévu sur le compte avant de louer un domaine.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Cahier !! Elève !! Nom de domaine&lt;br /&gt;
! Nom de machine de services !! Nom de machine mandataire&lt;br /&gt;
|-&lt;br /&gt;
| [[Atelier SysRes SE4 2025/2026 E1 | Cahier n°1]] || Pierre CASIMIRI || merteuil.tech || SE4.Merteuil||SE4.Rosemonde&lt;br /&gt;
|-&lt;br /&gt;
| [[Atelier SysRes SE4 2025/2026 E2 | Cahier n°2]] || Agathe HOUDUSSE || valmont.tech || SE4.Valmont||SE4.Rosemonde&lt;br /&gt;
|-&lt;br /&gt;
| [[Atelier SysRes SE4 2025/2026 E3 | Cahier n°3]] || Lilia GHAZALI || kirchhoff.live|| SE4.Tension||SE4.Kirchhoff&lt;br /&gt;
|-&lt;br /&gt;
| [[Atelier SysRes SE4 2025/2026 E4 | Cahier n°4]] || Marin GOURVEST || courant.online|| SE4.Courant||SE4.Kirchhoff&lt;br /&gt;
|-&lt;br /&gt;
| [[Atelier SysRes SE4 2025/2026 E5 | Cahier n°5]] || Cédric PAYET || archlinuxbtw.lol|| SE4.CachyOS||SE4.LinusTorvalds&lt;br /&gt;
|-&lt;br /&gt;
| [[Atelier SysRes SE4 2025/2026 E6 | Cahier n°6]] || Thomas DELOBELLE || archlinux.lol|| SE4.Manjaro||SE4.LinusTorvalds&lt;br /&gt;
|-&lt;br /&gt;
| [[Atelier SysRes SE4 2025/2026 E7 | Cahier n°7]] || Ibrahim TEPELI || c2vts.fr|| SE4.C2||SE4.Garage&lt;br /&gt;
|-&lt;br /&gt;
| [[Atelier SysRes SE4 2025/2026 E8 | Cahier n°8]] || Yassine YAHIANI || rs7.online|| SE4.RS7||SE4.Garage&lt;br /&gt;
|-&lt;br /&gt;
| [[Atelier SysRes SE4 2025/2026 E9 | Cahier n°9]] || Aurèle VANGHELUWE || tompere.online|| SE4-Tompere1||SE4-Tompere0&lt;br /&gt;
|-&lt;br /&gt;
| [[Atelier SysRes SE4 2025/2026 E10 | Cahier n°10]] || Tom MERIEN || tompere2.xyz|| SE4-Tompere2||SE4-Tompere0&lt;br /&gt;
|-&lt;br /&gt;
| [[Atelier SysRes SE4 2025/2026 E11 | Cahier n°11]] || Varesse Evora Souop Metse || elvis21.shop|| SE4.Elf||SE4.RockStar&lt;br /&gt;
|-&lt;br /&gt;
| [[Atelier SysRes SE4 2025/2026 E12 | Cahier n°12]] || Mario Sylainx S. GAUTHIER || kasav.online|| SE4.Kasav||SE4.RockStar&lt;br /&gt;
|-&lt;br /&gt;
| [[Atelier SysRes SE4 2025/2026 E13 | Cahier n°13]] || Billel Cheklat || deadpool.tech|| SE4.catwoman||SE4.superman&lt;br /&gt;
|-&lt;br /&gt;
| [[Atelier SysRes SE4 2025/2026 E14 | Cahier n°14]] || Antonin Biernacki || deadpool.tech|| SE4.batman||SE4.superman&lt;br /&gt;
|-&lt;br /&gt;
| [[Atelier SysRes SE4 2025/2026 E15 | Cahier n°15]] || Mohamed Salhi || msalhi.online|| SE4.Moon||SE4.Solstice&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Nom machine mandataire !! IPv4 publique machine mandataire !! Elèves &lt;br /&gt;
|-&lt;br /&gt;
| SE4.Rosemonde|| 193.48.57.165|| Pierre CASIMIRI &amp;amp; Agathe HOUDUSSE&lt;br /&gt;
|-&lt;br /&gt;
| SE4.Kirchhoff|| 193.48.57.171|| Lilia GHAZALI &amp;amp; Marin GOURVEST&lt;br /&gt;
|-&lt;br /&gt;
| SE4.LinusTorvalds|| 193.48.57.166|| Cédric PAYET &amp;amp; Thomas DELOBELLE&lt;br /&gt;
|-&lt;br /&gt;
| SE4.Garage|| 193.48.57.170|| Ibrahim TEPELI &amp;amp; Yassine YAHIANI &lt;br /&gt;
|-&lt;br /&gt;
| SE4-Tompere0|| 193.48.57.168|| Aurèle VANGHELUWE &amp;amp; Tom MERIEN&lt;br /&gt;
|-&lt;br /&gt;
| SE4.superman|| 193.48.57.169|| Billel Cheklat &amp;amp; Antonin Biernacki&lt;br /&gt;
|-&lt;br /&gt;
| SE4.RockStar|| 193.48.57.172|| Varesse Evora Souop Metse &amp;amp; GAUTHIER Mario Sylainx S.&lt;br /&gt;
|-&lt;br /&gt;
| SE4.Solstice|| &amp;lt;code&amp;gt;193.48.57.167&amp;lt;/code&amp;gt;|| Mohamed Salhi &lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Tableau des commutateurs virtuels =&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Noms des élèves !! Nom du fichier de configuration !! Réseau IPv4 utilisé &lt;br /&gt;
|-&lt;br /&gt;
| CASIMIRI / HOUDUSSE || pont_gercourt || 192.168.3.0/24&lt;br /&gt;
|-&lt;br /&gt;
|PAYET / DELOBELLE&lt;br /&gt;
|pont_pacman&lt;br /&gt;
|192.168.10.0/24&lt;br /&gt;
|-&lt;br /&gt;
|MERIEN / VANGHELUWE&lt;br /&gt;
|pont_pere&lt;br /&gt;
|192.168.0.0/24&lt;br /&gt;
|-&lt;br /&gt;
|CHEKLAT / BIERNACKI&lt;br /&gt;
|pont_ironman&lt;br /&gt;
|192.168.69.0/24&lt;br /&gt;
|-&lt;br /&gt;
|SALHI&lt;br /&gt;
|pont_msalhi&lt;br /&gt;
|192.168.20.0/24&lt;br /&gt;
|-&lt;br /&gt;
|GOURVEST/GHAZALI&lt;br /&gt;
|pont_diviseur&lt;br /&gt;
|192.168.67.0/24&lt;br /&gt;
|-&lt;br /&gt;
|YAHIANI / TEPELI&lt;br /&gt;
|pontclio&lt;br /&gt;
|192.168.7.0/24&lt;br /&gt;
|-&lt;br /&gt;
|GAUTHIER / SOUOP METSE&lt;br /&gt;
|pont_rock&lt;br /&gt;
|192.168.50.0/24&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Tableau des réseaux virtuels =&lt;br /&gt;
&lt;br /&gt;
VLAN privés :&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Nom !! Numéro &lt;br /&gt;
|-&lt;br /&gt;
| VLAN1 || 1&lt;br /&gt;
|-&lt;br /&gt;
| MV-PROMO || 2 &lt;br /&gt;
|-&lt;br /&gt;
|E1-Pierre&lt;br /&gt;
|11&lt;br /&gt;
|-&lt;br /&gt;
|E2-Agathe&lt;br /&gt;
|12&lt;br /&gt;
|-&lt;br /&gt;
|E5-Cedric&lt;br /&gt;
|15&lt;br /&gt;
|-&lt;br /&gt;
|E6-Thomas&lt;br /&gt;
|16&lt;br /&gt;
|-&lt;br /&gt;
|E9-Aurele&lt;br /&gt;
|19&lt;br /&gt;
|-&lt;br /&gt;
|E10-Tom&lt;br /&gt;
|20&lt;br /&gt;
|-&lt;br /&gt;
|E13-Billel&lt;br /&gt;
|23&lt;br /&gt;
|-&lt;br /&gt;
|E14-Antonin&lt;br /&gt;
|24&lt;br /&gt;
|-&lt;br /&gt;
|E15-MSalhi&lt;br /&gt;
|25&lt;br /&gt;
|-&lt;br /&gt;
|E11-Evora&lt;br /&gt;
|28&lt;br /&gt;
|-&lt;br /&gt;
|E12-Gauthier&lt;br /&gt;
|21&lt;br /&gt;
|-&lt;br /&gt;
|E8-Yassine&lt;br /&gt;
|18&lt;br /&gt;
|-&lt;br /&gt;
|E7-Ibrahim&lt;br /&gt;
|17&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
VLAN communs avec l'école :&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Nom !! Numéro &lt;br /&gt;
|-&lt;br /&gt;
| INTERCO1 || 530 &lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Schéma de câblage =&lt;br /&gt;
&lt;br /&gt;
Vous avez des éléments réseaux et des panneaux de brassage fibres dans les locaux techniques SR31 et SR52 ainsi que dans les salles E304 et E306.&lt;br /&gt;
&lt;br /&gt;
Le plan doit donc comporter, pour chaque connexion, les locaux d'origine et de destination ainsi que l'identifiant des ports d'origine et de destination.&lt;br /&gt;
&lt;br /&gt;
= Plan d'adressage =&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Nom VLAN !! Réseau IPv4 !! Réseau IPv6 &lt;br /&gt;
|-&lt;br /&gt;
| MV-PROMO || &amp;lt;code&amp;gt;193.48.57.160/27&amp;lt;/code&amp;gt; || &amp;lt;/code&amp;gt;2001:660:4401:60a0::/64&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| PoolPierre || &amp;lt;code&amp;gt;10.60.1.0/24&amp;lt;/code&amp;gt; || &amp;lt;/code&amp;gt;2001:660:4401:60a1::/64&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| PoolAgathe || &amp;lt;code&amp;gt;10.60.2.0/24&amp;lt;/code&amp;gt; || &amp;lt;/code&amp;gt;2001:660:4401:60a2::/64&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|PoolCedric&lt;br /&gt;
|&amp;lt;code&amp;gt;10.60.5.0/24&amp;lt;/code&amp;gt;&lt;br /&gt;
|2001:660:4401:60a5::/64&lt;br /&gt;
|-&lt;br /&gt;
|PoolThomas&lt;br /&gt;
|&amp;lt;code&amp;gt;10.60.6.0/24&amp;lt;/code&amp;gt;&lt;br /&gt;
|2001:660:4401:60a6::/64&lt;br /&gt;
|-&lt;br /&gt;
|PoolBillel&lt;br /&gt;
|&amp;lt;code&amp;gt;10.60.13.0/24&amp;lt;/code&amp;gt;&lt;br /&gt;
|2001:660:4401:60ad::/64&lt;br /&gt;
|-&lt;br /&gt;
|PoolAurele&lt;br /&gt;
|&amp;lt;code&amp;gt;10.60.9.0/24&amp;lt;/code&amp;gt;&lt;br /&gt;
|2001:660:4401:60a9::/64&lt;br /&gt;
|-&lt;br /&gt;
|PoolTom&lt;br /&gt;
|&amp;lt;code&amp;gt;10.60.10.0/24&amp;lt;/code&amp;gt;&lt;br /&gt;
|2001:660:4401:60aa::/64&lt;br /&gt;
|-&lt;br /&gt;
|PoolSalhi&lt;br /&gt;
|&amp;lt;code&amp;gt;10.60.15.0/24&amp;lt;/code&amp;gt;&lt;br /&gt;
|2001:660:4401:60b1::/64&lt;br /&gt;
|-&lt;br /&gt;
|PoolAntonin&lt;br /&gt;
|&amp;lt;code&amp;gt;10.60.14.0/24&amp;lt;/code&amp;gt;&lt;br /&gt;
|2001:660:4401:60ae::/64&lt;br /&gt;
|-&lt;br /&gt;
|PoolYassine&lt;br /&gt;
|10.60.8.0/24&lt;br /&gt;
|2001:660:4401:60a8::/64&lt;br /&gt;
|-&lt;br /&gt;
|PoolEvora&lt;br /&gt;
|10.60.11.0/24&lt;br /&gt;
|2001:660:4401:60ab::/64&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Adresses IPv4 des éléments réseau dans VLAN1&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Elément !! Adresse &lt;br /&gt;
|-&lt;br /&gt;
| Routeur C9200-E304 || 172.27.0.1/16&lt;br /&gt;
|-&lt;br /&gt;
| Routeur C9200-E306 || 172.27.0.2/16&lt;br /&gt;
|-&lt;br /&gt;
| Borne Wi-Fi E306 || 172.27.0.3/16&lt;br /&gt;
|-&lt;br /&gt;
| Borne Wi-Fi E304 || 172.27.0.4/16&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Informations VRRP =&lt;br /&gt;
&lt;br /&gt;
Pour chaque VLAN et pour chaque instance VRRP dans le VLAN listez les adresses IPv4 propres ainsi que l'unique IPv4 virtuelle.&lt;br /&gt;
&lt;br /&gt;
== VLAN des machines virtuelles ==&lt;br /&gt;
&lt;br /&gt;
Une seule instance VRRP dans le VLAN des machines virtuelles.&lt;br /&gt;
&lt;br /&gt;
Adresse IPv4 virtuelle : &amp;lt;code&amp;gt;193.48.57.162&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Routeur !! IPv4 propre &lt;br /&gt;
|-&lt;br /&gt;
| C9200 E304 || &amp;lt;code&amp;gt;193.48.57.163&amp;lt;/code&amp;gt;&lt;br /&gt;
|- &lt;br /&gt;
| C9200 E306 || &amp;lt;code&amp;gt;193.48.57.164&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== VLAN ... ==&lt;/div&gt;</summary>
		<author><name>Vsouopme</name></author>
	</entry>
	<entry>
		<id>https://wiki-se.plil.fr/mediawiki/index.php?title=Atelier_SysRes_SE4_2025/2026_E11&amp;diff=12213</id>
		<title>Atelier SysRes SE4 2025/2026 E11</title>
		<link rel="alternate" type="text/html" href="https://wiki-se.plil.fr/mediawiki/index.php?title=Atelier_SysRes_SE4_2025/2026_E11&amp;diff=12213"/>
		<updated>2026-02-10T16:49:20Z</updated>

		<summary type="html">&lt;p&gt;Vsouopme : /* WIFI */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Projet Virtualisation /Administration Systeme-Réseau - Machine SE4.Elf =&lt;br /&gt;
Dans le cadre de ce projet, nnous avons déployés une infrastructure composée de '''deux machines dédiées aux services''' et d’une '''machine mandataire''', le tout à l’aide de l'environnement  '''Xen.'''&lt;br /&gt;
&lt;br /&gt;
== Création des machines virtuelles ==&lt;br /&gt;
Les machines sont créées  sur le Dom0 '''Capbreton.plil.info''' en faisant un '''ssh root@capbreton.plil.info''' &lt;br /&gt;
&lt;br /&gt;
Sur la capbreton.plil.info, &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
xen create-image --hostname=SE4.Elf --dhcp --dir=/usr/local/xen --size=10G --dist=excalibur --memory=2G --bridge=Styx --force&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; '''Xen-create-image''' :  Commande permettant de créer une nouvelle machine virtuelle Xen&lt;br /&gt;
&lt;br /&gt;
'''--hostname=SE4.Elf :''' Pour le nom de la machine &lt;br /&gt;
&lt;br /&gt;
'''--size=10G''' : La taille du disque &lt;br /&gt;
&lt;br /&gt;
'''--bridge=Styx''' : Le nom du bridge &lt;br /&gt;
&lt;br /&gt;
Par la suite il faut creer un fichier dans le répertoire &amp;lt;code&amp;gt;/etc/network/interfaces.d&amp;lt;/code&amp;gt; du Dom0 pour créer notre pont. (NB: Il faut noter que cette etape on peut la faire avant la creation de notre VM&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
auto Styx&lt;br /&gt;
&lt;br /&gt;
iface Styx inet manual&lt;br /&gt;
   bridge_ports none&lt;br /&gt;
   up ip link set $IFACE up&lt;br /&gt;
   down ip link set $IFACE down&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;La commande '''xen list :''' Affiche les '''machines virtuelles''' (VM) qui sont actuellement gérées par Xen (Elle fait la liste des VM allumée).&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
root@capbreton:~# xen list&lt;br /&gt;
SE4.batman                                 322  2048     1     -b----      37.5&lt;br /&gt;
SE4.Moon                                   326  2048     1     -b----      41.1&lt;br /&gt;
SE4.C2                                     332  1024     1     -b----      18.1&lt;br /&gt;
SE4.Tension                                343  2048     1     -b----       7.8&lt;br /&gt;
SE4.CachyOS                                365  2048     1     -b----      10.2&lt;br /&gt;
SE4.RockStar                               367  2048     1     -b----       6.1&lt;br /&gt;
SE4.Kasav                                  368  2048     1     -b----       5.9&lt;br /&gt;
SE4.Elf                                    369  2048     1     -b----       5.6&lt;br /&gt;
SE4.catwoman                               370  2048     1     -b----       6.1&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;-La commande '''xen create /etc/xen/SE4.Elf.cfg''' permet d'allumer la Machine virtuellle.&lt;br /&gt;
&lt;br /&gt;
-La commande xen '''console SE4.Elf''' permet d'acceder  / de se connecter  a la VM.&lt;br /&gt;
&lt;br /&gt;
-La commande '''xen shutdown''' '''SE4.Elf''' permet d'eteindre la machine virtuelle.&lt;br /&gt;
&lt;br /&gt;
Lors de la tentative de connexion, il y'a une un probleme , pour y remedier,  '''Ctrl + AltGr + ] =&amp;gt; vi =&amp;gt; :q! =&amp;gt; reconnexion'''&lt;br /&gt;
&lt;br /&gt;
Pour voir le mot de passe de la VM, '''cat /var/log/xen-tools/SE4.Elf.log'''&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
Installation Summary&lt;br /&gt;
---------------------&lt;br /&gt;
Hostname        :  SE4.Elf&lt;br /&gt;
Distribution    :  excalibur&lt;br /&gt;
MAC Address     :  00:16:3E:83:A3:C7&lt;br /&gt;
IP Address(es)  :  dynamic&lt;br /&gt;
SSH Fingerprint :  SHA256:IrPhxhB4m1s+eaPaLynS6NlE/HfL78+y3ba3DPuHFQU (DSA)&lt;br /&gt;
SSH Fingerprint :  SHA256:RT+MZtlFxC7BrdYORzOcxDX+SKsJrLzOGWWngX2pKz4 (ECDSA)&lt;br /&gt;
SSH Fingerprint :  SHA256:aLYvYqUPX2Q/J5P0nTpdpMyrFD5xopRqkFKuYb7QUo4 (ED25519)&lt;br /&gt;
SSH Fingerprint :  SHA256:b0ddm9FYx4/losJU8/pE9MXx7102ygkAMjChOvPlNhE (RSA)&lt;br /&gt;
Root Password   :  X&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;- La commande '''vi /etc/hostname''' pour changer le nom de la VM&lt;br /&gt;
&lt;br /&gt;
== '''Configuration de la Machine de Services''' ==&lt;br /&gt;
Il faut creer deux partitions LVM de 10G pour votre machine virtuelle et modifiez le fichier de configuration de la machine virtuelle de services pour faire en sorte que les répertoires &amp;lt;code&amp;gt;/'''var'''&amp;lt;/code&amp;gt; et &amp;lt;code&amp;gt;'''/home'''&amp;lt;/code&amp;gt; de la machine virtuelle soient implantés sur ces partitions LVM&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
SE4.Poseidon.home lv_home_SE4Elf lv_var_SE4Elf  SE4.Gaby.home SE4.Poseidon.var SE4.Gaby.var &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Serveur SSH''' ==&lt;br /&gt;
Notre machine virtuelle doit etre accessible par SSH, on autorise donc l'accès par l'utilisateur '''Root en modifiant le fichier de de configuration &amp;lt;code&amp;gt;/etc/ssh/sshd_config  :&amp;lt;/code&amp;gt;'''&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
PermitRootLogin yes&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Il faut ensuite redemarrer le serveur ssh en faisant :&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/etc/ssh# /etc/init.d/ssh restart&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Pour gérer la redirection du SSH, on doit configurer '''nftables''' sur nos machines de service en redirigeant les ports 2201 et 2202&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
nft add table ip nat&lt;br /&gt;
nft add chain ip nat PREROUTING { type nat hook prerouting priority 0 \; }&lt;br /&gt;
nft add rule ip nat PREROUTING tcp dport 2201 dnat to 192.168.50.12:22                 &lt;br /&gt;
nft add rule ip nat PREROUTING tcp dport 2202 dnat to 192.168.50.3:22              &lt;br /&gt;
nft add chain ip nat POSTROUTING { type nat hook postrouting priority 100 \; }&lt;br /&gt;
nft add rule ip nat POSTROUTING masquerade&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Maintenant, on peut se connecter en SSH sur les machiches virtuelles de services:  De Elf, on peut se connecter a Kasav&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/# ssh root@192.168.50.3&lt;br /&gt;
root@192.168.50.3's password: &lt;br /&gt;
Linux Kasav 4.19.0-26-amd64 #1 SMP Debian 4.19.304-1 (2024-01-09) x86_64&lt;br /&gt;
&lt;br /&gt;
The programs included with the Devuan GNU/Linux system are free software;&lt;br /&gt;
the exact distribution terms for each program are described in the&lt;br /&gt;
individual files in /usr/share/doc/*/copyright.&lt;br /&gt;
&lt;br /&gt;
Devuan GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent&lt;br /&gt;
permitted by applicable law.&lt;br /&gt;
Last login: Tue Feb  3 11:34:45 2026 from 192.168.50.12&lt;br /&gt;
root@Kasav:~# &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Serveur DNS''' ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
$TTL 86400&lt;br /&gt;
@ IN SOA ns1.elvis21.tech. admin.elvis21.tech. (&lt;br /&gt;
        3298267246      ;Version&lt;br /&gt;
        3600            ;Refresh&lt;br /&gt;
        1800            ;Retry&lt;br /&gt;
        604800          ;Expire&lt;br /&gt;
        86400 )         ;Minimum TTL&lt;br /&gt;
;&lt;br /&gt;
@  IN NS ns1.elvis21.tech.&lt;br /&gt;
&lt;br /&gt;
ns1 IN A 192.168.50.12&lt;br /&gt;
ns2 IN A 192.168.50.1&lt;br /&gt;
 IN A 192.168.50.12&lt;br /&gt;
      IN AAAA 2001:660:4401:60a0:216:3eff:fe83:a3c8&lt;br /&gt;
www IN A 192.168.50.12&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/etc/bind# cat named.conf.local &lt;br /&gt;
zone &amp;quot;elvis21.tech&amp;quot; {&lt;br /&gt;
    type primary;&lt;br /&gt;
    file &amp;quot;/etc/bind/zones/db.elvis21.tech&amp;quot;;&lt;br /&gt;
    allow-transfer {&lt;br /&gt;
      2001:660:4401:60a0:216:3eff:fe70:7f1c;&lt;br /&gt;
      2001:660:4401:60a0:216:3eff:fe9a:ea1c;&lt;br /&gt;
      };&lt;br /&gt;
    also-notify { 2001:660:4401:60a0:216:3eff:fe70:7f1c; };&lt;br /&gt;
    inline-signing yes;   // DNSSEC automatique&lt;br /&gt;
    key-directory &amp;quot;/etc/bind/keys&amp;quot;; // répertoire des clefs, attention aux droits&lt;br /&gt;
    dnssec-policy &amp;quot;dnssecpolicy&amp;quot;;  // politique pour les clefs de chiffrement&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
zone &amp;quot;kasav.online&amp;quot; {&lt;br /&gt;
    type secondary;&lt;br /&gt;
    file &amp;quot;/etc/bind/backup/db.kasav.online&amp;quot;;&lt;br /&gt;
    primaries { 2001:660:4401:60a0:216:3eff:fe9a:ea1c; };&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
dnssec-policy &amp;quot;dnssecpolicy&amp;quot; {&lt;br /&gt;
  keys {&lt;br /&gt;
    ksk key-directory lifetime unlimited algorithm 13;&lt;br /&gt;
    zsk key-directory lifetime unlimited algorithm 13;&lt;br /&gt;
  };&lt;br /&gt;
  nsec3param;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/etc/bind# named-checkzone elvis21.tech /etc/bind/db.elvis21.tech&lt;br /&gt;
zone elvis21.tech/IN: loaded serial 3298267246&lt;br /&gt;
OK&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
openssl req -nodes -newkey rsa:2048 -sha256 -keyout elvis21.tech.key -out elvis21.csr&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
[[Fichier:ImageDns.png|gauche|vignette|994x994px]]&lt;br /&gt;
&lt;br /&gt;
== Mise en place du serveur Apache (http et https) ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
apt update&lt;br /&gt;
apt install apache2&lt;br /&gt;
systemctl enable --now apache2&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
[[Fichier:Elvis21.tech-DNS.png|gauche|vignette|863x863px]]&lt;br /&gt;
&lt;br /&gt;
== Installation Fail2ban ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/# apt install fail2ban &lt;br /&gt;
Installing:                     &lt;br /&gt;
  fail2ban&lt;br /&gt;
&lt;br /&gt;
root@Elf:/# systemctl status fail2ban&lt;br /&gt;
fail2ban.service - Fail2Ban Service&lt;br /&gt;
    Loaded: loaded (/usr/lib/systemd/system/fail2ban.service, disabled)&lt;br /&gt;
    Active: active (running)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/# service fail2ban status                             &lt;br /&gt;
Status of Authentication failure monitor: fail2ban is running.&lt;br /&gt;
 root@Elf:/# fail2ban-client status&lt;br /&gt;
Status&lt;br /&gt;
|- Number of jail:	1&lt;br /&gt;
`- Jail list:	sshd&lt;br /&gt;
&lt;br /&gt;
root@Elf:/# fail2ban-client status sshd&lt;br /&gt;
Status for the jail: sshd&lt;br /&gt;
|- Filter&lt;br /&gt;
|  |- Currently failed:	0&lt;br /&gt;
|  |- Total failed:	0&lt;br /&gt;
|  `- File list:	/var/log/auth.log&lt;br /&gt;
`- Actions&lt;br /&gt;
   |- Currently banned:	0&lt;br /&gt;
   |- Total banned:	0&lt;br /&gt;
   `- Banned IP list:	&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Mise en place du serveur Apache (http et https) ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/# service apache2 status&lt;br /&gt;
apache2 is running.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== WIFI ==&lt;br /&gt;
Faire ip link&lt;br /&gt;
&lt;br /&gt;
ensuite sudo airodump-ng wlanx  -- Remplacer x par le numero du wlan present &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
BSSID              PWR  Beacons    #Data, #/s  CH   MB   ENC CIPHER  AUTH ESSID&lt;br /&gt;
04:DA:D2:9C:50:54  -62       23       11    0   4   54e. WEP  WEP         cracotte05                         &lt;br /&gt;
04:DA:D2:9C:50:5A  -61        2        1    0   4   54e. WEP  WEP         cracotte11    &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;sudo airodump-ng wlan1 --bssid 04:DA:D2:9C:50:5A  -c4 --write log_airdump&lt;/div&gt;</summary>
		<author><name>Vsouopme</name></author>
	</entry>
	<entry>
		<id>https://wiki-se.plil.fr/mediawiki/index.php?title=Atelier_SysRes_SE4_2025/2026_E11&amp;diff=12193</id>
		<title>Atelier SysRes SE4 2025/2026 E11</title>
		<link rel="alternate" type="text/html" href="https://wiki-se.plil.fr/mediawiki/index.php?title=Atelier_SysRes_SE4_2025/2026_E11&amp;diff=12193"/>
		<updated>2026-02-10T16:16:36Z</updated>

		<summary type="html">&lt;p&gt;Vsouopme : /* Mise en place du serveur Apache (http et https) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Projet Virtualisation /Administration Systeme-Réseau - Machine SE4.Elf =&lt;br /&gt;
Dans le cadre de ce projet, nnous avons déployés une infrastructure composée de '''deux machines dédiées aux services''' et d’une '''machine mandataire''', le tout à l’aide de l'environnement  '''Xen.'''&lt;br /&gt;
&lt;br /&gt;
== Création des machines virtuelles ==&lt;br /&gt;
Les machines sont créées  sur le Dom0 '''Capbreton.plil.info''' en faisant un '''ssh root@capbreton.plil.info''' &lt;br /&gt;
&lt;br /&gt;
Sur la capbreton.plil.info, &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
xen create-image --hostname=SE4.Elf --dhcp --dir=/usr/local/xen --size=10G --dist=excalibur --memory=2G --bridge=Styx --force&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; '''Xen-create-image''' :  Commande permettant de créer une nouvelle machine virtuelle Xen&lt;br /&gt;
&lt;br /&gt;
'''--hostname=SE4.Elf :''' Pour le nom de la machine &lt;br /&gt;
&lt;br /&gt;
'''--size=10G''' : La taille du disque &lt;br /&gt;
&lt;br /&gt;
'''--bridge=Styx''' : Le nom du bridge &lt;br /&gt;
&lt;br /&gt;
Par la suite il faut creer un fichier dans le répertoire &amp;lt;code&amp;gt;/etc/network/interfaces.d&amp;lt;/code&amp;gt; du Dom0 pour créer notre pont. (NB: Il faut noter que cette etape on peut la faire avant la creation de notre VM&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
auto Styx&lt;br /&gt;
&lt;br /&gt;
iface Styx inet manual&lt;br /&gt;
   bridge_ports none&lt;br /&gt;
   up ip link set $IFACE up&lt;br /&gt;
   down ip link set $IFACE down&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;La commande '''xen list :''' Affiche les '''machines virtuelles''' (VM) qui sont actuellement gérées par Xen (Elle fait la liste des VM allumée).&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
root@capbreton:~# xen list&lt;br /&gt;
SE4.batman                                 322  2048     1     -b----      37.5&lt;br /&gt;
SE4.Moon                                   326  2048     1     -b----      41.1&lt;br /&gt;
SE4.C2                                     332  1024     1     -b----      18.1&lt;br /&gt;
SE4.Tension                                343  2048     1     -b----       7.8&lt;br /&gt;
SE4.CachyOS                                365  2048     1     -b----      10.2&lt;br /&gt;
SE4.RockStar                               367  2048     1     -b----       6.1&lt;br /&gt;
SE4.Kasav                                  368  2048     1     -b----       5.9&lt;br /&gt;
SE4.Elf                                    369  2048     1     -b----       5.6&lt;br /&gt;
SE4.catwoman                               370  2048     1     -b----       6.1&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;-La commande '''xen create /etc/xen/SE4.Elf.cfg''' permet d'allumer la Machine virtuellle.&lt;br /&gt;
&lt;br /&gt;
-La commande xen '''console SE4.Elf''' permet d'acceder  / de se connecter  a la VM.&lt;br /&gt;
&lt;br /&gt;
-La commande '''xen shutdown''' '''SE4.Elf''' permet d'eteindre la machine virtuelle.&lt;br /&gt;
&lt;br /&gt;
Lors de la tentative de connexion, il y'a une un probleme , pour y remedier,  '''Ctrl + AltGr + ] =&amp;gt; vi =&amp;gt; :q! =&amp;gt; reconnexion'''&lt;br /&gt;
&lt;br /&gt;
Pour voir le mot de passe de la VM, '''cat /var/log/xen-tools/SE4.Elf.log'''&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
Installation Summary&lt;br /&gt;
---------------------&lt;br /&gt;
Hostname        :  SE4.Elf&lt;br /&gt;
Distribution    :  excalibur&lt;br /&gt;
MAC Address     :  00:16:3E:83:A3:C7&lt;br /&gt;
IP Address(es)  :  dynamic&lt;br /&gt;
SSH Fingerprint :  SHA256:IrPhxhB4m1s+eaPaLynS6NlE/HfL78+y3ba3DPuHFQU (DSA)&lt;br /&gt;
SSH Fingerprint :  SHA256:RT+MZtlFxC7BrdYORzOcxDX+SKsJrLzOGWWngX2pKz4 (ECDSA)&lt;br /&gt;
SSH Fingerprint :  SHA256:aLYvYqUPX2Q/J5P0nTpdpMyrFD5xopRqkFKuYb7QUo4 (ED25519)&lt;br /&gt;
SSH Fingerprint :  SHA256:b0ddm9FYx4/losJU8/pE9MXx7102ygkAMjChOvPlNhE (RSA)&lt;br /&gt;
Root Password   :  X&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;- La commande '''vi /etc/hostname''' pour changer le nom de la VM&lt;br /&gt;
&lt;br /&gt;
== '''Configuration de la Machine de Services''' ==&lt;br /&gt;
Il faut creer deux partitions LVM de 10G pour votre machine virtuelle et modifiez le fichier de configuration de la machine virtuelle de services pour faire en sorte que les répertoires &amp;lt;code&amp;gt;/'''var'''&amp;lt;/code&amp;gt; et &amp;lt;code&amp;gt;'''/home'''&amp;lt;/code&amp;gt; de la machine virtuelle soient implantés sur ces partitions LVM&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
SE4.Poseidon.home lv_home_SE4Elf lv_var_SE4Elf  SE4.Gaby.home SE4.Poseidon.var SE4.Gaby.var &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Serveur SSH''' ==&lt;br /&gt;
Notre machine virtuelle doit etre accessible par SSH, on autorise donc l'accès par l'utilisateur '''Root en modifiant le fichier de de configuration &amp;lt;code&amp;gt;/etc/ssh/sshd_config  :&amp;lt;/code&amp;gt;'''&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
PermitRootLogin yes&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Il faut ensuite redemarrer le serveur ssh en faisant :&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/etc/ssh# /etc/init.d/ssh restart&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Pour gérer la redirection du SSH, on doit configurer '''nftables''' sur nos machines de service en redirigeant les ports 2201 et 2202&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
nft add table ip nat&lt;br /&gt;
nft add chain ip nat PREROUTING { type nat hook prerouting priority 0 \; }&lt;br /&gt;
nft add rule ip nat PREROUTING tcp dport 2201 dnat to 192.168.50.12:22                 &lt;br /&gt;
nft add rule ip nat PREROUTING tcp dport 2202 dnat to 192.168.50.3:22              &lt;br /&gt;
nft add chain ip nat POSTROUTING { type nat hook postrouting priority 100 \; }&lt;br /&gt;
nft add rule ip nat POSTROUTING masquerade&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Maintenant, on peut se connecter en SSH sur les machiches virtuelles de services:  De Elf, on peut se connecter a Kasav&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/# ssh root@192.168.50.3&lt;br /&gt;
root@192.168.50.3's password: &lt;br /&gt;
Linux Kasav 4.19.0-26-amd64 #1 SMP Debian 4.19.304-1 (2024-01-09) x86_64&lt;br /&gt;
&lt;br /&gt;
The programs included with the Devuan GNU/Linux system are free software;&lt;br /&gt;
the exact distribution terms for each program are described in the&lt;br /&gt;
individual files in /usr/share/doc/*/copyright.&lt;br /&gt;
&lt;br /&gt;
Devuan GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent&lt;br /&gt;
permitted by applicable law.&lt;br /&gt;
Last login: Tue Feb  3 11:34:45 2026 from 192.168.50.12&lt;br /&gt;
root@Kasav:~# &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Serveur DNS''' ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
$TTL 86400&lt;br /&gt;
@ IN SOA ns1.elvis21.tech. admin.elvis21.tech. (&lt;br /&gt;
        3298267246      ;Version&lt;br /&gt;
        3600            ;Refresh&lt;br /&gt;
        1800            ;Retry&lt;br /&gt;
        604800          ;Expire&lt;br /&gt;
        86400 )         ;Minimum TTL&lt;br /&gt;
;&lt;br /&gt;
@  IN NS ns1.elvis21.tech.&lt;br /&gt;
&lt;br /&gt;
ns1 IN A 192.168.50.12&lt;br /&gt;
ns2 IN A 192.168.50.1&lt;br /&gt;
 IN A 192.168.50.12&lt;br /&gt;
      IN AAAA 2001:660:4401:60a0:216:3eff:fe83:a3c8&lt;br /&gt;
www IN A 192.168.50.12&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/etc/bind# cat named.conf.local &lt;br /&gt;
zone &amp;quot;elvis21.tech&amp;quot; {&lt;br /&gt;
    type primary;&lt;br /&gt;
    file &amp;quot;/etc/bind/zones/db.elvis21.tech&amp;quot;;&lt;br /&gt;
    allow-transfer {&lt;br /&gt;
      2001:660:4401:60a0:216:3eff:fe70:7f1c;&lt;br /&gt;
      2001:660:4401:60a0:216:3eff:fe9a:ea1c;&lt;br /&gt;
      };&lt;br /&gt;
    also-notify { 2001:660:4401:60a0:216:3eff:fe70:7f1c; };&lt;br /&gt;
    inline-signing yes;   // DNSSEC automatique&lt;br /&gt;
    key-directory &amp;quot;/etc/bind/keys&amp;quot;; // répertoire des clefs, attention aux droits&lt;br /&gt;
    dnssec-policy &amp;quot;dnssecpolicy&amp;quot;;  // politique pour les clefs de chiffrement&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
zone &amp;quot;kasav.online&amp;quot; {&lt;br /&gt;
    type secondary;&lt;br /&gt;
    file &amp;quot;/etc/bind/backup/db.kasav.online&amp;quot;;&lt;br /&gt;
    primaries { 2001:660:4401:60a0:216:3eff:fe9a:ea1c; };&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
dnssec-policy &amp;quot;dnssecpolicy&amp;quot; {&lt;br /&gt;
  keys {&lt;br /&gt;
    ksk key-directory lifetime unlimited algorithm 13;&lt;br /&gt;
    zsk key-directory lifetime unlimited algorithm 13;&lt;br /&gt;
  };&lt;br /&gt;
  nsec3param;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/etc/bind# named-checkzone elvis21.tech /etc/bind/db.elvis21.tech&lt;br /&gt;
zone elvis21.tech/IN: loaded serial 3298267246&lt;br /&gt;
OK&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
openssl req -nodes -newkey rsa:2048 -sha256 -keyout elvis21.tech.key -out elvis21.csr&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
[[Fichier:ImageDns.png|gauche|vignette|994x994px]]&lt;br /&gt;
&lt;br /&gt;
== Mise en place du serveur Apache (http et https) ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
apt update&lt;br /&gt;
apt install apache2&lt;br /&gt;
systemctl enable --now apache2&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
[[Fichier:Elvis21.tech-DNS.png|gauche|vignette|863x863px]]&lt;br /&gt;
&lt;br /&gt;
== Installation Fail2ban ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/# apt install fail2ban &lt;br /&gt;
Installing:                     &lt;br /&gt;
  fail2ban&lt;br /&gt;
&lt;br /&gt;
root@Elf:/# systemctl status fail2ban&lt;br /&gt;
fail2ban.service - Fail2Ban Service&lt;br /&gt;
    Loaded: loaded (/usr/lib/systemd/system/fail2ban.service, disabled)&lt;br /&gt;
    Active: active (running)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/# service fail2ban status                             &lt;br /&gt;
Status of Authentication failure monitor: fail2ban is running.&lt;br /&gt;
 root@Elf:/# fail2ban-client status&lt;br /&gt;
Status&lt;br /&gt;
|- Number of jail:	1&lt;br /&gt;
`- Jail list:	sshd&lt;br /&gt;
&lt;br /&gt;
root@Elf:/# fail2ban-client status sshd&lt;br /&gt;
Status for the jail: sshd&lt;br /&gt;
|- Filter&lt;br /&gt;
|  |- Currently failed:	0&lt;br /&gt;
|  |- Total failed:	0&lt;br /&gt;
|  `- File list:	/var/log/auth.log&lt;br /&gt;
`- Actions&lt;br /&gt;
   |- Currently banned:	0&lt;br /&gt;
   |- Total banned:	0&lt;br /&gt;
   `- Banned IP list:	&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Mise en place du serveur Apache (http et https) ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/# service apache2 status&lt;br /&gt;
apache2 is running.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== WIFI ==&lt;br /&gt;
Faire ip link&lt;br /&gt;
&lt;br /&gt;
ensuite sudo airodump-ng wlanx  -- Remplacer x par le numero du wlan present &lt;br /&gt;
&lt;br /&gt;
on aura par la suite&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
BSSID              PWR  Beacons    #Data, #/s  CH   MB   ENC CIPHER  AUTH ESSID&lt;br /&gt;
04:DA:D2:9C:50:54  -62       23       11    0   4   54e. WEP  WEP         cracotte05                         &lt;br /&gt;
04:DA:D2:9C:50:5A  -61        2        1    0   4   54e. WEP  WEP         cracotte11    &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Vsouopme</name></author>
	</entry>
	<entry>
		<id>https://wiki-se.plil.fr/mediawiki/index.php?title=SE4_IdO_s%C3%A9curit%C3%A9_syst%C3%A8me/r%C3%A9seau_2025/2026&amp;diff=12177</id>
		<title>SE4 IdO sécurité système/réseau 2025/2026</title>
		<link rel="alternate" type="text/html" href="https://wiki-se.plil.fr/mediawiki/index.php?title=SE4_IdO_s%C3%A9curit%C3%A9_syst%C3%A8me/r%C3%A9seau_2025/2026&amp;diff=12177"/>
		<updated>2026-02-10T15:49:27Z</updated>

		<summary type="html">&lt;p&gt;Vsouopme : /* Tableau des réseaux virtuels */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Répartition des binômes pour les travaux pratiques &amp;quot;administration système et réseau&amp;quot; =&lt;br /&gt;
&lt;br /&gt;
Préfixe des noms de machine : &amp;lt;code&amp;gt;SE4&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Domaines Internet à louer sur [[gandi.net]]. Identifiant &amp;lt;code&amp;gt;pifou&amp;lt;/code&amp;gt;. Regardez le montant prévu sur le compte avant de louer un domaine.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Cahier !! Elève !! Nom de domaine&lt;br /&gt;
! Nom de machine de services !! Nom de machine mandataire&lt;br /&gt;
|-&lt;br /&gt;
| [[Atelier SysRes SE4 2025/2026 E1 | Cahier n°1]] || Pierre CASIMIRI || merteuil.tech || SE4.Merteuil||SE4.Rosemonde&lt;br /&gt;
|-&lt;br /&gt;
| [[Atelier SysRes SE4 2025/2026 E2 | Cahier n°2]] || Agathe HOUDUSSE || valmont.tech || SE4.Valmont||SE4.Rosemonde&lt;br /&gt;
|-&lt;br /&gt;
| [[Atelier SysRes SE4 2025/2026 E3 | Cahier n°3]] || Lilia GHAZALI || kirchhoff.live|| SE4.Tension||SE4.Kirchhoff&lt;br /&gt;
|-&lt;br /&gt;
| [[Atelier SysRes SE4 2025/2026 E4 | Cahier n°4]] || Marin GOURVEST || courant.online|| SE4.Courant||SE4.Kirchhoff&lt;br /&gt;
|-&lt;br /&gt;
| [[Atelier SysRes SE4 2025/2026 E5 | Cahier n°5]] || Cédric PAYET || archlinuxbtw.lol|| SE4.CachyOS||SE4.LinusTorvalds&lt;br /&gt;
|-&lt;br /&gt;
| [[Atelier SysRes SE4 2025/2026 E6 | Cahier n°6]] || Thomas DELOBELLE || archlinux.lol|| SE4.Manjaro||SE4.LinusTorvalds&lt;br /&gt;
|-&lt;br /&gt;
| [[Atelier SysRes SE4 2025/2026 E7 | Cahier n°7]] || Ibrahim TEPELI || c2vts.fr|| SE4.C2||SE4.Garage&lt;br /&gt;
|-&lt;br /&gt;
| [[Atelier SysRes SE4 2025/2026 E8 | Cahier n°8]] || Yassine YAHIANI || rs7.online|| SE4.RS7||SE4.Garage&lt;br /&gt;
|-&lt;br /&gt;
| [[Atelier SysRes SE4 2025/2026 E9 | Cahier n°9]] || Aurèle VANGHELUWE || tompere.online|| SE4-Tompere1||SE4-Tompere0&lt;br /&gt;
|-&lt;br /&gt;
| [[Atelier SysRes SE4 2025/2026 E10 | Cahier n°10]] || Tom MERIEN || tompere2.xyz|| SE4-Tompere2||SE4-Tompere0&lt;br /&gt;
|-&lt;br /&gt;
| [[Atelier SysRes SE4 2025/2026 E11 | Cahier n°11]] || Varesse Evora Souop Metse || elvis21.shop|| SE4.Elf||SE4.RockStar&lt;br /&gt;
|-&lt;br /&gt;
| [[Atelier SysRes SE4 2025/2026 E12 | Cahier n°12]] || Mario Sylainx S. GAUTHIER || kasav.online|| SE4.Kasav||SE4.RockStar&lt;br /&gt;
|-&lt;br /&gt;
| [[Atelier SysRes SE4 2025/2026 E13 | Cahier n°13]] || Billel Cheklat || deadpool.tech|| SE4.catwoman||SE4.superman&lt;br /&gt;
|-&lt;br /&gt;
| [[Atelier SysRes SE4 2025/2026 E14 | Cahier n°14]] || Antonin Biernacki || deadpool.tech|| SE4.batman||SE4.superman&lt;br /&gt;
|-&lt;br /&gt;
| [[Atelier SysRes SE4 2025/2026 E15 | Cahier n°15]] || Mohamed Salhi || msalhi.online|| SE4.Moon||SE4.Solstice&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Nom machine mandataire !! IPv4 publique machine mandataire !! Elèves &lt;br /&gt;
|-&lt;br /&gt;
| SE4.Rosemonde|| 193.48.57.165|| Pierre CASIMIRI &amp;amp; Agathe HOUDUSSE&lt;br /&gt;
|-&lt;br /&gt;
| SE4.Kirchhoff|| 193.48.57.171|| Lilia GHAZALI &amp;amp; Marin GOURVEST&lt;br /&gt;
|-&lt;br /&gt;
| SE4.LinusTorvalds|| 193.48.57.166|| Cédric PAYET &amp;amp; Thomas DELOBELLE&lt;br /&gt;
|-&lt;br /&gt;
| SE4.Garage|| 193.48.57.170|| Ibrahim TEPELI &amp;amp; Yassine YAHIANI &lt;br /&gt;
|-&lt;br /&gt;
| SE4-Tompere0|| 193.48.57.168|| Aurèle VANGHELUWE &amp;amp; Tom MERIEN&lt;br /&gt;
|-&lt;br /&gt;
| SE4.superman|| 193.48.57.169|| Billel Cheklat &amp;amp; Antonin Biernacki&lt;br /&gt;
|-&lt;br /&gt;
| SE4.RockStar|| 193.48.57.172|| Varesse Evora Souop Metse &amp;amp; GAUTHIER Mario Sylainx S.&lt;br /&gt;
|-&lt;br /&gt;
| SE4.Solstice|| &amp;lt;code&amp;gt;193.48.57.167&amp;lt;/code&amp;gt;|| Mohamed Salhi &lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Tableau des commutateurs virtuels =&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Noms des élèves !! Nom du fichier de configuration !! Réseau IPv4 utilisé &lt;br /&gt;
|-&lt;br /&gt;
| CASIMIRI / HOUDUSSE || pont_gercourt || 192.168.3.0/24&lt;br /&gt;
|-&lt;br /&gt;
|PAYET / DELOBELLE&lt;br /&gt;
|pont_pacman&lt;br /&gt;
|192.168.10.0/24&lt;br /&gt;
|-&lt;br /&gt;
|MERIEN / VANGHELUWE&lt;br /&gt;
|pont_pere&lt;br /&gt;
|192.168.0.0/24&lt;br /&gt;
|-&lt;br /&gt;
|CHEKLAT / BIERNACKI&lt;br /&gt;
|pont_ironman&lt;br /&gt;
|192.168.69.0/24&lt;br /&gt;
|-&lt;br /&gt;
|SALHI&lt;br /&gt;
|pont_msalhi&lt;br /&gt;
|192.168.20.0/24&lt;br /&gt;
|-&lt;br /&gt;
|GOURVEST/GHAZALI&lt;br /&gt;
|pont_diviseur&lt;br /&gt;
|192.168.67.0/24&lt;br /&gt;
|-&lt;br /&gt;
|YAHIANI / TEPELI&lt;br /&gt;
|pontclio&lt;br /&gt;
|192.168.7.0/24&lt;br /&gt;
|-&lt;br /&gt;
|GAUTHIER / SOUOP METSE&lt;br /&gt;
|pont_rock&lt;br /&gt;
|192.168.50.0/24&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Tableau des réseaux virtuels =&lt;br /&gt;
&lt;br /&gt;
VLAN privés :&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Nom !! Numéro &lt;br /&gt;
|-&lt;br /&gt;
| VLAN1 || 1&lt;br /&gt;
|-&lt;br /&gt;
| MV-PROMO || 2 &lt;br /&gt;
|-&lt;br /&gt;
|E1-Pierre&lt;br /&gt;
|11&lt;br /&gt;
|-&lt;br /&gt;
|E2-Agathe&lt;br /&gt;
|12&lt;br /&gt;
|-&lt;br /&gt;
|E5-Cedric&lt;br /&gt;
|15&lt;br /&gt;
|-&lt;br /&gt;
|E6-Thomas&lt;br /&gt;
|16&lt;br /&gt;
|-&lt;br /&gt;
|E9-Aurele&lt;br /&gt;
|19&lt;br /&gt;
|-&lt;br /&gt;
|E10-Tom&lt;br /&gt;
|20&lt;br /&gt;
|-&lt;br /&gt;
|E13-Billel&lt;br /&gt;
|22&lt;br /&gt;
|-&lt;br /&gt;
|E14-Antonin&lt;br /&gt;
|23&lt;br /&gt;
|-&lt;br /&gt;
|E15-MSalhi&lt;br /&gt;
|25&lt;br /&gt;
|-&lt;br /&gt;
|E11-Evora&lt;br /&gt;
|28&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
VLAN communs avec l'école :&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Nom !! Numéro &lt;br /&gt;
|-&lt;br /&gt;
| INTERCO1 || 530 &lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Schéma de câblage =&lt;br /&gt;
&lt;br /&gt;
Vous avez des éléments réseaux et des panneaux de brassage fibres dans les locaux techniques SR31 et SR52 ainsi que dans les salles E304 et E306.&lt;br /&gt;
&lt;br /&gt;
Le plan doit donc comporter, pour chaque connexion, les locaux d'origine et de destination ainsi que l'identifiant des ports d'origine et de destination.&lt;br /&gt;
&lt;br /&gt;
= Plan d'adressage =&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Nom VLAN !! Réseau IPv4 !! Réseau IPv6 &lt;br /&gt;
|-&lt;br /&gt;
| MV-PROMO || &amp;lt;code&amp;gt;193.48.57.160/27&amp;lt;/code&amp;gt; || &amp;lt;/code&amp;gt;2001:660:4401:60a0::/64&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| PoolPierre || &amp;lt;code&amp;gt;10.60.1.0/24&amp;lt;/code&amp;gt; || &amp;lt;/code&amp;gt;2001:660:4401:60a1::/64&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| PoolAgathe || &amp;lt;code&amp;gt;10.60.2.0/24&amp;lt;/code&amp;gt; || &amp;lt;/code&amp;gt;2001:660:4401:60a2::/64&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|PoolCédric&lt;br /&gt;
|&amp;lt;code&amp;gt;10.60.5.0/24&amp;lt;/code&amp;gt;&lt;br /&gt;
|2001:660:4401:60a5::/64&lt;br /&gt;
|-&lt;br /&gt;
|PoolThomas&lt;br /&gt;
|&amp;lt;code&amp;gt;10.60.6.0/24&amp;lt;/code&amp;gt;&lt;br /&gt;
|2001:660:4401:60a6::/64&lt;br /&gt;
|-&lt;br /&gt;
|PoolSalhi&lt;br /&gt;
|&amp;lt;code&amp;gt;10.60.15.0/24&amp;lt;/code&amp;gt;&lt;br /&gt;
|2001:660:4401:60b1::/64&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Adresses IPv4 des éléments réseau dans VLAN1&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Elément !! Adresse &lt;br /&gt;
|-&lt;br /&gt;
| Routeur C9200-E304 || 172.27.0.1/16&lt;br /&gt;
|-&lt;br /&gt;
| Routeur C9200-E306 || 172.27.0.2/16&lt;br /&gt;
|-&lt;br /&gt;
| Borne Wi-Fi E306 || 172.27.0.3/16&lt;br /&gt;
|-&lt;br /&gt;
| Borne Wi-Fi E304 || 172.27.0.4/16&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Informations VRRP =&lt;br /&gt;
&lt;br /&gt;
Pour chaque VLAN et pour chaque instance VRRP dans le VLAN listez les adresses IPv4 propres ainsi que l'unique IPv4 virtuelle.&lt;br /&gt;
&lt;br /&gt;
== VLAN des machines virtuelles ==&lt;br /&gt;
&lt;br /&gt;
Une seule instance VRRP dans le VLAN des machines virtuelles.&lt;br /&gt;
&lt;br /&gt;
Adresse IPv4 virtuelle : &amp;lt;code&amp;gt;193.48.57.162&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Routeur !! IPv4 propre &lt;br /&gt;
|-&lt;br /&gt;
| C9200 E304 || &amp;lt;code&amp;gt;193.48.57.163&amp;lt;/code&amp;gt;&lt;br /&gt;
|- &lt;br /&gt;
| C9200 E306 || &amp;lt;code&amp;gt;193.48.57.164&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== VLAN ... ==&lt;/div&gt;</summary>
		<author><name>Vsouopme</name></author>
	</entry>
	<entry>
		<id>https://wiki-se.plil.fr/mediawiki/index.php?title=SE4_IdO_s%C3%A9curit%C3%A9_syst%C3%A8me/r%C3%A9seau_2025/2026&amp;diff=12175</id>
		<title>SE4 IdO sécurité système/réseau 2025/2026</title>
		<link rel="alternate" type="text/html" href="https://wiki-se.plil.fr/mediawiki/index.php?title=SE4_IdO_s%C3%A9curit%C3%A9_syst%C3%A8me/r%C3%A9seau_2025/2026&amp;diff=12175"/>
		<updated>2026-02-10T15:48:05Z</updated>

		<summary type="html">&lt;p&gt;Vsouopme : /* Tableau des réseaux virtuels */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Répartition des binômes pour les travaux pratiques &amp;quot;administration système et réseau&amp;quot; =&lt;br /&gt;
&lt;br /&gt;
Préfixe des noms de machine : &amp;lt;code&amp;gt;SE4&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Domaines Internet à louer sur [[gandi.net]]. Identifiant &amp;lt;code&amp;gt;pifou&amp;lt;/code&amp;gt;. Regardez le montant prévu sur le compte avant de louer un domaine.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Cahier !! Elève !! Nom de domaine&lt;br /&gt;
! Nom de machine de services !! Nom de machine mandataire&lt;br /&gt;
|-&lt;br /&gt;
| [[Atelier SysRes SE4 2025/2026 E1 | Cahier n°1]] || Pierre CASIMIRI || merteuil.tech || SE4.Merteuil||SE4.Rosemonde&lt;br /&gt;
|-&lt;br /&gt;
| [[Atelier SysRes SE4 2025/2026 E2 | Cahier n°2]] || Agathe HOUDUSSE || valmont.tech || SE4.Valmont||SE4.Rosemonde&lt;br /&gt;
|-&lt;br /&gt;
| [[Atelier SysRes SE4 2025/2026 E3 | Cahier n°3]] || Lilia GHAZALI || kirchhoff.live|| SE4.Tension||SE4.Kirchhoff&lt;br /&gt;
|-&lt;br /&gt;
| [[Atelier SysRes SE4 2025/2026 E4 | Cahier n°4]] || Marin GOURVEST || courant.online|| SE4.Courant||SE4.Kirchhoff&lt;br /&gt;
|-&lt;br /&gt;
| [[Atelier SysRes SE4 2025/2026 E5 | Cahier n°5]] || Cédric PAYET || archlinuxbtw.lol|| SE4.CachyOS||SE4.LinusTorvalds&lt;br /&gt;
|-&lt;br /&gt;
| [[Atelier SysRes SE4 2025/2026 E6 | Cahier n°6]] || Thomas DELOBELLE || archlinux.lol|| SE4.Manjaro||SE4.LinusTorvalds&lt;br /&gt;
|-&lt;br /&gt;
| [[Atelier SysRes SE4 2025/2026 E7 | Cahier n°7]] || Ibrahim TEPELI || c2vts.fr|| SE4.C2||SE4.Garage&lt;br /&gt;
|-&lt;br /&gt;
| [[Atelier SysRes SE4 2025/2026 E8 | Cahier n°8]] || Yassine YAHIANI || rs7.online|| SE4.RS7||SE4.Garage&lt;br /&gt;
|-&lt;br /&gt;
| [[Atelier SysRes SE4 2025/2026 E9 | Cahier n°9]] || Aurèle VANGHELUWE || tompere.online|| SE4-Tompere1||SE4-Tompere0&lt;br /&gt;
|-&lt;br /&gt;
| [[Atelier SysRes SE4 2025/2026 E10 | Cahier n°10]] || Tom MERIEN || tompere2.xyz|| SE4-Tompere2||SE4-Tompere0&lt;br /&gt;
|-&lt;br /&gt;
| [[Atelier SysRes SE4 2025/2026 E11 | Cahier n°11]] || Varesse Evora Souop Metse || elvis21.shop|| SE4.Elf||SE4.RockStar&lt;br /&gt;
|-&lt;br /&gt;
| [[Atelier SysRes SE4 2025/2026 E12 | Cahier n°12]] || Mario Sylainx S. GAUTHIER || kasav.online|| SE4.Kasav||SE4.RockStar&lt;br /&gt;
|-&lt;br /&gt;
| [[Atelier SysRes SE4 2025/2026 E13 | Cahier n°13]] || Billel Cheklat || deadpool.tech|| SE4.catwoman||SE4.superman&lt;br /&gt;
|-&lt;br /&gt;
| [[Atelier SysRes SE4 2025/2026 E14 | Cahier n°14]] || Antonin Biernacki || deadpool.tech|| SE4.batman||SE4.superman&lt;br /&gt;
|-&lt;br /&gt;
| [[Atelier SysRes SE4 2025/2026 E15 | Cahier n°15]] || Mohamed Salhi || msalhi.online|| SE4.Moon||SE4.Solstice&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Nom machine mandataire !! IPv4 publique machine mandataire !! Elèves &lt;br /&gt;
|-&lt;br /&gt;
| SE4.Rosemonde|| 193.48.57.165|| Pierre CASIMIRI &amp;amp; Agathe HOUDUSSE&lt;br /&gt;
|-&lt;br /&gt;
| SE4.Kirchhoff|| 193.48.57.171|| Lilia GHAZALI &amp;amp; Marin GOURVEST&lt;br /&gt;
|-&lt;br /&gt;
| SE4.LinusTorvalds|| 193.48.57.166|| Cédric PAYET &amp;amp; Thomas DELOBELLE&lt;br /&gt;
|-&lt;br /&gt;
| SE4.Garage|| 193.48.57.170|| Ibrahim TEPELI &amp;amp; Yassine YAHIANI &lt;br /&gt;
|-&lt;br /&gt;
| SE4-Tompere0|| 193.48.57.168|| Aurèle VANGHELUWE &amp;amp; Tom MERIEN&lt;br /&gt;
|-&lt;br /&gt;
| SE4.superman|| 193.48.57.169|| Billel Cheklat &amp;amp; Antonin Biernacki&lt;br /&gt;
|-&lt;br /&gt;
| SE4.RockStar|| 193.48.57.172|| Varesse Evora Souop Metse &amp;amp; GAUTHIER Mario Sylainx S.&lt;br /&gt;
|-&lt;br /&gt;
| SE4.Solstice|| &amp;lt;code&amp;gt;193.48.57.167&amp;lt;/code&amp;gt;|| Mohamed Salhi &lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Tableau des commutateurs virtuels =&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Noms des élèves !! Nom du fichier de configuration !! Réseau IPv4 utilisé &lt;br /&gt;
|-&lt;br /&gt;
| CASIMIRI / HOUDUSSE || pont_gercourt || 192.168.3.0/24&lt;br /&gt;
|-&lt;br /&gt;
|PAYET / DELOBELLE&lt;br /&gt;
|pont_pacman&lt;br /&gt;
|192.168.10.0/24&lt;br /&gt;
|-&lt;br /&gt;
|MERIEN / VANGHELUWE&lt;br /&gt;
|pont_pere&lt;br /&gt;
|192.168.0.0/24&lt;br /&gt;
|-&lt;br /&gt;
|CHEKLAT / BIERNACKI&lt;br /&gt;
|pont_ironman&lt;br /&gt;
|192.168.69.0/24&lt;br /&gt;
|-&lt;br /&gt;
|SALHI&lt;br /&gt;
|pont_msalhi&lt;br /&gt;
|192.168.20.0/24&lt;br /&gt;
|-&lt;br /&gt;
|GOURVEST/GHAZALI&lt;br /&gt;
|pont_diviseur&lt;br /&gt;
|192.168.67.0/24&lt;br /&gt;
|-&lt;br /&gt;
|YAHIANI / TEPELI&lt;br /&gt;
|pontclio&lt;br /&gt;
|192.168.7.0/24&lt;br /&gt;
|-&lt;br /&gt;
|GAUTHIER / SOUOP METSE&lt;br /&gt;
|pont_rock&lt;br /&gt;
|192.168.50.0/24&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Tableau des réseaux virtuels =&lt;br /&gt;
&lt;br /&gt;
VLAN privés :&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Nom !! Numéro &lt;br /&gt;
|-&lt;br /&gt;
| VLAN1 || 1&lt;br /&gt;
|-&lt;br /&gt;
| MV-PROMO || 2 &lt;br /&gt;
|-&lt;br /&gt;
|E1-Pierre&lt;br /&gt;
|11&lt;br /&gt;
|-&lt;br /&gt;
|E2-Agathe&lt;br /&gt;
|12&lt;br /&gt;
|-&lt;br /&gt;
|E5-Cedric&lt;br /&gt;
|15&lt;br /&gt;
|-&lt;br /&gt;
|E6-Thomas&lt;br /&gt;
|16&lt;br /&gt;
|-&lt;br /&gt;
|E9-Aurele&lt;br /&gt;
|19&lt;br /&gt;
|-&lt;br /&gt;
|E10-Tom&lt;br /&gt;
|20&lt;br /&gt;
|-&lt;br /&gt;
|E13-Billel&lt;br /&gt;
|22&lt;br /&gt;
|-&lt;br /&gt;
|E14-Antonin&lt;br /&gt;
|23&lt;br /&gt;
|-&lt;br /&gt;
|E15-MSalhi&lt;br /&gt;
|25&lt;br /&gt;
|-&lt;br /&gt;
|E15-Evora&lt;br /&gt;
|28&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
VLAN communs avec l'école :&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Nom !! Numéro &lt;br /&gt;
|-&lt;br /&gt;
| INTERCO1 || 530 &lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Schéma de câblage =&lt;br /&gt;
&lt;br /&gt;
Vous avez des éléments réseaux et des panneaux de brassage fibres dans les locaux techniques SR31 et SR52 ainsi que dans les salles E304 et E306.&lt;br /&gt;
&lt;br /&gt;
Le plan doit donc comporter, pour chaque connexion, les locaux d'origine et de destination ainsi que l'identifiant des ports d'origine et de destination.&lt;br /&gt;
&lt;br /&gt;
= Plan d'adressage =&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Nom VLAN !! Réseau IPv4 !! Réseau IPv6 &lt;br /&gt;
|-&lt;br /&gt;
| MV-PROMO || &amp;lt;code&amp;gt;193.48.57.160/27&amp;lt;/code&amp;gt; || &amp;lt;/code&amp;gt;2001:660:4401:60a0::/64&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| PoolPierre || &amp;lt;code&amp;gt;10.60.1.0/24&amp;lt;/code&amp;gt; || &amp;lt;/code&amp;gt;2001:660:4401:60a1::/64&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| PoolAgathe || &amp;lt;code&amp;gt;10.60.2.0/24&amp;lt;/code&amp;gt; || &amp;lt;/code&amp;gt;2001:660:4401:60a2::/64&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|PoolCédric&lt;br /&gt;
|&amp;lt;code&amp;gt;10.60.5.0/24&amp;lt;/code&amp;gt;&lt;br /&gt;
|2001:660:4401:60a5::/64&lt;br /&gt;
|-&lt;br /&gt;
|PoolThomas&lt;br /&gt;
|&amp;lt;code&amp;gt;10.60.6.0/24&amp;lt;/code&amp;gt;&lt;br /&gt;
|2001:660:4401:60a6::/64&lt;br /&gt;
|-&lt;br /&gt;
|PoolSalhi&lt;br /&gt;
|&amp;lt;code&amp;gt;10.60.15.0/24&amp;lt;/code&amp;gt;&lt;br /&gt;
|2001:660:4401:60b1::/64&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Adresses IPv4 des éléments réseau dans VLAN1&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Elément !! Adresse &lt;br /&gt;
|-&lt;br /&gt;
| Routeur C9200-E304 || 172.27.0.1/16&lt;br /&gt;
|-&lt;br /&gt;
| Routeur C9200-E306 || 172.27.0.2/16&lt;br /&gt;
|-&lt;br /&gt;
| Borne Wi-Fi E306 || 172.27.0.3/16&lt;br /&gt;
|-&lt;br /&gt;
| Borne Wi-Fi E304 || 172.27.0.4/16&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Informations VRRP =&lt;br /&gt;
&lt;br /&gt;
Pour chaque VLAN et pour chaque instance VRRP dans le VLAN listez les adresses IPv4 propres ainsi que l'unique IPv4 virtuelle.&lt;br /&gt;
&lt;br /&gt;
== VLAN des machines virtuelles ==&lt;br /&gt;
&lt;br /&gt;
Une seule instance VRRP dans le VLAN des machines virtuelles.&lt;br /&gt;
&lt;br /&gt;
Adresse IPv4 virtuelle : &amp;lt;code&amp;gt;193.48.57.162&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Routeur !! IPv4 propre &lt;br /&gt;
|-&lt;br /&gt;
| C9200 E304 || &amp;lt;code&amp;gt;193.48.57.163&amp;lt;/code&amp;gt;&lt;br /&gt;
|- &lt;br /&gt;
| C9200 E306 || &amp;lt;code&amp;gt;193.48.57.164&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== VLAN ... ==&lt;/div&gt;</summary>
		<author><name>Vsouopme</name></author>
	</entry>
	<entry>
		<id>https://wiki-se.plil.fr/mediawiki/index.php?title=Atelier_SysRes_SE4_2025/2026_E11&amp;diff=12124</id>
		<title>Atelier SysRes SE4 2025/2026 E11</title>
		<link rel="alternate" type="text/html" href="https://wiki-se.plil.fr/mediawiki/index.php?title=Atelier_SysRes_SE4_2025/2026_E11&amp;diff=12124"/>
		<updated>2026-02-10T12:05:35Z</updated>

		<summary type="html">&lt;p&gt;Vsouopme : /* Mise en place du serveur Apache (http et https) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Projet Virtualisation /Administration Systeme-Réseau - Machine SE4.Elf =&lt;br /&gt;
Dans le cadre de ce projet, nnous avons déployés une infrastructure composée de '''deux machines dédiées aux services''' et d’une '''machine mandataire''', le tout à l’aide de l'environnement  '''Xen.'''&lt;br /&gt;
&lt;br /&gt;
== Création des machines virtuelles ==&lt;br /&gt;
Les machines sont créées  sur le Dom0 '''Capbreton.plil.info''' en faisant un '''ssh root@capbreton.plil.info''' &lt;br /&gt;
&lt;br /&gt;
Sur la capbreton.plil.info, &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
xen create-image --hostname=SE4.Elf --dhcp --dir=/usr/local/xen --size=10G --dist=excalibur --memory=2G --bridge=Styx --force&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; '''Xen-create-image''' :  Commande permettant de créer une nouvelle machine virtuelle Xen&lt;br /&gt;
&lt;br /&gt;
'''--hostname=SE4.Elf :''' Pour le nom de la machine &lt;br /&gt;
&lt;br /&gt;
'''--size=10G''' : La taille du disque &lt;br /&gt;
&lt;br /&gt;
'''--bridge=Styx''' : Le nom du bridge &lt;br /&gt;
&lt;br /&gt;
Par la suite il faut creer un fichier dans le répertoire &amp;lt;code&amp;gt;/etc/network/interfaces.d&amp;lt;/code&amp;gt; du Dom0 pour créer notre pont. (NB: Il faut noter que cette etape on peut la faire avant la creation de notre VM&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
auto Styx&lt;br /&gt;
&lt;br /&gt;
iface Styx inet manual&lt;br /&gt;
   bridge_ports none&lt;br /&gt;
   up ip link set $IFACE up&lt;br /&gt;
   down ip link set $IFACE down&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;La commande '''xen list :''' Affiche les '''machines virtuelles''' (VM) qui sont actuellement gérées par Xen (Elle fait la liste des VM allumée).&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
root@capbreton:~# xen list&lt;br /&gt;
SE4.batman                                 322  2048     1     -b----      37.5&lt;br /&gt;
SE4.Moon                                   326  2048     1     -b----      41.1&lt;br /&gt;
SE4.C2                                     332  1024     1     -b----      18.1&lt;br /&gt;
SE4.Tension                                343  2048     1     -b----       7.8&lt;br /&gt;
SE4.CachyOS                                365  2048     1     -b----      10.2&lt;br /&gt;
SE4.RockStar                               367  2048     1     -b----       6.1&lt;br /&gt;
SE4.Kasav                                  368  2048     1     -b----       5.9&lt;br /&gt;
SE4.Elf                                    369  2048     1     -b----       5.6&lt;br /&gt;
SE4.catwoman                               370  2048     1     -b----       6.1&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;-La commande '''xen create /etc/xen/SE4.Elf.cfg''' permet d'allumer la Machine virtuellle.&lt;br /&gt;
&lt;br /&gt;
-La commande xen '''console SE4.Elf''' permet d'acceder  / de se connecter  a la VM.&lt;br /&gt;
&lt;br /&gt;
-La commande '''xen shutdown''' '''SE4.Elf''' permet d'eteindre la machine virtuelle.&lt;br /&gt;
&lt;br /&gt;
Lors de la tentative de connexion, il y'a une un probleme , pour y remedier,  '''Ctrl + AltGr + ] =&amp;gt; vi =&amp;gt; :q! =&amp;gt; reconnexion'''&lt;br /&gt;
&lt;br /&gt;
Pour voir le mot de passe de la VM, '''cat /var/log/xen-tools/SE4.Elf.log'''&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
Installation Summary&lt;br /&gt;
---------------------&lt;br /&gt;
Hostname        :  SE4.Elf&lt;br /&gt;
Distribution    :  excalibur&lt;br /&gt;
MAC Address     :  00:16:3E:83:A3:C7&lt;br /&gt;
IP Address(es)  :  dynamic&lt;br /&gt;
SSH Fingerprint :  SHA256:IrPhxhB4m1s+eaPaLynS6NlE/HfL78+y3ba3DPuHFQU (DSA)&lt;br /&gt;
SSH Fingerprint :  SHA256:RT+MZtlFxC7BrdYORzOcxDX+SKsJrLzOGWWngX2pKz4 (ECDSA)&lt;br /&gt;
SSH Fingerprint :  SHA256:aLYvYqUPX2Q/J5P0nTpdpMyrFD5xopRqkFKuYb7QUo4 (ED25519)&lt;br /&gt;
SSH Fingerprint :  SHA256:b0ddm9FYx4/losJU8/pE9MXx7102ygkAMjChOvPlNhE (RSA)&lt;br /&gt;
Root Password   :  X&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;- La commande '''vi /etc/hostname''' pour changer le nom de la VM&lt;br /&gt;
&lt;br /&gt;
== '''Configuration de la Machine de Services''' ==&lt;br /&gt;
Il faut creer deux partitions LVM de 10G pour votre machine virtuelle et modifiez le fichier de configuration de la machine virtuelle de services pour faire en sorte que les répertoires &amp;lt;code&amp;gt;/'''var'''&amp;lt;/code&amp;gt; et &amp;lt;code&amp;gt;'''/home'''&amp;lt;/code&amp;gt; de la machine virtuelle soient implantés sur ces partitions LVM&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
SE4.Poseidon.home lv_home_SE4Elf lv_var_SE4Elf  SE4.Gaby.home SE4.Poseidon.var SE4.Gaby.var &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Serveur SSH''' ==&lt;br /&gt;
Notre machine virtuelle doit etre accessible par SSH, on autorise donc l'accès par l'utilisateur '''Root en modifiant le fichier de de configuration &amp;lt;code&amp;gt;/etc/ssh/sshd_config  :&amp;lt;/code&amp;gt;'''&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
PermitRootLogin yes&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Il faut ensuite redemarrer le serveur ssh en faisant :&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/etc/ssh# /etc/init.d/ssh restart&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Pour gérer la redirection du SSH, on doit configurer '''nftables''' sur nos machines de service en redirigeant les ports 2201 et 2202&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
nft add table ip nat&lt;br /&gt;
nft add chain ip nat PREROUTING { type nat hook prerouting priority 0 \; }&lt;br /&gt;
nft add rule ip nat PREROUTING tcp dport 2201 dnat to 192.168.50.12:22                 &lt;br /&gt;
nft add rule ip nat PREROUTING tcp dport 2202 dnat to 192.168.50.3:22              &lt;br /&gt;
nft add chain ip nat POSTROUTING { type nat hook postrouting priority 100 \; }&lt;br /&gt;
nft add rule ip nat POSTROUTING masquerade&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Maintenant, on peut se connecter en SSH sur les machiches virtuelles de services:  De Elf, on peut se connecter a Kasav&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/# ssh root@192.168.50.3&lt;br /&gt;
root@192.168.50.3's password: &lt;br /&gt;
Linux Kasav 4.19.0-26-amd64 #1 SMP Debian 4.19.304-1 (2024-01-09) x86_64&lt;br /&gt;
&lt;br /&gt;
The programs included with the Devuan GNU/Linux system are free software;&lt;br /&gt;
the exact distribution terms for each program are described in the&lt;br /&gt;
individual files in /usr/share/doc/*/copyright.&lt;br /&gt;
&lt;br /&gt;
Devuan GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent&lt;br /&gt;
permitted by applicable law.&lt;br /&gt;
Last login: Tue Feb  3 11:34:45 2026 from 192.168.50.12&lt;br /&gt;
root@Kasav:~# &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Serveur DNS''' ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
$TTL 86400&lt;br /&gt;
@ IN SOA ns1.elvis21.tech. admin.elvis21.tech. (&lt;br /&gt;
        3298267246      ;Version&lt;br /&gt;
        3600            ;Refresh&lt;br /&gt;
        1800            ;Retry&lt;br /&gt;
        604800          ;Expire&lt;br /&gt;
        86400 )         ;Minimum TTL&lt;br /&gt;
;&lt;br /&gt;
@  IN NS ns1.elvis21.tech.&lt;br /&gt;
&lt;br /&gt;
ns1 IN A 192.168.50.12&lt;br /&gt;
ns2 IN A 192.168.50.1&lt;br /&gt;
 IN A 192.168.50.12&lt;br /&gt;
      IN AAAA 2001:660:4401:60a0:216:3eff:fe83:a3c8&lt;br /&gt;
www IN A 192.168.50.12&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/etc/bind# cat named.conf.local &lt;br /&gt;
zone &amp;quot;elvis21.tech&amp;quot; {&lt;br /&gt;
    type primary;&lt;br /&gt;
    file &amp;quot;/etc/bind/zones/db.elvis21.tech&amp;quot;;&lt;br /&gt;
    allow-transfer {&lt;br /&gt;
      2001:660:4401:60a0:216:3eff:fe70:7f1c;&lt;br /&gt;
      2001:660:4401:60a0:216:3eff:fe9a:ea1c;&lt;br /&gt;
      };&lt;br /&gt;
    also-notify { 2001:660:4401:60a0:216:3eff:fe70:7f1c; };&lt;br /&gt;
    inline-signing yes;   // DNSSEC automatique&lt;br /&gt;
    key-directory &amp;quot;/etc/bind/keys&amp;quot;; // répertoire des clefs, attention aux droits&lt;br /&gt;
    dnssec-policy &amp;quot;dnssecpolicy&amp;quot;;  // politique pour les clefs de chiffrement&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
zone &amp;quot;kasav.online&amp;quot; {&lt;br /&gt;
    type secondary;&lt;br /&gt;
    file &amp;quot;/etc/bind/backup/db.kasav.online&amp;quot;;&lt;br /&gt;
    primaries { 2001:660:4401:60a0:216:3eff:fe9a:ea1c; };&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
dnssec-policy &amp;quot;dnssecpolicy&amp;quot; {&lt;br /&gt;
  keys {&lt;br /&gt;
    ksk key-directory lifetime unlimited algorithm 13;&lt;br /&gt;
    zsk key-directory lifetime unlimited algorithm 13;&lt;br /&gt;
  };&lt;br /&gt;
  nsec3param;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/etc/bind# named-checkzone elvis21.tech /etc/bind/db.elvis21.tech&lt;br /&gt;
zone elvis21.tech/IN: loaded serial 3298267246&lt;br /&gt;
OK&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
openssl req -nodes -newkey rsa:2048 -sha256 -keyout elvis21.tech.key -out elvis21.csr&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
[[Fichier:ImageDns.png|gauche|vignette|994x994px]]&lt;br /&gt;
&lt;br /&gt;
== Mise en place du serveur Apache (http et https) ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
apt update&lt;br /&gt;
apt install apache2&lt;br /&gt;
systemctl enable --now apache2&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
[[Fichier:Elvis21.tech-DNS.png|gauche|vignette|863x863px]]&lt;br /&gt;
&lt;br /&gt;
== Installation Fail2ban ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/# apt install fail2ban &lt;br /&gt;
Installing:                     &lt;br /&gt;
  fail2ban&lt;br /&gt;
&lt;br /&gt;
root@Elf:/# systemctl status fail2ban&lt;br /&gt;
fail2ban.service - Fail2Ban Service&lt;br /&gt;
    Loaded: loaded (/usr/lib/systemd/system/fail2ban.service, disabled)&lt;br /&gt;
    Active: active (running)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/# service fail2ban status                             &lt;br /&gt;
Status of Authentication failure monitor: fail2ban is running.&lt;br /&gt;
 root@Elf:/# fail2ban-client status&lt;br /&gt;
Status&lt;br /&gt;
|- Number of jail:	1&lt;br /&gt;
`- Jail list:	sshd&lt;br /&gt;
&lt;br /&gt;
root@Elf:/# fail2ban-client status sshd&lt;br /&gt;
Status for the jail: sshd&lt;br /&gt;
|- Filter&lt;br /&gt;
|  |- Currently failed:	0&lt;br /&gt;
|  |- Total failed:	0&lt;br /&gt;
|  `- File list:	/var/log/auth.log&lt;br /&gt;
`- Actions&lt;br /&gt;
   |- Currently banned:	0&lt;br /&gt;
   |- Total banned:	0&lt;br /&gt;
   `- Banned IP list:	&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Mise en place du serveur Apache (http et https) ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/# service apache2 status&lt;br /&gt;
apache2 is running.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Vsouopme</name></author>
	</entry>
	<entry>
		<id>https://wiki-se.plil.fr/mediawiki/index.php?title=Atelier_SysRes_SE4_2025/2026_E11&amp;diff=12123</id>
		<title>Atelier SysRes SE4 2025/2026 E11</title>
		<link rel="alternate" type="text/html" href="https://wiki-se.plil.fr/mediawiki/index.php?title=Atelier_SysRes_SE4_2025/2026_E11&amp;diff=12123"/>
		<updated>2026-02-10T11:59:11Z</updated>

		<summary type="html">&lt;p&gt;Vsouopme : /* Serveur DNS */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Projet Virtualisation /Administration Systeme-Réseau - Machine SE4.Elf =&lt;br /&gt;
Dans le cadre de ce projet, nnous avons déployés une infrastructure composée de '''deux machines dédiées aux services''' et d’une '''machine mandataire''', le tout à l’aide de l'environnement  '''Xen.'''&lt;br /&gt;
&lt;br /&gt;
== Création des machines virtuelles ==&lt;br /&gt;
Les machines sont créées  sur le Dom0 '''Capbreton.plil.info''' en faisant un '''ssh root@capbreton.plil.info''' &lt;br /&gt;
&lt;br /&gt;
Sur la capbreton.plil.info, &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
xen create-image --hostname=SE4.Elf --dhcp --dir=/usr/local/xen --size=10G --dist=excalibur --memory=2G --bridge=Styx --force&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; '''Xen-create-image''' :  Commande permettant de créer une nouvelle machine virtuelle Xen&lt;br /&gt;
&lt;br /&gt;
'''--hostname=SE4.Elf :''' Pour le nom de la machine &lt;br /&gt;
&lt;br /&gt;
'''--size=10G''' : La taille du disque &lt;br /&gt;
&lt;br /&gt;
'''--bridge=Styx''' : Le nom du bridge &lt;br /&gt;
&lt;br /&gt;
Par la suite il faut creer un fichier dans le répertoire &amp;lt;code&amp;gt;/etc/network/interfaces.d&amp;lt;/code&amp;gt; du Dom0 pour créer notre pont. (NB: Il faut noter que cette etape on peut la faire avant la creation de notre VM&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
auto Styx&lt;br /&gt;
&lt;br /&gt;
iface Styx inet manual&lt;br /&gt;
   bridge_ports none&lt;br /&gt;
   up ip link set $IFACE up&lt;br /&gt;
   down ip link set $IFACE down&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;La commande '''xen list :''' Affiche les '''machines virtuelles''' (VM) qui sont actuellement gérées par Xen (Elle fait la liste des VM allumée).&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
root@capbreton:~# xen list&lt;br /&gt;
SE4.batman                                 322  2048     1     -b----      37.5&lt;br /&gt;
SE4.Moon                                   326  2048     1     -b----      41.1&lt;br /&gt;
SE4.C2                                     332  1024     1     -b----      18.1&lt;br /&gt;
SE4.Tension                                343  2048     1     -b----       7.8&lt;br /&gt;
SE4.CachyOS                                365  2048     1     -b----      10.2&lt;br /&gt;
SE4.RockStar                               367  2048     1     -b----       6.1&lt;br /&gt;
SE4.Kasav                                  368  2048     1     -b----       5.9&lt;br /&gt;
SE4.Elf                                    369  2048     1     -b----       5.6&lt;br /&gt;
SE4.catwoman                               370  2048     1     -b----       6.1&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;-La commande '''xen create /etc/xen/SE4.Elf.cfg''' permet d'allumer la Machine virtuellle.&lt;br /&gt;
&lt;br /&gt;
-La commande xen '''console SE4.Elf''' permet d'acceder  / de se connecter  a la VM.&lt;br /&gt;
&lt;br /&gt;
-La commande '''xen shutdown''' '''SE4.Elf''' permet d'eteindre la machine virtuelle.&lt;br /&gt;
&lt;br /&gt;
Lors de la tentative de connexion, il y'a une un probleme , pour y remedier,  '''Ctrl + AltGr + ] =&amp;gt; vi =&amp;gt; :q! =&amp;gt; reconnexion'''&lt;br /&gt;
&lt;br /&gt;
Pour voir le mot de passe de la VM, '''cat /var/log/xen-tools/SE4.Elf.log'''&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
Installation Summary&lt;br /&gt;
---------------------&lt;br /&gt;
Hostname        :  SE4.Elf&lt;br /&gt;
Distribution    :  excalibur&lt;br /&gt;
MAC Address     :  00:16:3E:83:A3:C7&lt;br /&gt;
IP Address(es)  :  dynamic&lt;br /&gt;
SSH Fingerprint :  SHA256:IrPhxhB4m1s+eaPaLynS6NlE/HfL78+y3ba3DPuHFQU (DSA)&lt;br /&gt;
SSH Fingerprint :  SHA256:RT+MZtlFxC7BrdYORzOcxDX+SKsJrLzOGWWngX2pKz4 (ECDSA)&lt;br /&gt;
SSH Fingerprint :  SHA256:aLYvYqUPX2Q/J5P0nTpdpMyrFD5xopRqkFKuYb7QUo4 (ED25519)&lt;br /&gt;
SSH Fingerprint :  SHA256:b0ddm9FYx4/losJU8/pE9MXx7102ygkAMjChOvPlNhE (RSA)&lt;br /&gt;
Root Password   :  X&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;- La commande '''vi /etc/hostname''' pour changer le nom de la VM&lt;br /&gt;
&lt;br /&gt;
== '''Configuration de la Machine de Services''' ==&lt;br /&gt;
Il faut creer deux partitions LVM de 10G pour votre machine virtuelle et modifiez le fichier de configuration de la machine virtuelle de services pour faire en sorte que les répertoires &amp;lt;code&amp;gt;/'''var'''&amp;lt;/code&amp;gt; et &amp;lt;code&amp;gt;'''/home'''&amp;lt;/code&amp;gt; de la machine virtuelle soient implantés sur ces partitions LVM&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
SE4.Poseidon.home lv_home_SE4Elf lv_var_SE4Elf  SE4.Gaby.home SE4.Poseidon.var SE4.Gaby.var &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Serveur SSH''' ==&lt;br /&gt;
Notre machine virtuelle doit etre accessible par SSH, on autorise donc l'accès par l'utilisateur '''Root en modifiant le fichier de de configuration &amp;lt;code&amp;gt;/etc/ssh/sshd_config  :&amp;lt;/code&amp;gt;'''&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
PermitRootLogin yes&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Il faut ensuite redemarrer le serveur ssh en faisant :&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/etc/ssh# /etc/init.d/ssh restart&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Pour gérer la redirection du SSH, on doit configurer '''nftables''' sur nos machines de service en redirigeant les ports 2201 et 2202&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
nft add table ip nat&lt;br /&gt;
nft add chain ip nat PREROUTING { type nat hook prerouting priority 0 \; }&lt;br /&gt;
nft add rule ip nat PREROUTING tcp dport 2201 dnat to 192.168.50.12:22                 &lt;br /&gt;
nft add rule ip nat PREROUTING tcp dport 2202 dnat to 192.168.50.3:22              &lt;br /&gt;
nft add chain ip nat POSTROUTING { type nat hook postrouting priority 100 \; }&lt;br /&gt;
nft add rule ip nat POSTROUTING masquerade&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Maintenant, on peut se connecter en SSH sur les machiches virtuelles de services:  De Elf, on peut se connecter a Kasav&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/# ssh root@192.168.50.3&lt;br /&gt;
root@192.168.50.3's password: &lt;br /&gt;
Linux Kasav 4.19.0-26-amd64 #1 SMP Debian 4.19.304-1 (2024-01-09) x86_64&lt;br /&gt;
&lt;br /&gt;
The programs included with the Devuan GNU/Linux system are free software;&lt;br /&gt;
the exact distribution terms for each program are described in the&lt;br /&gt;
individual files in /usr/share/doc/*/copyright.&lt;br /&gt;
&lt;br /&gt;
Devuan GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent&lt;br /&gt;
permitted by applicable law.&lt;br /&gt;
Last login: Tue Feb  3 11:34:45 2026 from 192.168.50.12&lt;br /&gt;
root@Kasav:~# &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Serveur DNS''' ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
$TTL 86400&lt;br /&gt;
@ IN SOA ns1.elvis21.tech. admin.elvis21.tech. (&lt;br /&gt;
        3298267246      ;Version&lt;br /&gt;
        3600            ;Refresh&lt;br /&gt;
        1800            ;Retry&lt;br /&gt;
        604800          ;Expire&lt;br /&gt;
        86400 )         ;Minimum TTL&lt;br /&gt;
;&lt;br /&gt;
@  IN NS ns1.elvis21.tech.&lt;br /&gt;
&lt;br /&gt;
ns1 IN A 192.168.50.12&lt;br /&gt;
ns2 IN A 192.168.50.1&lt;br /&gt;
 IN A 192.168.50.12&lt;br /&gt;
      IN AAAA 2001:660:4401:60a0:216:3eff:fe83:a3c8&lt;br /&gt;
www IN A 192.168.50.12&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/etc/bind# cat named.conf.local &lt;br /&gt;
zone &amp;quot;elvis21.tech&amp;quot; {&lt;br /&gt;
    type primary;&lt;br /&gt;
    file &amp;quot;/etc/bind/zones/db.elvis21.tech&amp;quot;;&lt;br /&gt;
    allow-transfer {&lt;br /&gt;
      2001:660:4401:60a0:216:3eff:fe70:7f1c;&lt;br /&gt;
      2001:660:4401:60a0:216:3eff:fe9a:ea1c;&lt;br /&gt;
      };&lt;br /&gt;
    also-notify { 2001:660:4401:60a0:216:3eff:fe70:7f1c; };&lt;br /&gt;
    inline-signing yes;   // DNSSEC automatique&lt;br /&gt;
    key-directory &amp;quot;/etc/bind/keys&amp;quot;; // répertoire des clefs, attention aux droits&lt;br /&gt;
    dnssec-policy &amp;quot;dnssecpolicy&amp;quot;;  // politique pour les clefs de chiffrement&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
zone &amp;quot;kasav.online&amp;quot; {&lt;br /&gt;
    type secondary;&lt;br /&gt;
    file &amp;quot;/etc/bind/backup/db.kasav.online&amp;quot;;&lt;br /&gt;
    primaries { 2001:660:4401:60a0:216:3eff:fe9a:ea1c; };&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
dnssec-policy &amp;quot;dnssecpolicy&amp;quot; {&lt;br /&gt;
  keys {&lt;br /&gt;
    ksk key-directory lifetime unlimited algorithm 13;&lt;br /&gt;
    zsk key-directory lifetime unlimited algorithm 13;&lt;br /&gt;
  };&lt;br /&gt;
  nsec3param;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/etc/bind# named-checkzone elvis21.tech /etc/bind/db.elvis21.tech&lt;br /&gt;
zone elvis21.tech/IN: loaded serial 3298267246&lt;br /&gt;
OK&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
openssl req -nodes -newkey rsa:2048 -sha256 -keyout elvis21.tech.key -out elvis21.csr&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
[[Fichier:ImageDns.png|gauche|vignette|994x994px]]&lt;br /&gt;
&lt;br /&gt;
== Mise en place du serveur Apache (http et https) ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
apt update&lt;br /&gt;
apt install apache2&lt;br /&gt;
systemctl enable --now apache2&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
[[Fichier:Elvis21.tech-DNS.png|gauche|vignette|863x863px]]&lt;br /&gt;
&lt;br /&gt;
== Installation Fail2ban ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/# apt install fail2ban &lt;br /&gt;
Installing:                     &lt;br /&gt;
  fail2ban&lt;br /&gt;
&lt;br /&gt;
root@Elf:/# systemctl status fail2ban&lt;br /&gt;
fail2ban.service - Fail2Ban Service&lt;br /&gt;
    Loaded: loaded (/usr/lib/systemd/system/fail2ban.service, disabled)&lt;br /&gt;
    Active: active (running)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/# fail2ban-client status&lt;br /&gt;
Status&lt;br /&gt;
|- Number of jail:	1&lt;br /&gt;
`- Jail list:	sshd&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Vsouopme</name></author>
	</entry>
	<entry>
		<id>https://wiki-se.plil.fr/mediawiki/index.php?title=Atelier_SysRes_SE4_2025/2026_E11&amp;diff=12075</id>
		<title>Atelier SysRes SE4 2025/2026 E11</title>
		<link rel="alternate" type="text/html" href="https://wiki-se.plil.fr/mediawiki/index.php?title=Atelier_SysRes_SE4_2025/2026_E11&amp;diff=12075"/>
		<updated>2026-02-06T12:17:21Z</updated>

		<summary type="html">&lt;p&gt;Vsouopme : /* Serveur SSH */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Projet Virtualisation /Administration Systeme-Réseau - Machine SE4.Elf =&lt;br /&gt;
Dans le cadre de ce projet, nnous avons déployés une infrastructure composée de '''deux machines dédiées aux services''' et d’une '''machine mandataire''', le tout à l’aide de l'environnement  '''Xen.'''&lt;br /&gt;
&lt;br /&gt;
== Création des machines virtuelles ==&lt;br /&gt;
Les machines sont créées  sur le Dom0 '''Capbreton.plil.info''' en faisant un '''ssh root@capbreton.plil.info''' &lt;br /&gt;
&lt;br /&gt;
Sur la capbreton.plil.info, &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
xen create-image --hostname=SE4.Elf --dhcp --dir=/usr/local/xen --size=10G --dist=excalibur --memory=2G --bridge=Styx --force&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; '''Xen-create-image''' :  Commande permettant de créer une nouvelle machine virtuelle Xen&lt;br /&gt;
&lt;br /&gt;
'''--hostname=SE4.Elf :''' Pour le nom de la machine &lt;br /&gt;
&lt;br /&gt;
'''--size=10G''' : La taille du disque &lt;br /&gt;
&lt;br /&gt;
'''--bridge=Styx''' : Le nom du bridge &lt;br /&gt;
&lt;br /&gt;
Par la suite il faut creer un fichier dans le répertoire &amp;lt;code&amp;gt;/etc/network/interfaces.d&amp;lt;/code&amp;gt; du Dom0 pour créer notre pont. (NB: Il faut noter que cette etape on peut la faire avant la creation de notre VM&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
auto Styx&lt;br /&gt;
&lt;br /&gt;
iface Styx inet manual&lt;br /&gt;
   bridge_ports none&lt;br /&gt;
   up ip link set $IFACE up&lt;br /&gt;
   down ip link set $IFACE down&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;La commande '''xen list :''' Affiche les '''machines virtuelles''' (VM) qui sont actuellement gérées par Xen (Elle fait la liste des VM allumée).&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
root@capbreton:~# xen list&lt;br /&gt;
SE4.batman                                 322  2048     1     -b----      37.5&lt;br /&gt;
SE4.Moon                                   326  2048     1     -b----      41.1&lt;br /&gt;
SE4.C2                                     332  1024     1     -b----      18.1&lt;br /&gt;
SE4.Tension                                343  2048     1     -b----       7.8&lt;br /&gt;
SE4.CachyOS                                365  2048     1     -b----      10.2&lt;br /&gt;
SE4.RockStar                               367  2048     1     -b----       6.1&lt;br /&gt;
SE4.Kasav                                  368  2048     1     -b----       5.9&lt;br /&gt;
SE4.Elf                                    369  2048     1     -b----       5.6&lt;br /&gt;
SE4.catwoman                               370  2048     1     -b----       6.1&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;-La commande '''xen create /etc/xen/SE4.Elf.cfg''' permet d'allumer la Machine virtuellle.&lt;br /&gt;
&lt;br /&gt;
-La commande xen '''console SE4.Elf''' permet d'acceder  / de se connecter  a la VM.&lt;br /&gt;
&lt;br /&gt;
-La commande '''xen shutdown''' '''SE4.Elf''' permet d'eteindre la machine virtuelle.&lt;br /&gt;
&lt;br /&gt;
Lors de la tentative de connexion, il y'a une un probleme , pour y remedier,  '''Ctrl + AltGr + ] =&amp;gt; vi =&amp;gt; :q! =&amp;gt; reconnexion'''&lt;br /&gt;
&lt;br /&gt;
Pour voir le mot de passe de la VM, '''cat /var/log/xen-tools/SE4.Elf.log'''&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
Installation Summary&lt;br /&gt;
---------------------&lt;br /&gt;
Hostname        :  SE4.Elf&lt;br /&gt;
Distribution    :  excalibur&lt;br /&gt;
MAC Address     :  00:16:3E:83:A3:C7&lt;br /&gt;
IP Address(es)  :  dynamic&lt;br /&gt;
SSH Fingerprint :  SHA256:IrPhxhB4m1s+eaPaLynS6NlE/HfL78+y3ba3DPuHFQU (DSA)&lt;br /&gt;
SSH Fingerprint :  SHA256:RT+MZtlFxC7BrdYORzOcxDX+SKsJrLzOGWWngX2pKz4 (ECDSA)&lt;br /&gt;
SSH Fingerprint :  SHA256:aLYvYqUPX2Q/J5P0nTpdpMyrFD5xopRqkFKuYb7QUo4 (ED25519)&lt;br /&gt;
SSH Fingerprint :  SHA256:b0ddm9FYx4/losJU8/pE9MXx7102ygkAMjChOvPlNhE (RSA)&lt;br /&gt;
Root Password   :  X&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;- La commande '''vi /etc/hostname''' pour changer le nom de la VM&lt;br /&gt;
&lt;br /&gt;
== '''Configuration de la Machine de Services''' ==&lt;br /&gt;
Il faut creer deux partitions LVM de 10G pour votre machine virtuelle et modifiez le fichier de configuration de la machine virtuelle de services pour faire en sorte que les répertoires &amp;lt;code&amp;gt;/'''var'''&amp;lt;/code&amp;gt; et &amp;lt;code&amp;gt;'''/home'''&amp;lt;/code&amp;gt; de la machine virtuelle soient implantés sur ces partitions LVM&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
SE4.Poseidon.home lv_home_SE4Elf lv_var_SE4Elf  SE4.Gaby.home SE4.Poseidon.var SE4.Gaby.var &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Serveur SSH''' ==&lt;br /&gt;
Notre machine virtuelle doit etre accessible par SSH, on autorise donc l'accès par l'utilisateur '''Root en modifiant le fichier de de configuration &amp;lt;code&amp;gt;/etc/ssh/sshd_config  :&amp;lt;/code&amp;gt;'''&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
PermitRootLogin yes&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Il faut ensuite redemarrer le serveur ssh en faisant :&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/etc/ssh# /etc/init.d/ssh restart&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Pour gérer la redirection du SSH, on doit configurer '''nftables''' sur nos machines de service en redirigeant les ports 2201 et 2202&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
nft add table ip nat&lt;br /&gt;
nft add chain ip nat PREROUTING { type nat hook prerouting priority 0 \; }&lt;br /&gt;
nft add rule ip nat PREROUTING tcp dport 2201 dnat to 192.168.50.12:22                 &lt;br /&gt;
nft add rule ip nat PREROUTING tcp dport 2202 dnat to 192.168.50.3:22              &lt;br /&gt;
nft add chain ip nat POSTROUTING { type nat hook postrouting priority 100 \; }&lt;br /&gt;
nft add rule ip nat POSTROUTING masquerade&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Maintenant, on peut se connecter en SSH sur les machiches virtuelles de services:  De Elf, on peut se connecter a Kasav&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/# ssh root@192.168.50.3&lt;br /&gt;
root@192.168.50.3's password: &lt;br /&gt;
Linux Kasav 4.19.0-26-amd64 #1 SMP Debian 4.19.304-1 (2024-01-09) x86_64&lt;br /&gt;
&lt;br /&gt;
The programs included with the Devuan GNU/Linux system are free software;&lt;br /&gt;
the exact distribution terms for each program are described in the&lt;br /&gt;
individual files in /usr/share/doc/*/copyright.&lt;br /&gt;
&lt;br /&gt;
Devuan GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent&lt;br /&gt;
permitted by applicable law.&lt;br /&gt;
Last login: Tue Feb  3 11:34:45 2026 from 192.168.50.12&lt;br /&gt;
root@Kasav:~# &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Serveur DNS''' ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
$TTL 86400&lt;br /&gt;
@ IN SOA ns1.elvis21.tech. admin.elvis21.tech. (&lt;br /&gt;
        3298267246      ;Version&lt;br /&gt;
        3600            ;Refresh&lt;br /&gt;
        1800            ;Retry&lt;br /&gt;
        604800          ;Expire&lt;br /&gt;
        86400 )         ;Minimum TTL&lt;br /&gt;
;&lt;br /&gt;
@  IN NS ns1.elvis21.tech.&lt;br /&gt;
&lt;br /&gt;
ns1 IN A 192.168.50.12&lt;br /&gt;
ns2 IN A 192.168.50.1&lt;br /&gt;
 IN A 192.168.50.12&lt;br /&gt;
      IN AAAA 2001:660:4401:60a0:216:3eff:fe83:a3c8&lt;br /&gt;
www IN A 192.168.50.12&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/etc/bind# cat named.conf.local &lt;br /&gt;
zone &amp;quot;elvis21.tech&amp;quot; {&lt;br /&gt;
    type primary;&lt;br /&gt;
    file &amp;quot;/etc/bind/zones/db.elvis21.tech&amp;quot;;&lt;br /&gt;
    allow-transfer {&lt;br /&gt;
      2001:660:4401:60a0:216:3eff:fe70:7f1c;&lt;br /&gt;
      2001:660:4401:60a0:216:3eff:fe9a:ea1c;&lt;br /&gt;
      };&lt;br /&gt;
    also-notify { 2001:660:4401:60a0:216:3eff:fe70:7f1c; };&lt;br /&gt;
    inline-signing yes;   // DNSSEC automatique&lt;br /&gt;
    key-directory &amp;quot;/etc/bind/keys&amp;quot;; // répertoire des clefs, attention aux droits&lt;br /&gt;
    dnssec-policy &amp;quot;dnssecpolicy&amp;quot;;  // politique pour les clefs de chiffrement&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
zone &amp;quot;kasav.online&amp;quot; {&lt;br /&gt;
    type secondary;&lt;br /&gt;
    file &amp;quot;/etc/bind/backup/db.kasav.online&amp;quot;;&lt;br /&gt;
    primaries { 2001:660:4401:60a0:216:3eff:fe9a:ea1c; };&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
dnssec-policy &amp;quot;dnssecpolicy&amp;quot; {&lt;br /&gt;
  keys {&lt;br /&gt;
    ksk key-directory lifetime unlimited algorithm 13;&lt;br /&gt;
    zsk key-directory lifetime unlimited algorithm 13;&lt;br /&gt;
  };&lt;br /&gt;
  nsec3param;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/etc/bind# named-checkzone elvis21.tech /etc/bind/db.elvis21.tech&lt;br /&gt;
zone elvis21.tech/IN: loaded serial 3298267246&lt;br /&gt;
OK&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
openssl req -nodes -newkey rsa:2048 -sha256 -keyout elvis21.tech.key -out elvis21.csr&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
[[Fichier:ImageDns.png|gauche|vignette|994x994px]]&lt;br /&gt;
&lt;br /&gt;
== Mise en place du serveur Apache (http et https) ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
apt update&lt;br /&gt;
apt install apache2&lt;br /&gt;
systemctl enable --now apache2&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
[[Fichier:Elvis21.tech-DNS.png|gauche|vignette|863x863px]]&lt;br /&gt;
&lt;br /&gt;
== Installation Fail2ban ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/# apt install fail2ban &lt;br /&gt;
Installing:                     &lt;br /&gt;
  fail2ban&lt;br /&gt;
&lt;br /&gt;
root@Elf:/# systemctl status fail2ban&lt;br /&gt;
fail2ban.service - Fail2Ban Service&lt;br /&gt;
    Loaded: loaded (/usr/lib/systemd/system/fail2ban.service, disabled)&lt;br /&gt;
    Active: active (running)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Vsouopme</name></author>
	</entry>
	<entry>
		<id>https://wiki-se.plil.fr/mediawiki/index.php?title=Atelier_SysRes_SE4_2025/2026_E11&amp;diff=12074</id>
		<title>Atelier SysRes SE4 2025/2026 E11</title>
		<link rel="alternate" type="text/html" href="https://wiki-se.plil.fr/mediawiki/index.php?title=Atelier_SysRes_SE4_2025/2026_E11&amp;diff=12074"/>
		<updated>2026-02-06T12:11:36Z</updated>

		<summary type="html">&lt;p&gt;Vsouopme : /* Serveur DNS */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Projet Virtualisation /Administration Systeme-Réseau - Machine SE4.Elf =&lt;br /&gt;
Dans le cadre de ce projet, nnous avons déployés une infrastructure composée de '''deux machines dédiées aux services''' et d’une '''machine mandataire''', le tout à l’aide de l'environnement  '''Xen.'''&lt;br /&gt;
&lt;br /&gt;
== Création des machines virtuelles ==&lt;br /&gt;
Les machines sont créées  sur le Dom0 '''Capbreton.plil.info''' en faisant un '''ssh root@capbreton.plil.info''' &lt;br /&gt;
&lt;br /&gt;
Sur la capbreton.plil.info, &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
xen create-image --hostname=SE4.Elf --dhcp --dir=/usr/local/xen --size=10G --dist=excalibur --memory=2G --bridge=Styx --force&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; '''Xen-create-image''' :  Commande permettant de créer une nouvelle machine virtuelle Xen&lt;br /&gt;
&lt;br /&gt;
'''--hostname=SE4.Elf :''' Pour le nom de la machine &lt;br /&gt;
&lt;br /&gt;
'''--size=10G''' : La taille du disque &lt;br /&gt;
&lt;br /&gt;
'''--bridge=Styx''' : Le nom du bridge &lt;br /&gt;
&lt;br /&gt;
Par la suite il faut creer un fichier dans le répertoire &amp;lt;code&amp;gt;/etc/network/interfaces.d&amp;lt;/code&amp;gt; du Dom0 pour créer notre pont. (NB: Il faut noter que cette etape on peut la faire avant la creation de notre VM&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
auto Styx&lt;br /&gt;
&lt;br /&gt;
iface Styx inet manual&lt;br /&gt;
   bridge_ports none&lt;br /&gt;
   up ip link set $IFACE up&lt;br /&gt;
   down ip link set $IFACE down&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;La commande '''xen list :''' Affiche les '''machines virtuelles''' (VM) qui sont actuellement gérées par Xen (Elle fait la liste des VM allumée).&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
root@capbreton:~# xen list&lt;br /&gt;
SE4.batman                                 322  2048     1     -b----      37.5&lt;br /&gt;
SE4.Moon                                   326  2048     1     -b----      41.1&lt;br /&gt;
SE4.C2                                     332  1024     1     -b----      18.1&lt;br /&gt;
SE4.Tension                                343  2048     1     -b----       7.8&lt;br /&gt;
SE4.CachyOS                                365  2048     1     -b----      10.2&lt;br /&gt;
SE4.RockStar                               367  2048     1     -b----       6.1&lt;br /&gt;
SE4.Kasav                                  368  2048     1     -b----       5.9&lt;br /&gt;
SE4.Elf                                    369  2048     1     -b----       5.6&lt;br /&gt;
SE4.catwoman                               370  2048     1     -b----       6.1&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;-La commande '''xen create /etc/xen/SE4.Elf.cfg''' permet d'allumer la Machine virtuellle.&lt;br /&gt;
&lt;br /&gt;
-La commande xen '''console SE4.Elf''' permet d'acceder  / de se connecter  a la VM.&lt;br /&gt;
&lt;br /&gt;
-La commande '''xen shutdown''' '''SE4.Elf''' permet d'eteindre la machine virtuelle.&lt;br /&gt;
&lt;br /&gt;
Lors de la tentative de connexion, il y'a une un probleme , pour y remedier,  '''Ctrl + AltGr + ] =&amp;gt; vi =&amp;gt; :q! =&amp;gt; reconnexion'''&lt;br /&gt;
&lt;br /&gt;
Pour voir le mot de passe de la VM, '''cat /var/log/xen-tools/SE4.Elf.log'''&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
Installation Summary&lt;br /&gt;
---------------------&lt;br /&gt;
Hostname        :  SE4.Elf&lt;br /&gt;
Distribution    :  excalibur&lt;br /&gt;
MAC Address     :  00:16:3E:83:A3:C7&lt;br /&gt;
IP Address(es)  :  dynamic&lt;br /&gt;
SSH Fingerprint :  SHA256:IrPhxhB4m1s+eaPaLynS6NlE/HfL78+y3ba3DPuHFQU (DSA)&lt;br /&gt;
SSH Fingerprint :  SHA256:RT+MZtlFxC7BrdYORzOcxDX+SKsJrLzOGWWngX2pKz4 (ECDSA)&lt;br /&gt;
SSH Fingerprint :  SHA256:aLYvYqUPX2Q/J5P0nTpdpMyrFD5xopRqkFKuYb7QUo4 (ED25519)&lt;br /&gt;
SSH Fingerprint :  SHA256:b0ddm9FYx4/losJU8/pE9MXx7102ygkAMjChOvPlNhE (RSA)&lt;br /&gt;
Root Password   :  X&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;- La commande '''vi /etc/hostname''' pour changer le nom de la VM&lt;br /&gt;
&lt;br /&gt;
== '''Configuration de la Machine de Services''' ==&lt;br /&gt;
Il faut creer deux partitions LVM de 10G pour votre machine virtuelle et modifiez le fichier de configuration de la machine virtuelle de services pour faire en sorte que les répertoires &amp;lt;code&amp;gt;/'''var'''&amp;lt;/code&amp;gt; et &amp;lt;code&amp;gt;'''/home'''&amp;lt;/code&amp;gt; de la machine virtuelle soient implantés sur ces partitions LVM&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
SE4.Poseidon.home lv_home_SE4Elf lv_var_SE4Elf  SE4.Gaby.home SE4.Poseidon.var SE4.Gaby.var &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Serveur SSH''' ==&lt;br /&gt;
Notre machine virtuelle doit etre accessible par SSH, on autorise donc l'accès par l'utilisateur '''Root en modifiant le fichier de de configuration &amp;lt;code&amp;gt;/etc/ssh/sshd_config  :&amp;lt;/code&amp;gt;'''&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
PermitRootLogin yes&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Il faut ensuite redemarrer le serveur ssh en faisant :&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/etc/ssh# /etc/init.d/ssh restart&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Pour gérer la redirection du SSH, on doit configurer '''nftables''' sur nos machines de service en redirigeant les ports 2201 et 2202&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
nft add table ip nat&lt;br /&gt;
nft add chain ip nat PREROUTING { type nat hook prerouting priority 0 \; }&lt;br /&gt;
nft add rule ip nat PREROUTING tcp dport 2201 dnat to 192.168.50.12:22                 &lt;br /&gt;
nft add rule ip nat PREROUTING tcp dport 2202 dnat to 192.168.50.3:22              &lt;br /&gt;
nft add chain ip nat POSTROUTING { type nat hook postrouting priority 100 \; }&lt;br /&gt;
nft add rule ip nat POSTROUTING masquerade&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Maintenant, on peut se connecter en SSH sur les machiches virtuelles de services:  De Elf, on peut se connecter a Kasav&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/# ssh root@192.168.50.3&lt;br /&gt;
root@192.168.50.3's password: &lt;br /&gt;
Linux Kasav 4.19.0-26-amd64 #1 SMP Debian 4.19.304-1 (2024-01-09) x86_64&lt;br /&gt;
&lt;br /&gt;
The programs included with the Devuan GNU/Linux system are free software;&lt;br /&gt;
the exact distribution terms for each program are described in the&lt;br /&gt;
individual files in /usr/share/doc/*/copyright.&lt;br /&gt;
&lt;br /&gt;
Devuan GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent&lt;br /&gt;
permitted by applicable law.&lt;br /&gt;
Last login: Tue Feb  3 11:34:45 2026 from 192.168.50.12&lt;br /&gt;
root@Kasav:~# &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Serveur DNS''' ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/etc/bind# dig @localhost elvis21.tech    &lt;br /&gt;
&lt;br /&gt;
; &amp;lt;&amp;lt;&amp;gt;&amp;gt; DiG 9.20.18-1~deb13u1-Debian &amp;lt;&amp;lt;&amp;gt;&amp;gt; @localhost elvis21.tech&lt;br /&gt;
; (1 server found)&lt;br /&gt;
;; global options: +cmd&lt;br /&gt;
;; Got answer:&lt;br /&gt;
;; -&amp;gt;&amp;gt;HEADER&amp;lt;&amp;lt;- opcode: QUERY, status: NOERROR, id: 45747&lt;br /&gt;
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 1&lt;br /&gt;
&lt;br /&gt;
;; OPT PSEUDOSECTION:&lt;br /&gt;
; EDNS: version: 0, flags:; udp: 1232&lt;br /&gt;
; COOKIE: 294762ee3edf0a910100000069821bb2626fa0b2f806960f (good)&lt;br /&gt;
;; QUESTION SECTION:&lt;br /&gt;
;elvis21.tech.			IN	A&lt;br /&gt;
&lt;br /&gt;
;; AUTHORITY SECTION:&lt;br /&gt;
elvis21.tech.		86400	IN	SOA	ns1.elvis21.shop. admin.elvis21.shop. 3298267246 3600 1800 604800 86400&lt;br /&gt;
&lt;br /&gt;
;; Query time: 0 msec&lt;br /&gt;
;; SERVER: 127.0.0.1#53(localhost) (UDP)&lt;br /&gt;
;; WHEN: Tue Feb 03 16:00:50 UTC 2026&lt;br /&gt;
;; MSG SIZE  rcvd: 127&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
$TTL 86400&lt;br /&gt;
@ IN SOA ns1.elvis21.tech. admin.elvis21.tech. (&lt;br /&gt;
        3298267246      ;Version&lt;br /&gt;
        3600            ;Refresh&lt;br /&gt;
        1800            ;Retry&lt;br /&gt;
        604800          ;Expire&lt;br /&gt;
        86400 )         ;Minimum TTL&lt;br /&gt;
;&lt;br /&gt;
@  IN NS ns1.elvis21.tech.&lt;br /&gt;
&lt;br /&gt;
ns1 IN A 192.168.50.12&lt;br /&gt;
ns2 IN A 192.168.50.1&lt;br /&gt;
 IN A 192.168.50.12&lt;br /&gt;
      IN AAAA 2001:660:4401:60a0:216:3eff:fe83:a3c8&lt;br /&gt;
www IN A 192.168.50.12&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/etc/bind# cat named.conf.local &lt;br /&gt;
zone &amp;quot;elvis21.tech&amp;quot; {&lt;br /&gt;
    type primary;&lt;br /&gt;
    file &amp;quot;/etc/bind/zones/db.elvis21.tech&amp;quot;;&lt;br /&gt;
    allow-transfer {&lt;br /&gt;
      2001:660:4401:60a0:216:3eff:fe70:7f1c;&lt;br /&gt;
      2001:660:4401:60a0:216:3eff:fe9a:ea1c;&lt;br /&gt;
      };&lt;br /&gt;
    also-notify { 2001:660:4401:60a0:216:3eff:fe70:7f1c; };&lt;br /&gt;
    inline-signing yes;   // DNSSEC automatique&lt;br /&gt;
    key-directory &amp;quot;/etc/bind/keys&amp;quot;; // répertoire des clefs, attention aux droits&lt;br /&gt;
    dnssec-policy &amp;quot;dnssecpolicy&amp;quot;;  // politique pour les clefs de chiffrement&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
zone &amp;quot;kasav.online&amp;quot; {&lt;br /&gt;
    type secondary;&lt;br /&gt;
    file &amp;quot;/etc/bind/backup/db.kasav.online&amp;quot;;&lt;br /&gt;
    primaries { 2001:660:4401:60a0:216:3eff:fe9a:ea1c; };&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
dnssec-policy &amp;quot;dnssecpolicy&amp;quot; {&lt;br /&gt;
  keys {&lt;br /&gt;
    ksk key-directory lifetime unlimited algorithm 13;&lt;br /&gt;
    zsk key-directory lifetime unlimited algorithm 13;&lt;br /&gt;
  };&lt;br /&gt;
  nsec3param;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/etc/bind# named-checkzone elvis21.tech /etc/bind/db.elvis21.tech&lt;br /&gt;
zone elvis21.tech/IN: loaded serial 3298267246&lt;br /&gt;
OK&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
openssl req -nodes -newkey rsa:2048 -sha256 -keyout elvis21.tech.key -out elvis21.csr&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
[[Fichier:ImageDns.png|gauche|vignette|994x994px]]&lt;br /&gt;
&lt;br /&gt;
== Mise en place du serveur Apache (http et https) ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
apt update&lt;br /&gt;
apt install apache2&lt;br /&gt;
systemctl enable --now apache2&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
[[Fichier:Elvis21.tech-DNS.png|gauche|vignette|863x863px]]&lt;/div&gt;</summary>
		<author><name>Vsouopme</name></author>
	</entry>
	<entry>
		<id>https://wiki-se.plil.fr/mediawiki/index.php?title=Fichier:Elvis21.tech-DNS.png&amp;diff=12073</id>
		<title>Fichier:Elvis21.tech-DNS.png</title>
		<link rel="alternate" type="text/html" href="https://wiki-se.plil.fr/mediawiki/index.php?title=Fichier:Elvis21.tech-DNS.png&amp;diff=12073"/>
		<updated>2026-02-06T12:10:54Z</updated>

		<summary type="html">&lt;p&gt;Vsouopme : &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt; test DNSSEC sur elvis21.tech&lt;/div&gt;</summary>
		<author><name>Vsouopme</name></author>
	</entry>
	<entry>
		<id>https://wiki-se.plil.fr/mediawiki/index.php?title=Atelier_SysRes_SE4_2025/2026_E11&amp;diff=12072</id>
		<title>Atelier SysRes SE4 2025/2026 E11</title>
		<link rel="alternate" type="text/html" href="https://wiki-se.plil.fr/mediawiki/index.php?title=Atelier_SysRes_SE4_2025/2026_E11&amp;diff=12072"/>
		<updated>2026-02-04T12:04:09Z</updated>

		<summary type="html">&lt;p&gt;Vsouopme : /* Serveur DNS */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Projet Virtualisation /Administration Systeme-Réseau - Machine SE4.Elf =&lt;br /&gt;
Dans le cadre de ce projet, nnous avons déployés une infrastructure composée de '''deux machines dédiées aux services''' et d’une '''machine mandataire''', le tout à l’aide de l'environnement  '''Xen.'''&lt;br /&gt;
&lt;br /&gt;
== Création des machines virtuelles ==&lt;br /&gt;
Les machines sont créées  sur le Dom0 '''Capbreton.plil.info''' en faisant un '''ssh root@capbreton.plil.info''' &lt;br /&gt;
&lt;br /&gt;
Sur la capbreton.plil.info, &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
xen create-image --hostname=SE4.Elf --dhcp --dir=/usr/local/xen --size=10G --dist=excalibur --memory=2G --bridge=Styx --force&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; '''Xen-create-image''' :  Commande permettant de créer une nouvelle machine virtuelle Xen&lt;br /&gt;
&lt;br /&gt;
'''--hostname=SE4.Elf :''' Pour le nom de la machine &lt;br /&gt;
&lt;br /&gt;
'''--size=10G''' : La taille du disque &lt;br /&gt;
&lt;br /&gt;
'''--bridge=Styx''' : Le nom du bridge &lt;br /&gt;
&lt;br /&gt;
Par la suite il faut creer un fichier dans le répertoire &amp;lt;code&amp;gt;/etc/network/interfaces.d&amp;lt;/code&amp;gt; du Dom0 pour créer notre pont. (NB: Il faut noter que cette etape on peut la faire avant la creation de notre VM&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
auto Styx&lt;br /&gt;
&lt;br /&gt;
iface Styx inet manual&lt;br /&gt;
   bridge_ports none&lt;br /&gt;
   up ip link set $IFACE up&lt;br /&gt;
   down ip link set $IFACE down&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;La commande '''xen list :''' Affiche les '''machines virtuelles''' (VM) qui sont actuellement gérées par Xen (Elle fait la liste des VM allumée).&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
root@capbreton:~# xen list&lt;br /&gt;
SE4.batman                                 322  2048     1     -b----      37.5&lt;br /&gt;
SE4.Moon                                   326  2048     1     -b----      41.1&lt;br /&gt;
SE4.C2                                     332  1024     1     -b----      18.1&lt;br /&gt;
SE4.Tension                                343  2048     1     -b----       7.8&lt;br /&gt;
SE4.CachyOS                                365  2048     1     -b----      10.2&lt;br /&gt;
SE4.RockStar                               367  2048     1     -b----       6.1&lt;br /&gt;
SE4.Kasav                                  368  2048     1     -b----       5.9&lt;br /&gt;
SE4.Elf                                    369  2048     1     -b----       5.6&lt;br /&gt;
SE4.catwoman                               370  2048     1     -b----       6.1&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;-La commande '''xen create /etc/xen/SE4.Elf.cfg''' permet d'allumer la Machine virtuellle.&lt;br /&gt;
&lt;br /&gt;
-La commande xen '''console SE4.Elf''' permet d'acceder  / de se connecter  a la VM.&lt;br /&gt;
&lt;br /&gt;
-La commande '''xen shutdown''' '''SE4.Elf''' permet d'eteindre la machine virtuelle.&lt;br /&gt;
&lt;br /&gt;
Lors de la tentative de connexion, il y'a une un probleme , pour y remedier,  '''Ctrl + AltGr + ] =&amp;gt; vi =&amp;gt; :q! =&amp;gt; reconnexion'''&lt;br /&gt;
&lt;br /&gt;
Pour voir le mot de passe de la VM, '''cat /var/log/xen-tools/SE4.Elf.log'''&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
Installation Summary&lt;br /&gt;
---------------------&lt;br /&gt;
Hostname        :  SE4.Elf&lt;br /&gt;
Distribution    :  excalibur&lt;br /&gt;
MAC Address     :  00:16:3E:83:A3:C7&lt;br /&gt;
IP Address(es)  :  dynamic&lt;br /&gt;
SSH Fingerprint :  SHA256:IrPhxhB4m1s+eaPaLynS6NlE/HfL78+y3ba3DPuHFQU (DSA)&lt;br /&gt;
SSH Fingerprint :  SHA256:RT+MZtlFxC7BrdYORzOcxDX+SKsJrLzOGWWngX2pKz4 (ECDSA)&lt;br /&gt;
SSH Fingerprint :  SHA256:aLYvYqUPX2Q/J5P0nTpdpMyrFD5xopRqkFKuYb7QUo4 (ED25519)&lt;br /&gt;
SSH Fingerprint :  SHA256:b0ddm9FYx4/losJU8/pE9MXx7102ygkAMjChOvPlNhE (RSA)&lt;br /&gt;
Root Password   :  X&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;- La commande '''vi /etc/hostname''' pour changer le nom de la VM&lt;br /&gt;
&lt;br /&gt;
== '''Configuration de la Machine de Services''' ==&lt;br /&gt;
Il faut creer deux partitions LVM de 10G pour votre machine virtuelle et modifiez le fichier de configuration de la machine virtuelle de services pour faire en sorte que les répertoires &amp;lt;code&amp;gt;/'''var'''&amp;lt;/code&amp;gt; et &amp;lt;code&amp;gt;'''/home'''&amp;lt;/code&amp;gt; de la machine virtuelle soient implantés sur ces partitions LVM&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
SE4.Poseidon.home lv_home_SE4Elf lv_var_SE4Elf  SE4.Gaby.home SE4.Poseidon.var SE4.Gaby.var &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Serveur SSH''' ==&lt;br /&gt;
Notre machine virtuelle doit etre accessible par SSH, on autorise donc l'accès par l'utilisateur '''Root en modifiant le fichier de de configuration &amp;lt;code&amp;gt;/etc/ssh/sshd_config  :&amp;lt;/code&amp;gt;'''&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
PermitRootLogin yes&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Il faut ensuite redemarrer le serveur ssh en faisant :&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/etc/ssh# /etc/init.d/ssh restart&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Pour gérer la redirection du SSH, on doit configurer '''nftables''' sur nos machines de service en redirigeant les ports 2201 et 2202&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
nft add table ip nat&lt;br /&gt;
nft add chain ip nat PREROUTING { type nat hook prerouting priority 0 \; }&lt;br /&gt;
nft add rule ip nat PREROUTING tcp dport 2201 dnat to 192.168.50.12:22                 &lt;br /&gt;
nft add rule ip nat PREROUTING tcp dport 2202 dnat to 192.168.50.3:22              &lt;br /&gt;
nft add chain ip nat POSTROUTING { type nat hook postrouting priority 100 \; }&lt;br /&gt;
nft add rule ip nat POSTROUTING masquerade&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Maintenant, on peut se connecter en SSH sur les machiches virtuelles de services:  De Elf, on peut se connecter a Kasav&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/# ssh root@192.168.50.3&lt;br /&gt;
root@192.168.50.3's password: &lt;br /&gt;
Linux Kasav 4.19.0-26-amd64 #1 SMP Debian 4.19.304-1 (2024-01-09) x86_64&lt;br /&gt;
&lt;br /&gt;
The programs included with the Devuan GNU/Linux system are free software;&lt;br /&gt;
the exact distribution terms for each program are described in the&lt;br /&gt;
individual files in /usr/share/doc/*/copyright.&lt;br /&gt;
&lt;br /&gt;
Devuan GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent&lt;br /&gt;
permitted by applicable law.&lt;br /&gt;
Last login: Tue Feb  3 11:34:45 2026 from 192.168.50.12&lt;br /&gt;
root@Kasav:~# &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Serveur DNS''' ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/etc/bind# dig @localhost elvis21.tech    &lt;br /&gt;
&lt;br /&gt;
; &amp;lt;&amp;lt;&amp;gt;&amp;gt; DiG 9.20.18-1~deb13u1-Debian &amp;lt;&amp;lt;&amp;gt;&amp;gt; @localhost elvis21.tech&lt;br /&gt;
; (1 server found)&lt;br /&gt;
;; global options: +cmd&lt;br /&gt;
;; Got answer:&lt;br /&gt;
;; -&amp;gt;&amp;gt;HEADER&amp;lt;&amp;lt;- opcode: QUERY, status: NOERROR, id: 45747&lt;br /&gt;
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 1&lt;br /&gt;
&lt;br /&gt;
;; OPT PSEUDOSECTION:&lt;br /&gt;
; EDNS: version: 0, flags:; udp: 1232&lt;br /&gt;
; COOKIE: 294762ee3edf0a910100000069821bb2626fa0b2f806960f (good)&lt;br /&gt;
;; QUESTION SECTION:&lt;br /&gt;
;elvis21.tech.			IN	A&lt;br /&gt;
&lt;br /&gt;
;; AUTHORITY SECTION:&lt;br /&gt;
elvis21.tech.		86400	IN	SOA	ns1.elvis21.shop. admin.elvis21.shop. 3298267246 3600 1800 604800 86400&lt;br /&gt;
&lt;br /&gt;
;; Query time: 0 msec&lt;br /&gt;
;; SERVER: 127.0.0.1#53(localhost) (UDP)&lt;br /&gt;
;; WHEN: Tue Feb 03 16:00:50 UTC 2026&lt;br /&gt;
;; MSG SIZE  rcvd: 127&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
$TTL 86400&lt;br /&gt;
@ IN SOA ns1.elvis21.tech. admin.elvis21.tech. (&lt;br /&gt;
        3298267246      ;Version&lt;br /&gt;
        3600            ;Refresh&lt;br /&gt;
        1800            ;Retry&lt;br /&gt;
        604800          ;Expire&lt;br /&gt;
        86400 )         ;Minimum TTL&lt;br /&gt;
;&lt;br /&gt;
@  IN NS ns1.elvis21.tech.&lt;br /&gt;
&lt;br /&gt;
ns1 IN A 192.168.50.12&lt;br /&gt;
ns2 IN A 192.168.50.1&lt;br /&gt;
 IN A 192.168.50.12&lt;br /&gt;
      IN AAAA 2001:660:4401:60a0:216:3eff:fe83:a3c8&lt;br /&gt;
www IN A 192.168.50.12&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/etc/bind# cat named.conf.local &lt;br /&gt;
zone &amp;quot;elvis21.tech&amp;quot; {&lt;br /&gt;
    type primary;&lt;br /&gt;
    file &amp;quot;/etc/bind/zones/db.elvis21.tech&amp;quot;;&lt;br /&gt;
    allow-transfer {&lt;br /&gt;
      2001:660:4401:60a0:216:3eff:fe70:7f1c;&lt;br /&gt;
      2001:660:4401:60a0:216:3eff:fe9a:ea1c;&lt;br /&gt;
      };&lt;br /&gt;
    also-notify { 2001:660:4401:60a0:216:3eff:fe70:7f1c; };&lt;br /&gt;
    inline-signing yes;   // DNSSEC automatique&lt;br /&gt;
    key-directory &amp;quot;/etc/bind/keys&amp;quot;; // répertoire des clefs, attention aux droits&lt;br /&gt;
    dnssec-policy &amp;quot;dnssecpolicy&amp;quot;;  // politique pour les clefs de chiffrement&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
zone &amp;quot;kasav.online&amp;quot; {&lt;br /&gt;
    type secondary;&lt;br /&gt;
    file &amp;quot;/etc/bind/backup/db.kasav.online&amp;quot;;&lt;br /&gt;
    primaries { 2001:660:4401:60a0:216:3eff:fe9a:ea1c; };&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
dnssec-policy &amp;quot;dnssecpolicy&amp;quot; {&lt;br /&gt;
  keys {&lt;br /&gt;
    ksk key-directory lifetime unlimited algorithm 13;&lt;br /&gt;
    zsk key-directory lifetime unlimited algorithm 13;&lt;br /&gt;
  };&lt;br /&gt;
  nsec3param;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/etc/bind# named-checkzone elvis21.tech /etc/bind/db.elvis21.tech&lt;br /&gt;
zone elvis21.tech/IN: loaded serial 3298267246&lt;br /&gt;
OK&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
openssl req -nodes -newkey rsa:2048 -sha256 -keyout elvis21.tech.key -out elvis21.csr&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
[[Fichier:ImageDns.png|gauche|vignette|994x994px]]&lt;br /&gt;
&lt;br /&gt;
== Mise en place du serveur Apache (http et https) ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
apt update&lt;br /&gt;
apt install apache2&lt;br /&gt;
systemctl enable --now apache2&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Vsouopme</name></author>
	</entry>
	<entry>
		<id>https://wiki-se.plil.fr/mediawiki/index.php?title=Atelier_SysRes_SE4_2025/2026_E11&amp;diff=12071</id>
		<title>Atelier SysRes SE4 2025/2026 E11</title>
		<link rel="alternate" type="text/html" href="https://wiki-se.plil.fr/mediawiki/index.php?title=Atelier_SysRes_SE4_2025/2026_E11&amp;diff=12071"/>
		<updated>2026-02-04T11:55:57Z</updated>

		<summary type="html">&lt;p&gt;Vsouopme : /* Serveur DNS */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Projet Virtualisation /Administration Systeme-Réseau - Machine SE4.Elf =&lt;br /&gt;
Dans le cadre de ce projet, nnous avons déployés une infrastructure composée de '''deux machines dédiées aux services''' et d’une '''machine mandataire''', le tout à l’aide de l'environnement  '''Xen.'''&lt;br /&gt;
&lt;br /&gt;
== Création des machines virtuelles ==&lt;br /&gt;
Les machines sont créées  sur le Dom0 '''Capbreton.plil.info''' en faisant un '''ssh root@capbreton.plil.info''' &lt;br /&gt;
&lt;br /&gt;
Sur la capbreton.plil.info, &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
xen create-image --hostname=SE4.Elf --dhcp --dir=/usr/local/xen --size=10G --dist=excalibur --memory=2G --bridge=Styx --force&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; '''Xen-create-image''' :  Commande permettant de créer une nouvelle machine virtuelle Xen&lt;br /&gt;
&lt;br /&gt;
'''--hostname=SE4.Elf :''' Pour le nom de la machine &lt;br /&gt;
&lt;br /&gt;
'''--size=10G''' : La taille du disque &lt;br /&gt;
&lt;br /&gt;
'''--bridge=Styx''' : Le nom du bridge &lt;br /&gt;
&lt;br /&gt;
Par la suite il faut creer un fichier dans le répertoire &amp;lt;code&amp;gt;/etc/network/interfaces.d&amp;lt;/code&amp;gt; du Dom0 pour créer notre pont. (NB: Il faut noter que cette etape on peut la faire avant la creation de notre VM&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
auto Styx&lt;br /&gt;
&lt;br /&gt;
iface Styx inet manual&lt;br /&gt;
   bridge_ports none&lt;br /&gt;
   up ip link set $IFACE up&lt;br /&gt;
   down ip link set $IFACE down&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;La commande '''xen list :''' Affiche les '''machines virtuelles''' (VM) qui sont actuellement gérées par Xen (Elle fait la liste des VM allumée).&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
root@capbreton:~# xen list&lt;br /&gt;
SE4.batman                                 322  2048     1     -b----      37.5&lt;br /&gt;
SE4.Moon                                   326  2048     1     -b----      41.1&lt;br /&gt;
SE4.C2                                     332  1024     1     -b----      18.1&lt;br /&gt;
SE4.Tension                                343  2048     1     -b----       7.8&lt;br /&gt;
SE4.CachyOS                                365  2048     1     -b----      10.2&lt;br /&gt;
SE4.RockStar                               367  2048     1     -b----       6.1&lt;br /&gt;
SE4.Kasav                                  368  2048     1     -b----       5.9&lt;br /&gt;
SE4.Elf                                    369  2048     1     -b----       5.6&lt;br /&gt;
SE4.catwoman                               370  2048     1     -b----       6.1&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;-La commande '''xen create /etc/xen/SE4.Elf.cfg''' permet d'allumer la Machine virtuellle.&lt;br /&gt;
&lt;br /&gt;
-La commande xen '''console SE4.Elf''' permet d'acceder  / de se connecter  a la VM.&lt;br /&gt;
&lt;br /&gt;
-La commande '''xen shutdown''' '''SE4.Elf''' permet d'eteindre la machine virtuelle.&lt;br /&gt;
&lt;br /&gt;
Lors de la tentative de connexion, il y'a une un probleme , pour y remedier,  '''Ctrl + AltGr + ] =&amp;gt; vi =&amp;gt; :q! =&amp;gt; reconnexion'''&lt;br /&gt;
&lt;br /&gt;
Pour voir le mot de passe de la VM, '''cat /var/log/xen-tools/SE4.Elf.log'''&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
Installation Summary&lt;br /&gt;
---------------------&lt;br /&gt;
Hostname        :  SE4.Elf&lt;br /&gt;
Distribution    :  excalibur&lt;br /&gt;
MAC Address     :  00:16:3E:83:A3:C7&lt;br /&gt;
IP Address(es)  :  dynamic&lt;br /&gt;
SSH Fingerprint :  SHA256:IrPhxhB4m1s+eaPaLynS6NlE/HfL78+y3ba3DPuHFQU (DSA)&lt;br /&gt;
SSH Fingerprint :  SHA256:RT+MZtlFxC7BrdYORzOcxDX+SKsJrLzOGWWngX2pKz4 (ECDSA)&lt;br /&gt;
SSH Fingerprint :  SHA256:aLYvYqUPX2Q/J5P0nTpdpMyrFD5xopRqkFKuYb7QUo4 (ED25519)&lt;br /&gt;
SSH Fingerprint :  SHA256:b0ddm9FYx4/losJU8/pE9MXx7102ygkAMjChOvPlNhE (RSA)&lt;br /&gt;
Root Password   :  X&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;- La commande '''vi /etc/hostname''' pour changer le nom de la VM&lt;br /&gt;
&lt;br /&gt;
== '''Configuration de la Machine de Services''' ==&lt;br /&gt;
Il faut creer deux partitions LVM de 10G pour votre machine virtuelle et modifiez le fichier de configuration de la machine virtuelle de services pour faire en sorte que les répertoires &amp;lt;code&amp;gt;/'''var'''&amp;lt;/code&amp;gt; et &amp;lt;code&amp;gt;'''/home'''&amp;lt;/code&amp;gt; de la machine virtuelle soient implantés sur ces partitions LVM&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
SE4.Poseidon.home lv_home_SE4Elf lv_var_SE4Elf  SE4.Gaby.home SE4.Poseidon.var SE4.Gaby.var &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Serveur SSH''' ==&lt;br /&gt;
Notre machine virtuelle doit etre accessible par SSH, on autorise donc l'accès par l'utilisateur '''Root en modifiant le fichier de de configuration &amp;lt;code&amp;gt;/etc/ssh/sshd_config  :&amp;lt;/code&amp;gt;'''&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
PermitRootLogin yes&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Il faut ensuite redemarrer le serveur ssh en faisant :&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/etc/ssh# /etc/init.d/ssh restart&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Pour gérer la redirection du SSH, on doit configurer '''nftables''' sur nos machines de service en redirigeant les ports 2201 et 2202&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
nft add table ip nat&lt;br /&gt;
nft add chain ip nat PREROUTING { type nat hook prerouting priority 0 \; }&lt;br /&gt;
nft add rule ip nat PREROUTING tcp dport 2201 dnat to 192.168.50.12:22                 &lt;br /&gt;
nft add rule ip nat PREROUTING tcp dport 2202 dnat to 192.168.50.3:22              &lt;br /&gt;
nft add chain ip nat POSTROUTING { type nat hook postrouting priority 100 \; }&lt;br /&gt;
nft add rule ip nat POSTROUTING masquerade&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Maintenant, on peut se connecter en SSH sur les machiches virtuelles de services:  De Elf, on peut se connecter a Kasav&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/# ssh root@192.168.50.3&lt;br /&gt;
root@192.168.50.3's password: &lt;br /&gt;
Linux Kasav 4.19.0-26-amd64 #1 SMP Debian 4.19.304-1 (2024-01-09) x86_64&lt;br /&gt;
&lt;br /&gt;
The programs included with the Devuan GNU/Linux system are free software;&lt;br /&gt;
the exact distribution terms for each program are described in the&lt;br /&gt;
individual files in /usr/share/doc/*/copyright.&lt;br /&gt;
&lt;br /&gt;
Devuan GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent&lt;br /&gt;
permitted by applicable law.&lt;br /&gt;
Last login: Tue Feb  3 11:34:45 2026 from 192.168.50.12&lt;br /&gt;
root@Kasav:~# &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Serveur DNS''' ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/etc/bind# dig @localhost elvis21.tech    &lt;br /&gt;
&lt;br /&gt;
; &amp;lt;&amp;lt;&amp;gt;&amp;gt; DiG 9.20.18-1~deb13u1-Debian &amp;lt;&amp;lt;&amp;gt;&amp;gt; @localhost elvis21.tech&lt;br /&gt;
; (1 server found)&lt;br /&gt;
;; global options: +cmd&lt;br /&gt;
;; Got answer:&lt;br /&gt;
;; -&amp;gt;&amp;gt;HEADER&amp;lt;&amp;lt;- opcode: QUERY, status: NOERROR, id: 45747&lt;br /&gt;
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 1&lt;br /&gt;
&lt;br /&gt;
;; OPT PSEUDOSECTION:&lt;br /&gt;
; EDNS: version: 0, flags:; udp: 1232&lt;br /&gt;
; COOKIE: 294762ee3edf0a910100000069821bb2626fa0b2f806960f (good)&lt;br /&gt;
;; QUESTION SECTION:&lt;br /&gt;
;elvis21.tech.			IN	A&lt;br /&gt;
&lt;br /&gt;
;; AUTHORITY SECTION:&lt;br /&gt;
elvis21.tech.		86400	IN	SOA	ns1.elvis21.shop. admin.elvis21.shop. 3298267246 3600 1800 604800 86400&lt;br /&gt;
&lt;br /&gt;
;; Query time: 0 msec&lt;br /&gt;
;; SERVER: 127.0.0.1#53(localhost) (UDP)&lt;br /&gt;
;; WHEN: Tue Feb 03 16:00:50 UTC 2026&lt;br /&gt;
;; MSG SIZE  rcvd: 127&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
$TTL 86400&lt;br /&gt;
@ IN SOA ns1.elvis21.tech. admin.elvis21.tech. (&lt;br /&gt;
        3298267246      ;Version&lt;br /&gt;
        3600            ;Refresh&lt;br /&gt;
        1800            ;Retry&lt;br /&gt;
        604800          ;Expire&lt;br /&gt;
        86400 )         ;Minimum TTL&lt;br /&gt;
;&lt;br /&gt;
@  IN NS ns1.elvis21.tech.&lt;br /&gt;
&lt;br /&gt;
ns1 IN A 192.168.50.12&lt;br /&gt;
ns2 IN A 192.168.50.1&lt;br /&gt;
 IN A 192.168.50.12&lt;br /&gt;
      IN AAAA 2001:660:4401:60a0:216:3eff:fe83:a3c8&lt;br /&gt;
www IN A 192.168.50.12&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/etc/bind# cat named.conf.local &lt;br /&gt;
zone &amp;quot;elvis21.tech&amp;quot; {&lt;br /&gt;
    type primary;&lt;br /&gt;
    file &amp;quot;/etc/bind/zones/db.elvis21.tech&amp;quot;;&lt;br /&gt;
    allow-transfer {&lt;br /&gt;
      2001:660:4401:60a0:216:3eff:fe70:7f1c;&lt;br /&gt;
      2001:660:4401:60a0:216:3eff:fe9a:ea1c;&lt;br /&gt;
      };&lt;br /&gt;
    also-notify { 2001:660:4401:60a0:216:3eff:fe70:7f1c; };&lt;br /&gt;
    inline-signing yes;   // DNSSEC automatique&lt;br /&gt;
    key-directory &amp;quot;/etc/bind/keys&amp;quot;; // répertoire des clefs, attention aux droits&lt;br /&gt;
    dnssec-policy &amp;quot;dnssecpolicy&amp;quot;;  // politique pour les clefs de chiffrement&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
zone &amp;quot;kasav.online&amp;quot; {&lt;br /&gt;
    type secondary;&lt;br /&gt;
    file &amp;quot;/etc/bind/backup/db.kasav.online&amp;quot;;&lt;br /&gt;
    primaries { 2001:660:4401:60a0:216:3eff:fe9a:ea1c; };&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
dnssec-policy &amp;quot;dnssecpolicy&amp;quot; {&lt;br /&gt;
  keys {&lt;br /&gt;
    ksk key-directory lifetime unlimited algorithm 13;&lt;br /&gt;
    zsk key-directory lifetime unlimited algorithm 13;&lt;br /&gt;
  };&lt;br /&gt;
  nsec3param;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/etc/bind# named-checkzone elvis21.tech /etc/bind/db.elvis21.tech&lt;br /&gt;
zone elvis21.tech/IN: loaded serial 3298267246&lt;br /&gt;
OK&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
openssl req -nodes -newkey rsa:2048 -sha256 -keyout elvis21.tech.key -out elvis21.csr&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
[[Fichier:ImageDns.png|gauche|vignette|994x994px]]&lt;/div&gt;</summary>
		<author><name>Vsouopme</name></author>
	</entry>
	<entry>
		<id>https://wiki-se.plil.fr/mediawiki/index.php?title=Fichier:ImageDns.png&amp;diff=12070</id>
		<title>Fichier:ImageDns.png</title>
		<link rel="alternate" type="text/html" href="https://wiki-se.plil.fr/mediawiki/index.php?title=Fichier:ImageDns.png&amp;diff=12070"/>
		<updated>2026-02-04T11:54:42Z</updated>

		<summary type="html">&lt;p&gt;Vsouopme : &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;DnsCheck&lt;/div&gt;</summary>
		<author><name>Vsouopme</name></author>
	</entry>
	<entry>
		<id>https://wiki-se.plil.fr/mediawiki/index.php?title=Atelier_SysRes_SE4_2025/2026_E11&amp;diff=12069</id>
		<title>Atelier SysRes SE4 2025/2026 E11</title>
		<link rel="alternate" type="text/html" href="https://wiki-se.plil.fr/mediawiki/index.php?title=Atelier_SysRes_SE4_2025/2026_E11&amp;diff=12069"/>
		<updated>2026-02-04T11:30:26Z</updated>

		<summary type="html">&lt;p&gt;Vsouopme : /* Serveur DNS */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Projet Virtualisation /Administration Systeme-Réseau - Machine SE4.Elf =&lt;br /&gt;
Dans le cadre de ce projet, nnous avons déployés une infrastructure composée de '''deux machines dédiées aux services''' et d’une '''machine mandataire''', le tout à l’aide de l'environnement  '''Xen.'''&lt;br /&gt;
&lt;br /&gt;
== Création des machines virtuelles ==&lt;br /&gt;
Les machines sont créées  sur le Dom0 '''Capbreton.plil.info''' en faisant un '''ssh root@capbreton.plil.info''' &lt;br /&gt;
&lt;br /&gt;
Sur la capbreton.plil.info, &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
xen create-image --hostname=SE4.Elf --dhcp --dir=/usr/local/xen --size=10G --dist=excalibur --memory=2G --bridge=Styx --force&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; '''Xen-create-image''' :  Commande permettant de créer une nouvelle machine virtuelle Xen&lt;br /&gt;
&lt;br /&gt;
'''--hostname=SE4.Elf :''' Pour le nom de la machine &lt;br /&gt;
&lt;br /&gt;
'''--size=10G''' : La taille du disque &lt;br /&gt;
&lt;br /&gt;
'''--bridge=Styx''' : Le nom du bridge &lt;br /&gt;
&lt;br /&gt;
Par la suite il faut creer un fichier dans le répertoire &amp;lt;code&amp;gt;/etc/network/interfaces.d&amp;lt;/code&amp;gt; du Dom0 pour créer notre pont. (NB: Il faut noter que cette etape on peut la faire avant la creation de notre VM&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
auto Styx&lt;br /&gt;
&lt;br /&gt;
iface Styx inet manual&lt;br /&gt;
   bridge_ports none&lt;br /&gt;
   up ip link set $IFACE up&lt;br /&gt;
   down ip link set $IFACE down&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;La commande '''xen list :''' Affiche les '''machines virtuelles''' (VM) qui sont actuellement gérées par Xen (Elle fait la liste des VM allumée).&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
root@capbreton:~# xen list&lt;br /&gt;
SE4.batman                                 322  2048     1     -b----      37.5&lt;br /&gt;
SE4.Moon                                   326  2048     1     -b----      41.1&lt;br /&gt;
SE4.C2                                     332  1024     1     -b----      18.1&lt;br /&gt;
SE4.Tension                                343  2048     1     -b----       7.8&lt;br /&gt;
SE4.CachyOS                                365  2048     1     -b----      10.2&lt;br /&gt;
SE4.RockStar                               367  2048     1     -b----       6.1&lt;br /&gt;
SE4.Kasav                                  368  2048     1     -b----       5.9&lt;br /&gt;
SE4.Elf                                    369  2048     1     -b----       5.6&lt;br /&gt;
SE4.catwoman                               370  2048     1     -b----       6.1&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;-La commande '''xen create /etc/xen/SE4.Elf.cfg''' permet d'allumer la Machine virtuellle.&lt;br /&gt;
&lt;br /&gt;
-La commande xen '''console SE4.Elf''' permet d'acceder  / de se connecter  a la VM.&lt;br /&gt;
&lt;br /&gt;
-La commande '''xen shutdown''' '''SE4.Elf''' permet d'eteindre la machine virtuelle.&lt;br /&gt;
&lt;br /&gt;
Lors de la tentative de connexion, il y'a une un probleme , pour y remedier,  '''Ctrl + AltGr + ] =&amp;gt; vi =&amp;gt; :q! =&amp;gt; reconnexion'''&lt;br /&gt;
&lt;br /&gt;
Pour voir le mot de passe de la VM, '''cat /var/log/xen-tools/SE4.Elf.log'''&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
Installation Summary&lt;br /&gt;
---------------------&lt;br /&gt;
Hostname        :  SE4.Elf&lt;br /&gt;
Distribution    :  excalibur&lt;br /&gt;
MAC Address     :  00:16:3E:83:A3:C7&lt;br /&gt;
IP Address(es)  :  dynamic&lt;br /&gt;
SSH Fingerprint :  SHA256:IrPhxhB4m1s+eaPaLynS6NlE/HfL78+y3ba3DPuHFQU (DSA)&lt;br /&gt;
SSH Fingerprint :  SHA256:RT+MZtlFxC7BrdYORzOcxDX+SKsJrLzOGWWngX2pKz4 (ECDSA)&lt;br /&gt;
SSH Fingerprint :  SHA256:aLYvYqUPX2Q/J5P0nTpdpMyrFD5xopRqkFKuYb7QUo4 (ED25519)&lt;br /&gt;
SSH Fingerprint :  SHA256:b0ddm9FYx4/losJU8/pE9MXx7102ygkAMjChOvPlNhE (RSA)&lt;br /&gt;
Root Password   :  X&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;- La commande '''vi /etc/hostname''' pour changer le nom de la VM&lt;br /&gt;
&lt;br /&gt;
== '''Configuration de la Machine de Services''' ==&lt;br /&gt;
Il faut creer deux partitions LVM de 10G pour votre machine virtuelle et modifiez le fichier de configuration de la machine virtuelle de services pour faire en sorte que les répertoires &amp;lt;code&amp;gt;/'''var'''&amp;lt;/code&amp;gt; et &amp;lt;code&amp;gt;'''/home'''&amp;lt;/code&amp;gt; de la machine virtuelle soient implantés sur ces partitions LVM&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
SE4.Poseidon.home lv_home_SE4Elf lv_var_SE4Elf  SE4.Gaby.home SE4.Poseidon.var SE4.Gaby.var &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Serveur SSH''' ==&lt;br /&gt;
Notre machine virtuelle doit etre accessible par SSH, on autorise donc l'accès par l'utilisateur '''Root en modifiant le fichier de de configuration &amp;lt;code&amp;gt;/etc/ssh/sshd_config  :&amp;lt;/code&amp;gt;'''&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
PermitRootLogin yes&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Il faut ensuite redemarrer le serveur ssh en faisant :&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/etc/ssh# /etc/init.d/ssh restart&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Pour gérer la redirection du SSH, on doit configurer '''nftables''' sur nos machines de service en redirigeant les ports 2201 et 2202&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
nft add table ip nat&lt;br /&gt;
nft add chain ip nat PREROUTING { type nat hook prerouting priority 0 \; }&lt;br /&gt;
nft add rule ip nat PREROUTING tcp dport 2201 dnat to 192.168.50.12:22                 &lt;br /&gt;
nft add rule ip nat PREROUTING tcp dport 2202 dnat to 192.168.50.3:22              &lt;br /&gt;
nft add chain ip nat POSTROUTING { type nat hook postrouting priority 100 \; }&lt;br /&gt;
nft add rule ip nat POSTROUTING masquerade&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Maintenant, on peut se connecter en SSH sur les machiches virtuelles de services:  De Elf, on peut se connecter a Kasav&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/# ssh root@192.168.50.3&lt;br /&gt;
root@192.168.50.3's password: &lt;br /&gt;
Linux Kasav 4.19.0-26-amd64 #1 SMP Debian 4.19.304-1 (2024-01-09) x86_64&lt;br /&gt;
&lt;br /&gt;
The programs included with the Devuan GNU/Linux system are free software;&lt;br /&gt;
the exact distribution terms for each program are described in the&lt;br /&gt;
individual files in /usr/share/doc/*/copyright.&lt;br /&gt;
&lt;br /&gt;
Devuan GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent&lt;br /&gt;
permitted by applicable law.&lt;br /&gt;
Last login: Tue Feb  3 11:34:45 2026 from 192.168.50.12&lt;br /&gt;
root@Kasav:~# &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Serveur DNS''' ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/etc/bind# dig @localhost elvis21.tech    &lt;br /&gt;
&lt;br /&gt;
; &amp;lt;&amp;lt;&amp;gt;&amp;gt; DiG 9.20.18-1~deb13u1-Debian &amp;lt;&amp;lt;&amp;gt;&amp;gt; @localhost elvis21.tech&lt;br /&gt;
; (1 server found)&lt;br /&gt;
;; global options: +cmd&lt;br /&gt;
;; Got answer:&lt;br /&gt;
;; -&amp;gt;&amp;gt;HEADER&amp;lt;&amp;lt;- opcode: QUERY, status: NOERROR, id: 45747&lt;br /&gt;
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 1&lt;br /&gt;
&lt;br /&gt;
;; OPT PSEUDOSECTION:&lt;br /&gt;
; EDNS: version: 0, flags:; udp: 1232&lt;br /&gt;
; COOKIE: 294762ee3edf0a910100000069821bb2626fa0b2f806960f (good)&lt;br /&gt;
;; QUESTION SECTION:&lt;br /&gt;
;elvis21.tech.			IN	A&lt;br /&gt;
&lt;br /&gt;
;; AUTHORITY SECTION:&lt;br /&gt;
elvis21.tech.		86400	IN	SOA	ns1.elvis21.shop. admin.elvis21.shop. 3298267246 3600 1800 604800 86400&lt;br /&gt;
&lt;br /&gt;
;; Query time: 0 msec&lt;br /&gt;
;; SERVER: 127.0.0.1#53(localhost) (UDP)&lt;br /&gt;
;; WHEN: Tue Feb 03 16:00:50 UTC 2026&lt;br /&gt;
;; MSG SIZE  rcvd: 127&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
$TTL 86400&lt;br /&gt;
@ IN SOA ns1.elvis21.tech. admin.elvis21.tech. (&lt;br /&gt;
        3298267246      ;Version&lt;br /&gt;
        3600            ;Refresh&lt;br /&gt;
        1800            ;Retry&lt;br /&gt;
        604800          ;Expire&lt;br /&gt;
        86400 )         ;Minimum TTL&lt;br /&gt;
;&lt;br /&gt;
@  IN NS ns1.elvis21.tech.&lt;br /&gt;
&lt;br /&gt;
ns1 IN A 192.168.50.12&lt;br /&gt;
ns2 IN A 192.168.50.1&lt;br /&gt;
 IN A 192.168.50.12&lt;br /&gt;
      IN AAAA 2001:660:4401:60a0:216:3eff:fe83:a3c8&lt;br /&gt;
www IN A 192.168.50.12&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/etc/bind# cat named.conf.local &lt;br /&gt;
zone &amp;quot;elvis21.tech&amp;quot; {&lt;br /&gt;
    type primary;&lt;br /&gt;
    file &amp;quot;/etc/bind/zones/db.elvis21.tech&amp;quot;;&lt;br /&gt;
    allow-transfer {&lt;br /&gt;
      2001:660:4401:60a0:216:3eff:fe70:7f1c;&lt;br /&gt;
      2001:660:4401:60a0:216:3eff:fe9a:ea1c;&lt;br /&gt;
      };&lt;br /&gt;
    also-notify { 2001:660:4401:60a0:216:3eff:fe70:7f1c; };&lt;br /&gt;
    inline-signing yes;   // DNSSEC automatique&lt;br /&gt;
    key-directory &amp;quot;/etc/bind/keys&amp;quot;; // répertoire des clefs, attention aux droits&lt;br /&gt;
    dnssec-policy &amp;quot;dnssecpolicy&amp;quot;;  // politique pour les clefs de chiffrement&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
zone &amp;quot;kasav.online&amp;quot; {&lt;br /&gt;
    type secondary;&lt;br /&gt;
    file &amp;quot;/etc/bind/backup/db.kasav.online&amp;quot;;&lt;br /&gt;
    primaries { 2001:660:4401:60a0:216:3eff:fe9a:ea1c; };&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
dnssec-policy &amp;quot;dnssecpolicy&amp;quot; {&lt;br /&gt;
  keys {&lt;br /&gt;
    ksk key-directory lifetime unlimited algorithm 13;&lt;br /&gt;
    zsk key-directory lifetime unlimited algorithm 13;&lt;br /&gt;
  };&lt;br /&gt;
  nsec3param;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/etc/bind# named-checkzone elvis21.tech /etc/bind/db.elvis21.tech&lt;br /&gt;
zone elvis21.tech/IN: loaded serial 3298267246&lt;br /&gt;
OK&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
openssl req -nodes -newkey rsa:2048 -sha256 -keyout elvis21.tech.key -out elvis21.csr&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Vsouopme</name></author>
	</entry>
	<entry>
		<id>https://wiki-se.plil.fr/mediawiki/index.php?title=Atelier_SysRes_SE4_2025/2026_E11&amp;diff=12050</id>
		<title>Atelier SysRes SE4 2025/2026 E11</title>
		<link rel="alternate" type="text/html" href="https://wiki-se.plil.fr/mediawiki/index.php?title=Atelier_SysRes_SE4_2025/2026_E11&amp;diff=12050"/>
		<updated>2026-02-03T17:35:09Z</updated>

		<summary type="html">&lt;p&gt;Vsouopme : /* Serveur DNS */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Projet Virtualisation /Administration Systeme-Réseau - Machine SE4.Elf =&lt;br /&gt;
Dans le cadre de ce projet, nnous avons déployés une infrastructure composée de '''deux machines dédiées aux services''' et d’une '''machine mandataire''', le tout à l’aide de l'environnement  '''Xen.'''&lt;br /&gt;
&lt;br /&gt;
== Création des machines virtuelles ==&lt;br /&gt;
Les machines sont créées  sur le Dom0 '''Capbreton.plil.info''' en faisant un '''ssh root@capbreton.plil.info''' &lt;br /&gt;
&lt;br /&gt;
Sur la capbreton.plil.info, &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
xen create-image --hostname=SE4.Elf --dhcp --dir=/usr/local/xen --size=10G --dist=excalibur --memory=2G --bridge=Styx --force&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; '''Xen-create-image''' :  Commande permettant de créer une nouvelle machine virtuelle Xen&lt;br /&gt;
&lt;br /&gt;
'''--hostname=SE4.Elf :''' Pour le nom de la machine &lt;br /&gt;
&lt;br /&gt;
'''--size=10G''' : La taille du disque &lt;br /&gt;
&lt;br /&gt;
'''--bridge=Styx''' : Le nom du bridge &lt;br /&gt;
&lt;br /&gt;
Par la suite il faut creer un fichier dans le répertoire &amp;lt;code&amp;gt;/etc/network/interfaces.d&amp;lt;/code&amp;gt; du Dom0 pour créer notre pont. (NB: Il faut noter que cette etape on peut la faire avant la creation de notre VM&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
auto Styx&lt;br /&gt;
&lt;br /&gt;
iface Styx inet manual&lt;br /&gt;
   bridge_ports none&lt;br /&gt;
   up ip link set $IFACE up&lt;br /&gt;
   down ip link set $IFACE down&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;La commande '''xen list :''' Affiche les '''machines virtuelles''' (VM) qui sont actuellement gérées par Xen (Elle fait la liste des VM allumée).&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
root@capbreton:~# xen list&lt;br /&gt;
SE4.batman                                 322  2048     1     -b----      37.5&lt;br /&gt;
SE4.Moon                                   326  2048     1     -b----      41.1&lt;br /&gt;
SE4.C2                                     332  1024     1     -b----      18.1&lt;br /&gt;
SE4.Tension                                343  2048     1     -b----       7.8&lt;br /&gt;
SE4.CachyOS                                365  2048     1     -b----      10.2&lt;br /&gt;
SE4.RockStar                               367  2048     1     -b----       6.1&lt;br /&gt;
SE4.Kasav                                  368  2048     1     -b----       5.9&lt;br /&gt;
SE4.Elf                                    369  2048     1     -b----       5.6&lt;br /&gt;
SE4.catwoman                               370  2048     1     -b----       6.1&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;-La commande '''xen create /etc/xen/SE4.Elf.cfg''' permet d'allumer la Machine virtuellle.&lt;br /&gt;
&lt;br /&gt;
-La commande xen '''console SE4.Elf''' permet d'acceder  / de se connecter  a la VM.&lt;br /&gt;
&lt;br /&gt;
-La commande '''xen shutdown''' '''SE4.Elf''' permet d'eteindre la machine virtuelle.&lt;br /&gt;
&lt;br /&gt;
Lors de la tentative de connexion, il y'a une un probleme , pour y remedier,  '''Ctrl + AltGr + ] =&amp;gt; vi =&amp;gt; :q! =&amp;gt; reconnexion'''&lt;br /&gt;
&lt;br /&gt;
Pour voir le mot de passe de la VM, '''cat /var/log/xen-tools/SE4.Elf.log'''&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
Installation Summary&lt;br /&gt;
---------------------&lt;br /&gt;
Hostname        :  SE4.Elf&lt;br /&gt;
Distribution    :  excalibur&lt;br /&gt;
MAC Address     :  00:16:3E:83:A3:C7&lt;br /&gt;
IP Address(es)  :  dynamic&lt;br /&gt;
SSH Fingerprint :  SHA256:IrPhxhB4m1s+eaPaLynS6NlE/HfL78+y3ba3DPuHFQU (DSA)&lt;br /&gt;
SSH Fingerprint :  SHA256:RT+MZtlFxC7BrdYORzOcxDX+SKsJrLzOGWWngX2pKz4 (ECDSA)&lt;br /&gt;
SSH Fingerprint :  SHA256:aLYvYqUPX2Q/J5P0nTpdpMyrFD5xopRqkFKuYb7QUo4 (ED25519)&lt;br /&gt;
SSH Fingerprint :  SHA256:b0ddm9FYx4/losJU8/pE9MXx7102ygkAMjChOvPlNhE (RSA)&lt;br /&gt;
Root Password   :  X&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;- La commande '''vi /etc/hostname''' pour changer le nom de la VM&lt;br /&gt;
&lt;br /&gt;
== '''Configuration de la Machine de Services''' ==&lt;br /&gt;
Il faut creer deux partitions LVM de 10G pour votre machine virtuelle et modifiez le fichier de configuration de la machine virtuelle de services pour faire en sorte que les répertoires &amp;lt;code&amp;gt;/'''var'''&amp;lt;/code&amp;gt; et &amp;lt;code&amp;gt;'''/home'''&amp;lt;/code&amp;gt; de la machine virtuelle soient implantés sur ces partitions LVM&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
SE4.Poseidon.home lv_home_SE4Elf lv_var_SE4Elf  SE4.Gaby.home SE4.Poseidon.var SE4.Gaby.var &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Serveur SSH''' ==&lt;br /&gt;
Notre machine virtuelle doit etre accessible par SSH, on autorise donc l'accès par l'utilisateur '''Root en modifiant le fichier de de configuration &amp;lt;code&amp;gt;/etc/ssh/sshd_config  :&amp;lt;/code&amp;gt;'''&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
PermitRootLogin yes&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Il faut ensuite redemarrer le serveur ssh en faisant :&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/etc/ssh# /etc/init.d/ssh restart&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Pour gérer la redirection du SSH, on doit configurer '''nftables''' sur nos machines de service en redirigeant les ports 2201 et 2202&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
nft add table ip nat&lt;br /&gt;
nft add chain ip nat PREROUTING { type nat hook prerouting priority 0 \; }&lt;br /&gt;
nft add rule ip nat PREROUTING tcp dport 2201 dnat to 192.168.50.12:22                 &lt;br /&gt;
nft add rule ip nat PREROUTING tcp dport 2202 dnat to 192.168.50.3:22              &lt;br /&gt;
nft add chain ip nat POSTROUTING { type nat hook postrouting priority 100 \; }&lt;br /&gt;
nft add rule ip nat POSTROUTING masquerade&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Maintenant, on peut se connecter en SSH sur les machiches virtuelles de services:  De Elf, on peut se connecter a Kasav&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/# ssh root@192.168.50.3&lt;br /&gt;
root@192.168.50.3's password: &lt;br /&gt;
Linux Kasav 4.19.0-26-amd64 #1 SMP Debian 4.19.304-1 (2024-01-09) x86_64&lt;br /&gt;
&lt;br /&gt;
The programs included with the Devuan GNU/Linux system are free software;&lt;br /&gt;
the exact distribution terms for each program are described in the&lt;br /&gt;
individual files in /usr/share/doc/*/copyright.&lt;br /&gt;
&lt;br /&gt;
Devuan GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent&lt;br /&gt;
permitted by applicable law.&lt;br /&gt;
Last login: Tue Feb  3 11:34:45 2026 from 192.168.50.12&lt;br /&gt;
root@Kasav:~# &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Serveur DNS''' ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
$TTL 86400&lt;br /&gt;
@ IN SOA ns1.elvis21.tech. admin.elvis21.tech. (&lt;br /&gt;
        3298267246      ;Version&lt;br /&gt;
        3600            ;Refresh&lt;br /&gt;
        1800            ;Retry&lt;br /&gt;
        604800          ;Expire&lt;br /&gt;
        86400 )         ;Minimum TTL&lt;br /&gt;
;&lt;br /&gt;
@  IN NS ns1.elvis21.tech.&lt;br /&gt;
&lt;br /&gt;
ns1 IN A 192.168.50.12&lt;br /&gt;
ns2 IN A 192.168.50.1&lt;br /&gt;
 IN A 192.168.50.12&lt;br /&gt;
      IN AAAA 2001:660:4401:60a0:216:3eff:fe83:a3c8&lt;br /&gt;
www IN A 192.168.50.12&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/etc/bind# dig @localhost elvis21.tech    &lt;br /&gt;
&lt;br /&gt;
; &amp;lt;&amp;lt;&amp;gt;&amp;gt; DiG 9.20.18-1~deb13u1-Debian &amp;lt;&amp;lt;&amp;gt;&amp;gt; @localhost elvis21.tech&lt;br /&gt;
; (1 server found)&lt;br /&gt;
;; global options: +cmd&lt;br /&gt;
;; Got answer:&lt;br /&gt;
;; -&amp;gt;&amp;gt;HEADER&amp;lt;&amp;lt;- opcode: QUERY, status: NOERROR, id: 45747&lt;br /&gt;
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 1&lt;br /&gt;
&lt;br /&gt;
;; OPT PSEUDOSECTION:&lt;br /&gt;
; EDNS: version: 0, flags:; udp: 1232&lt;br /&gt;
; COOKIE: 294762ee3edf0a910100000069821bb2626fa0b2f806960f (good)&lt;br /&gt;
;; QUESTION SECTION:&lt;br /&gt;
;elvis21.tech.			IN	A&lt;br /&gt;
&lt;br /&gt;
;; AUTHORITY SECTION:&lt;br /&gt;
elvis21.tech.		86400	IN	SOA	ns1.elvis21.shop. admin.elvis21.shop. 3298267246 3600 1800 604800 86400&lt;br /&gt;
&lt;br /&gt;
;; Query time: 0 msec&lt;br /&gt;
;; SERVER: 127.0.0.1#53(localhost) (UDP)&lt;br /&gt;
;; WHEN: Tue Feb 03 16:00:50 UTC 2026&lt;br /&gt;
;; MSG SIZE  rcvd: 127&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/etc/bind# named-checkzone elvis21.tech /etc/bind/db.elvis21.tech&lt;br /&gt;
zone elvis21.tech/IN: loaded serial 3298267246&lt;br /&gt;
OK&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
openssl req -nodes -newkey rsa:2048 -sha256 -keyout elvis21.tech.key -out elvis21.csr&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Vsouopme</name></author>
	</entry>
	<entry>
		<id>https://wiki-se.plil.fr/mediawiki/index.php?title=Atelier_SysRes_SE4_2025/2026_E11&amp;diff=12047</id>
		<title>Atelier SysRes SE4 2025/2026 E11</title>
		<link rel="alternate" type="text/html" href="https://wiki-se.plil.fr/mediawiki/index.php?title=Atelier_SysRes_SE4_2025/2026_E11&amp;diff=12047"/>
		<updated>2026-02-03T15:18:59Z</updated>

		<summary type="html">&lt;p&gt;Vsouopme : /* Serveur SSH */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Projet Virtualisation /Administration Systeme-Réseau - Machine SE4.Elf =&lt;br /&gt;
Dans le cadre de ce projet, nnous avons déployés une infrastructure composée de '''deux machines dédiées aux services''' et d’une '''machine mandataire''', le tout à l’aide de l'environnement  '''Xen.'''&lt;br /&gt;
&lt;br /&gt;
== Création des machines virtuelles ==&lt;br /&gt;
Les machines sont créées  sur le Dom0 '''Capbreton.plil.info''' en faisant un '''ssh root@capbreton.plil.info''' &lt;br /&gt;
&lt;br /&gt;
Sur la capbreton.plil.info, &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
xen create-image --hostname=SE4.Elf --dhcp --dir=/usr/local/xen --size=10G --dist=excalibur --memory=2G --bridge=Styx --force&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; '''Xen-create-image''' :  Commande permettant de créer une nouvelle machine virtuelle Xen&lt;br /&gt;
&lt;br /&gt;
'''--hostname=SE4.Elf :''' Pour le nom de la machine &lt;br /&gt;
&lt;br /&gt;
'''--size=10G''' : La taille du disque &lt;br /&gt;
&lt;br /&gt;
'''--bridge=Styx''' : Le nom du bridge &lt;br /&gt;
&lt;br /&gt;
Par la suite il faut creer un fichier dans le répertoire &amp;lt;code&amp;gt;/etc/network/interfaces.d&amp;lt;/code&amp;gt; du Dom0 pour créer notre pont. (NB: Il faut noter que cette etape on peut la faire avant la creation de notre VM&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
auto Styx&lt;br /&gt;
&lt;br /&gt;
iface Styx inet manual&lt;br /&gt;
   bridge_ports none&lt;br /&gt;
   up ip link set $IFACE up&lt;br /&gt;
   down ip link set $IFACE down&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;La commande '''xen list :''' Affiche les '''machines virtuelles''' (VM) qui sont actuellement gérées par Xen (Elle fait la liste des VM allumée).&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
root@capbreton:~# xen list&lt;br /&gt;
SE4.batman                                 322  2048     1     -b----      37.5&lt;br /&gt;
SE4.Moon                                   326  2048     1     -b----      41.1&lt;br /&gt;
SE4.C2                                     332  1024     1     -b----      18.1&lt;br /&gt;
SE4.Tension                                343  2048     1     -b----       7.8&lt;br /&gt;
SE4.CachyOS                                365  2048     1     -b----      10.2&lt;br /&gt;
SE4.RockStar                               367  2048     1     -b----       6.1&lt;br /&gt;
SE4.Kasav                                  368  2048     1     -b----       5.9&lt;br /&gt;
SE4.Elf                                    369  2048     1     -b----       5.6&lt;br /&gt;
SE4.catwoman                               370  2048     1     -b----       6.1&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;-La commande '''xen create /etc/xen/SE4.Elf.cfg''' permet d'allumer la Machine virtuellle.&lt;br /&gt;
&lt;br /&gt;
-La commande xen '''console SE4.Elf''' permet d'acceder  / de se connecter  a la VM.&lt;br /&gt;
&lt;br /&gt;
-La commande '''xen shutdown''' '''SE4.Elf''' permet d'eteindre la machine virtuelle.&lt;br /&gt;
&lt;br /&gt;
Lors de la tentative de connexion, il y'a une un probleme , pour y remedier,  '''Ctrl + AltGr + ] =&amp;gt; vi =&amp;gt; :q! =&amp;gt; reconnexion'''&lt;br /&gt;
&lt;br /&gt;
Pour voir le mot de passe de la VM, '''cat /var/log/xen-tools/SE4.Elf.log'''&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
Installation Summary&lt;br /&gt;
---------------------&lt;br /&gt;
Hostname        :  SE4.Elf&lt;br /&gt;
Distribution    :  excalibur&lt;br /&gt;
MAC Address     :  00:16:3E:83:A3:C7&lt;br /&gt;
IP Address(es)  :  dynamic&lt;br /&gt;
SSH Fingerprint :  SHA256:IrPhxhB4m1s+eaPaLynS6NlE/HfL78+y3ba3DPuHFQU (DSA)&lt;br /&gt;
SSH Fingerprint :  SHA256:RT+MZtlFxC7BrdYORzOcxDX+SKsJrLzOGWWngX2pKz4 (ECDSA)&lt;br /&gt;
SSH Fingerprint :  SHA256:aLYvYqUPX2Q/J5P0nTpdpMyrFD5xopRqkFKuYb7QUo4 (ED25519)&lt;br /&gt;
SSH Fingerprint :  SHA256:b0ddm9FYx4/losJU8/pE9MXx7102ygkAMjChOvPlNhE (RSA)&lt;br /&gt;
Root Password   :  X&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;- La commande '''vi /etc/hostname''' pour changer le nom de la VM&lt;br /&gt;
&lt;br /&gt;
== '''Configuration de la Machine de Services''' ==&lt;br /&gt;
Il faut creer deux partitions LVM de 10G pour votre machine virtuelle et modifiez le fichier de configuration de la machine virtuelle de services pour faire en sorte que les répertoires &amp;lt;code&amp;gt;/'''var'''&amp;lt;/code&amp;gt; et &amp;lt;code&amp;gt;'''/home'''&amp;lt;/code&amp;gt; de la machine virtuelle soient implantés sur ces partitions LVM&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
SE4.Poseidon.home lv_home_SE4Elf lv_var_SE4Elf  SE4.Gaby.home SE4.Poseidon.var SE4.Gaby.var &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Serveur SSH''' ==&lt;br /&gt;
Notre machine virtuelle doit etre accessible par SSH, on autorise donc l'accès par l'utilisateur '''Root en modifiant le fichier de de configuration &amp;lt;code&amp;gt;/etc/ssh/sshd_config  :&amp;lt;/code&amp;gt;'''&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
PermitRootLogin yes&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Il faut ensuite redemarrer le serveur ssh en faisant :&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/etc/ssh# /etc/init.d/ssh restart&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Pour gérer la redirection du SSH, on doit configurer '''nftables''' sur nos machines de service en redirigeant les ports 2201 et 2202&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
nft add table ip nat&lt;br /&gt;
nft add chain ip nat PREROUTING { type nat hook prerouting priority 0 \; }&lt;br /&gt;
nft add rule ip nat PREROUTING tcp dport 2201 dnat to 192.168.50.12:22                 &lt;br /&gt;
nft add rule ip nat PREROUTING tcp dport 2202 dnat to 192.168.50.3:22              &lt;br /&gt;
nft add chain ip nat POSTROUTING { type nat hook postrouting priority 100 \; }&lt;br /&gt;
nft add rule ip nat POSTROUTING masquerade&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Maintenant, on peut se connecter en SSH sur les machiches virtuelles de services:  De Elf, on peut se connecter a Kasav&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/# ssh root@192.168.50.3&lt;br /&gt;
root@192.168.50.3's password: &lt;br /&gt;
Linux Kasav 4.19.0-26-amd64 #1 SMP Debian 4.19.304-1 (2024-01-09) x86_64&lt;br /&gt;
&lt;br /&gt;
The programs included with the Devuan GNU/Linux system are free software;&lt;br /&gt;
the exact distribution terms for each program are described in the&lt;br /&gt;
individual files in /usr/share/doc/*/copyright.&lt;br /&gt;
&lt;br /&gt;
Devuan GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent&lt;br /&gt;
permitted by applicable law.&lt;br /&gt;
Last login: Tue Feb  3 11:34:45 2026 from 192.168.50.12&lt;br /&gt;
root@Kasav:~# &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Serveur DNS''' ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
$TTL 86400&lt;br /&gt;
@ IN SOA ns1.elvis21.shop. admin.elvis21.shop. (&lt;br /&gt;
        3298267246      ;Version&lt;br /&gt;
        3600            ;Refresh&lt;br /&gt;
        1800            ;Retry&lt;br /&gt;
        604800          ;Expire&lt;br /&gt;
        86400 )         ;Minimum TTL&lt;br /&gt;
;&lt;br /&gt;
@  IN NS ns1.elvis21.shop.&lt;br /&gt;
&lt;br /&gt;
ns1 IN A 192.168.50.12&lt;br /&gt;
ns2 IN A 192.168.50.1&lt;br /&gt;
 IN A 192.168.50.12&lt;br /&gt;
      IN AAAA 2001:660:4401:60a0:216:3eff:fe83:a3c8&lt;br /&gt;
www IN A 192.168.50.12&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Vsouopme</name></author>
	</entry>
	<entry>
		<id>https://wiki-se.plil.fr/mediawiki/index.php?title=Atelier_SysRes_SE4_2025/2026_E11&amp;diff=12046</id>
		<title>Atelier SysRes SE4 2025/2026 E11</title>
		<link rel="alternate" type="text/html" href="https://wiki-se.plil.fr/mediawiki/index.php?title=Atelier_SysRes_SE4_2025/2026_E11&amp;diff=12046"/>
		<updated>2026-02-03T15:17:28Z</updated>

		<summary type="html">&lt;p&gt;Vsouopme : &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Projet Virtualisation /Administration Systeme-Réseau - Machine SE4.Elf ==&lt;br /&gt;
Dans le cadre de ce projet, nnous avons déployés une infrastructure composée de '''deux machines dédiées aux services''' et d’une '''machine mandataire''', le tout à l’aide de l'environnement  '''Xen.'''&lt;br /&gt;
&lt;br /&gt;
== Création des machines virtuelles ==&lt;br /&gt;
Les machines sont créées  sur le Dom0 '''Capbreton.plil.info''' en faisant un '''ssh root@capbreton.plil.info''' &lt;br /&gt;
&lt;br /&gt;
Sur la capbreton.plil.info, &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
xen create-image --hostname=SE4.Elf --dhcp --dir=/usr/local/xen --size=10G --dist=excalibur --memory=2G --bridge=Styx --force&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; '''Xen-create-image''' :  Commande permettant de créer une nouvelle machine virtuelle Xen&lt;br /&gt;
&lt;br /&gt;
'''--hostname=SE4.Elf :''' Pour le nom de la machine &lt;br /&gt;
&lt;br /&gt;
'''--size=10G''' : La taille du disque &lt;br /&gt;
&lt;br /&gt;
'''--bridge=Styx''' : Le nom du bridge &lt;br /&gt;
&lt;br /&gt;
Par la suite il faut creer un fichier dans le répertoire &amp;lt;code&amp;gt;/etc/network/interfaces.d&amp;lt;/code&amp;gt; du Dom0 pour créer notre pont. (NB: Il faut noter que cette etape on peut la faire avant la creation de notre VM&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
auto Styx&lt;br /&gt;
&lt;br /&gt;
iface Styx inet manual&lt;br /&gt;
   bridge_ports none&lt;br /&gt;
   up ip link set $IFACE up&lt;br /&gt;
   down ip link set $IFACE down&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;La commande '''xen list :''' Affiche les '''machines virtuelles''' (VM) qui sont actuellement gérées par Xen (Elle fait la liste des VM allumée).&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
root@capbreton:~# xen list&lt;br /&gt;
SE4.batman                                 322  2048     1     -b----      37.5&lt;br /&gt;
SE4.Moon                                   326  2048     1     -b----      41.1&lt;br /&gt;
SE4.C2                                     332  1024     1     -b----      18.1&lt;br /&gt;
SE4.Tension                                343  2048     1     -b----       7.8&lt;br /&gt;
SE4.CachyOS                                365  2048     1     -b----      10.2&lt;br /&gt;
SE4.RockStar                               367  2048     1     -b----       6.1&lt;br /&gt;
SE4.Kasav                                  368  2048     1     -b----       5.9&lt;br /&gt;
SE4.Elf                                    369  2048     1     -b----       5.6&lt;br /&gt;
SE4.catwoman                               370  2048     1     -b----       6.1&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;-La commande '''xen create /etc/xen/SE4.Elf.cfg''' permet d'allumer la Machine virtuellle.&lt;br /&gt;
&lt;br /&gt;
-La commande xen '''console SE4.Elf''' permet d'acceder  / de se connecter  a la VM.&lt;br /&gt;
&lt;br /&gt;
-La commande '''xen shutdown''' '''SE4.Elf''' permet d'eteindre la machine virtuelle.&lt;br /&gt;
&lt;br /&gt;
Lors de la tentative de connexion, il y'a une un probleme , pour y remedier,  '''Ctrl + AltGr + ] =&amp;gt; vi =&amp;gt; :q! =&amp;gt; reconnexion'''&lt;br /&gt;
&lt;br /&gt;
Pour voir le mot de passe de la VM, '''cat /var/log/xen-tools/SE4.Elf.log'''&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
Installation Summary&lt;br /&gt;
---------------------&lt;br /&gt;
Hostname        :  SE4.Elf&lt;br /&gt;
Distribution    :  excalibur&lt;br /&gt;
MAC Address     :  00:16:3E:83:A3:C7&lt;br /&gt;
IP Address(es)  :  dynamic&lt;br /&gt;
SSH Fingerprint :  SHA256:IrPhxhB4m1s+eaPaLynS6NlE/HfL78+y3ba3DPuHFQU (DSA)&lt;br /&gt;
SSH Fingerprint :  SHA256:RT+MZtlFxC7BrdYORzOcxDX+SKsJrLzOGWWngX2pKz4 (ECDSA)&lt;br /&gt;
SSH Fingerprint :  SHA256:aLYvYqUPX2Q/J5P0nTpdpMyrFD5xopRqkFKuYb7QUo4 (ED25519)&lt;br /&gt;
SSH Fingerprint :  SHA256:b0ddm9FYx4/losJU8/pE9MXx7102ygkAMjChOvPlNhE (RSA)&lt;br /&gt;
Root Password   :  X&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;- La commande '''vi /etc/hostname''' pour changer le nom de la VM&lt;br /&gt;
&lt;br /&gt;
== '''Configuration de la Machine de Services''' ==&lt;br /&gt;
Il faut creer deux partitions LVM de 10G pour votre machine virtuelle et modifiez le fichier de configuration de la machine virtuelle de services pour faire en sorte que les répertoires &amp;lt;code&amp;gt;/'''var'''&amp;lt;/code&amp;gt; et &amp;lt;code&amp;gt;'''/home'''&amp;lt;/code&amp;gt; de la machine virtuelle soient implantés sur ces partitions LVM&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
SE4.Poseidon.home lv_home_SE4Elf lv_var_SE4Elf  SE4.Gaby.home SE4.Poseidon.var SE4.Gaby.var &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Serveur SSH''' ==&lt;br /&gt;
Notre machine virtuelle doit etre accessible par SSH, on autorise donc l'accès par l'utilisateur '''Root en modifiant le fichier de de configuration &amp;lt;code&amp;gt;/etc/ssh/sshd_config  :&amp;lt;/code&amp;gt;'''&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
PermitRootLogin yes&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Il faut ensuite redemarrer le serveur ssh en faisant :&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
root@Elf:/etc/ssh# /etc/init.d/ssh restart&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Pour gérer la redirection du SSH, on doit configurer '''nftables''' sur nos machines de service en redirigeant les ports 2201 et 2202&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
nft add table ip nat&lt;br /&gt;
nft add chain ip nat PREROUTING { type nat hook prerouting priority 0 \; }&lt;br /&gt;
nft add rule ip nat PREROUTING tcp dport 2201 dnat to 192.168.50.12:22                 &lt;br /&gt;
nft add rule ip nat PREROUTING tcp dport 2202 dnat to 192.168.50.3:22              &lt;br /&gt;
nft add chain ip nat POSTROUTING { type nat hook postrouting priority 100 \; }&lt;br /&gt;
nft add rule ip nat POSTROUTING masquerade&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Vsouopme</name></author>
	</entry>
	<entry>
		<id>https://wiki-se.plil.fr/mediawiki/index.php?title=Atelier_SysRes_SE4_2025/2026_E11&amp;diff=11525</id>
		<title>Atelier SysRes SE4 2025/2026 E11</title>
		<link rel="alternate" type="text/html" href="https://wiki-se.plil.fr/mediawiki/index.php?title=Atelier_SysRes_SE4_2025/2026_E11&amp;diff=11525"/>
		<updated>2026-01-27T17:32:01Z</updated>

		<summary type="html">&lt;p&gt;Vsouopme : &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Projet Virtualisation /Administration Systeme-Réseau - Machine SE4.Elf ==&lt;br /&gt;
Dans le cadre de ce projet, nnous avons déployés une infrastructure composée de '''deux machines dédiées aux services''' et d’une '''machine mandataire''', le tout à l’aide de l'environnement  '''Xen.'''&lt;br /&gt;
&lt;br /&gt;
== Création des machines virtuelles ==&lt;br /&gt;
Les machines sont créées  sur le Dom0 '''Capbreton.plil.info''' en faisant un '''ssh root@capbreton.plil.info''' &lt;br /&gt;
&lt;br /&gt;
Sur la capbreton.plil.info, &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
xen create-image --hostname=SE4.Elf --dhcp --dir=/usr/local/xen --size=10G --dist=excalibur --memory=2G --bridge=Styx --force&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; '''Xen-create-image''' :  Commande permettant de créer une nouvelle machine virtuelle Xen&lt;br /&gt;
&lt;br /&gt;
'''--hostname=SE4.Elf :''' Pour le nom de la machine &lt;br /&gt;
&lt;br /&gt;
'''--size=10G''' : La taille du disque &lt;br /&gt;
&lt;br /&gt;
'''--bridge=Styx''' : Le nom du bridge &lt;br /&gt;
&lt;br /&gt;
Par la suite il faut creer un fichier dans le répertoire &amp;lt;code&amp;gt;/etc/network/interfaces.d&amp;lt;/code&amp;gt; du Dom0 pour créer notre pont. (NB: Il faut noter que cette etape on peut la faire avant la creation de notre VM&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
auto Styx&lt;br /&gt;
&lt;br /&gt;
iface Styx inet manual&lt;br /&gt;
   bridge_ports none&lt;br /&gt;
   up ip link set $IFACE up&lt;br /&gt;
   down ip link set $IFACE down&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;La commande '''xen list :''' Affiche les '''machines virtuelles''' (VM) qui sont actuellement gérées par Xen (Elle fait la liste des VM allumée).&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
root@capbreton:~# xen list&lt;br /&gt;
SE4.batman                                 322  2048     1     -b----      37.5&lt;br /&gt;
SE4.Moon                                   326  2048     1     -b----      41.1&lt;br /&gt;
SE4.C2                                     332  1024     1     -b----      18.1&lt;br /&gt;
SE4.Tension                                343  2048     1     -b----       7.8&lt;br /&gt;
SE4.CachyOS                                365  2048     1     -b----      10.2&lt;br /&gt;
SE4.RockStar                               367  2048     1     -b----       6.1&lt;br /&gt;
SE4.Kasav                                  368  2048     1     -b----       5.9&lt;br /&gt;
SE4.Elf                                    369  2048     1     -b----       5.6&lt;br /&gt;
SE4.catwoman                               370  2048     1     -b----       6.1&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;-La commande '''xen create /etc/xen/SE4.Elf.cfg''' permet d'allumer la Machine virtuellle.&lt;br /&gt;
&lt;br /&gt;
-La commande xen '''console SE4.Elf''' permet d'acceder  / de se connecter  a la VM.&lt;br /&gt;
&lt;br /&gt;
-La commande '''xen shutdown''' '''SE4.Elf''' permet d'eteindre la machine virtuelle.&lt;br /&gt;
&lt;br /&gt;
Lors de la tentative de connexion, il y'a une un probleme , pour y remedier,  '''Ctrl + AltGr + ] =&amp;gt; vi =&amp;gt; :q! =&amp;gt; reconnexion'''&lt;br /&gt;
&lt;br /&gt;
Pour voir le mot de passe de la VM, '''cat /var/log/xen-tools/SE4.Elf.log'''&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
Installation Summary&lt;br /&gt;
---------------------&lt;br /&gt;
Hostname        :  SE4.Elf&lt;br /&gt;
Distribution    :  excalibur&lt;br /&gt;
MAC Address     :  00:16:3E:83:A3:C7&lt;br /&gt;
IP Address(es)  :  dynamic&lt;br /&gt;
SSH Fingerprint :  SHA256:IrPhxhB4m1s+eaPaLynS6NlE/HfL78+y3ba3DPuHFQU (DSA)&lt;br /&gt;
SSH Fingerprint :  SHA256:RT+MZtlFxC7BrdYORzOcxDX+SKsJrLzOGWWngX2pKz4 (ECDSA)&lt;br /&gt;
SSH Fingerprint :  SHA256:aLYvYqUPX2Q/J5P0nTpdpMyrFD5xopRqkFKuYb7QUo4 (ED25519)&lt;br /&gt;
SSH Fingerprint :  SHA256:b0ddm9FYx4/losJU8/pE9MXx7102ygkAMjChOvPlNhE (RSA)&lt;br /&gt;
Root Password   :  X&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;- La commande '''vi /etc/hostname''' pour changer le nom de la VM&lt;/div&gt;</summary>
		<author><name>Vsouopme</name></author>
	</entry>
	<entry>
		<id>https://wiki-se.plil.fr/mediawiki/index.php?title=Atelier_SysRes_SE4_2025/2026_E11&amp;diff=11524</id>
		<title>Atelier SysRes SE4 2025/2026 E11</title>
		<link rel="alternate" type="text/html" href="https://wiki-se.plil.fr/mediawiki/index.php?title=Atelier_SysRes_SE4_2025/2026_E11&amp;diff=11524"/>
		<updated>2026-01-27T17:30:23Z</updated>

		<summary type="html">&lt;p&gt;Vsouopme : &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Projet Virtualisation /Administration Systeme-Réseau - Machine SE4.Elf ==&lt;br /&gt;
Dans le cadre de ce projet, nnous avons déployés une infrastructure composée de '''deux machines dédiées aux services''' et d’une '''machine mandataire''', le tout à l’aide de l'environnement  '''Xen.'''&lt;br /&gt;
&lt;br /&gt;
== Création des machines virtuelles ==&lt;br /&gt;
Les machines sont créées  sur le Dom0 '''Capbreton.plil.info''' en faisant un '''ssh root@capbreton.plil.info''' &lt;br /&gt;
&lt;br /&gt;
Sur la capbreton.plil.info, &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
xen create-image --hostname=SE4.Elf --dhcp --dir=/usr/local/xen --size=10G --dist=excalibur --memory=2G --bridge=Styx --force&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; '''Xen-create-image''' :  Commande permettant de créer une nouvelle machine virtuelle Xen&lt;br /&gt;
&lt;br /&gt;
'''--hostname=SE4.Elf :''' Pour le nom de la machine &lt;br /&gt;
&lt;br /&gt;
'''--size=10G''' : La taille du disque &lt;br /&gt;
&lt;br /&gt;
'''--bridge=Styx''' : Le nom du bridge &lt;br /&gt;
&lt;br /&gt;
Par la suite il faut creer un fichier dans le répertoire &amp;lt;code&amp;gt;/etc/network/interfaces.d&amp;lt;/code&amp;gt; du Dom0 pour créer notre pont. (NB: Il faut noter que cette etape on peut la faire avant la creation de notre VM&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
auto Styx&lt;br /&gt;
&lt;br /&gt;
iface Styx inet manual&lt;br /&gt;
   bridge_ports none&lt;br /&gt;
   up ip link set $IFACE up&lt;br /&gt;
   down ip link set $IFACE down&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;La commande '''xen list :''' Affiche les '''machines virtuelles''' (VM) qui sont actuellement gérées par Xen (Elle fait la liste des VM allumée).&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
root@capbreton:~# xen list&lt;br /&gt;
SE4.batman                                 322  2048     1     -b----      37.5&lt;br /&gt;
SE4.Moon                                   326  2048     1     -b----      41.1&lt;br /&gt;
SE4.C2                                     332  1024     1     -b----      18.1&lt;br /&gt;
SE4.Tension                                343  2048     1     -b----       7.8&lt;br /&gt;
SE4.CachyOS                                365  2048     1     -b----      10.2&lt;br /&gt;
SE4.RockStar                               367  2048     1     -b----       6.1&lt;br /&gt;
SE4.Kasav                                  368  2048     1     -b----       5.9&lt;br /&gt;
SE4.Elf                                    369  2048     1     -b----       5.6&lt;br /&gt;
SE4.catwoman                               370  2048     1     -b----       6.1&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;-La commande '''xen create /etc/xen/SE4.Elf.cfg''' permet d'allumer la Machine virtuellle.&lt;br /&gt;
&lt;br /&gt;
-La commande xen '''console SE4.Elf''' permet d'acceder  / de se connecter  a la VM.&lt;br /&gt;
&lt;br /&gt;
-La commande xen shutdown '''SE4.Elf''' permet d'eteindre la machine virtuelle.&lt;br /&gt;
&lt;br /&gt;
Lors de la tentative de connexion, il y'a une un probleme , pour y remedier,  '''Ctrl + AltGr + ] =&amp;gt; vi =&amp;gt; :q! =&amp;gt; reconnexion'''&lt;br /&gt;
&lt;br /&gt;
Pour voir le mot de passe de la VM, '''cat /var/log/xen-tools/SE4.Elf.log'''&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
Installation Summary&lt;br /&gt;
---------------------&lt;br /&gt;
Hostname        :  SE4.Elf&lt;br /&gt;
Distribution    :  excalibur&lt;br /&gt;
MAC Address     :  00:16:3E:83:A3:C7&lt;br /&gt;
IP Address(es)  :  dynamic&lt;br /&gt;
SSH Fingerprint :  SHA256:IrPhxhB4m1s+eaPaLynS6NlE/HfL78+y3ba3DPuHFQU (DSA)&lt;br /&gt;
SSH Fingerprint :  SHA256:RT+MZtlFxC7BrdYORzOcxDX+SKsJrLzOGWWngX2pKz4 (ECDSA)&lt;br /&gt;
SSH Fingerprint :  SHA256:aLYvYqUPX2Q/J5P0nTpdpMyrFD5xopRqkFKuYb7QUo4 (ED25519)&lt;br /&gt;
SSH Fingerprint :  SHA256:b0ddm9FYx4/losJU8/pE9MXx7102ygkAMjChOvPlNhE (RSA)&lt;br /&gt;
Root Password   :  X&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;- La commande '''vi /etc/hostname''' pour changer le nom de la VM&lt;/div&gt;</summary>
		<author><name>Vsouopme</name></author>
	</entry>
	<entry>
		<id>https://wiki-se.plil.fr/mediawiki/index.php?title=Atelier_SysRes_SE4_2025/2026_E11&amp;diff=11519</id>
		<title>Atelier SysRes SE4 2025/2026 E11</title>
		<link rel="alternate" type="text/html" href="https://wiki-se.plil.fr/mediawiki/index.php?title=Atelier_SysRes_SE4_2025/2026_E11&amp;diff=11519"/>
		<updated>2026-01-27T16:36:44Z</updated>

		<summary type="html">&lt;p&gt;Vsouopme : Page créée avec « == Projet Virtualisation /Administration Systeme-Réseau - Machine SE4.Elf == Dans le cadre de ce projet, nnous avons déployés une infrastructure composée de '''deux machines dédiées aux services''' et d’une '''machine mandataire''', le tout à l’aide de l'environnement  '''Xen.'''  == Création des machines virtuelles == Les machines sont créées  sur le Dom0 '''Capbreton.plil.info''' en faisant un '''ssh root@capbreton.plil.info'''   Sur la capbreton.... »&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Projet Virtualisation /Administration Systeme-Réseau - Machine SE4.Elf ==&lt;br /&gt;
Dans le cadre de ce projet, nnous avons déployés une infrastructure composée de '''deux machines dédiées aux services''' et d’une '''machine mandataire''', le tout à l’aide de l'environnement  '''Xen.'''&lt;br /&gt;
&lt;br /&gt;
== Création des machines virtuelles ==&lt;br /&gt;
Les machines sont créées  sur le Dom0 '''Capbreton.plil.info''' en faisant un '''ssh root@capbreton.plil.info''' &lt;br /&gt;
&lt;br /&gt;
Sur la capbreton.plil.info, &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
xen create-image --hostname=SE4.Elf --dhcp --dir=/usr/local/xen --size=10G --dist=excalibur --memory=2G --bridge=Styx --force&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; '''Xen-create-image''' :  Commande permettant de créer une nouvelle machine virtuelle Xen&lt;br /&gt;
&lt;br /&gt;
'''--hostname=SE4.Elf :''' Pour le nom de la machine &lt;br /&gt;
&lt;br /&gt;
'''--size=10G''' : La taille du disque &lt;br /&gt;
&lt;br /&gt;
'''--bridge=Styx''' : Le nom du bridge &lt;br /&gt;
&lt;br /&gt;
Par la suite il faut creer un fichier dans le répertoire &amp;lt;code&amp;gt;/etc/network/interfaces.d&amp;lt;/code&amp;gt; du Dom0 pour créer notre pont. (NB: Il faut noter que cette etape on peut la faire avant la creation de notre VM&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
auto Styx&lt;br /&gt;
&lt;br /&gt;
iface Styx inet manual&lt;br /&gt;
   bridge_ports none&lt;br /&gt;
   up ip link set $IFACE up&lt;br /&gt;
   down ip link set $IFACE down&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Vsouopme</name></author>
	</entry>
</feed>