« OpenVPN » : différence entre les versions
Aucun résumé des modifications |
Aucun résumé des modifications |
||
| Ligne 1 : | Ligne 1 : | ||
<br> | <br> | ||
= <span style="color:# | = <span style="color:#004d40;">Installation et Configuration OpenVPN sur pfSense (Remote Access)</span> = | ||
{| style="width:100%; background:# | {| style="width:100%; background:#e0f2f1; border:1px solid #80cbc4; padding:15px; border-radius:10px; overflow:hidden;" | ||
| | | | ||
<span style="font-size:115%; color:# | <span style="font-size:115%; color:#004d40;"> | ||
Ce guide permet de configurer un VPN OpenVPN en mode Remote Access sur pfSense. <br><br> | |||
Il permet à des clients distants d'accéder au réseau interne <b>192.168.60.0/24</b> de manière sécurisée. <br><br> | |||
L'architecture repose sur un tunnel chiffré AES-256-GCM avec authentification par certificats et gestion des utilisateurs intégrée à pfSense.</span> | |||
</span> | |||
|} | |} | ||
| Ligne 14 : | Ligne 13 : | ||
<br> | <br> | ||
= <span style="color:# | = <span style="color:#00695c;">1 — Préparation du réseau</span> = | ||
{| style="width:100%; background:# | {| style="width:100%; background:#e0f2f1; border:1px solid #80cbc4; padding:12px; border-radius:10px; overflow:hidden;" | ||
| | | | ||
<b style="color:# | <b style="color:#00695c;">Informations de l'environnement réseau utilisé dans ce guide</b> | ||
|} | |} | ||
== <span style="color:#00897b;">Adressage réseau</span> == | |||
{| class="wikitable" style="width:50%;" | |||
! Élément !! Adresse | |||
|- | |||
| pfSense LAN || 192.168.60.254 | |||
|- | |||
| Réseau LAN || 192.168.60.0/24 | |||
|- | |||
| VM cible || 192.168.60.33 | |||
|} | |||
Schéma de l'architecture : | |||
<pre> | <pre> | ||
Internet | |||
│ | |||
┌────────────┴────────────┐ | |||
│ │ | |||
┌─────────────────┐ ┌─────────────────────┐ | |||
│ Client VPN │ │ pfSense │ | |||
│ (PC distant) │ ════► │ OpenVPN Remote │ | |||
│ .ovpn importé │ │ Access Port 1194 │ | |||
└─────────────────┘ └──────────┬──────────┘ | |||
│ | |||
┌──────────┴──────────┐ | |||
│ LAN 192.168.60.x │ | |||
│ VM : 192.168.60.33 │ | |||
└─────────────────────┘ | |||
</pre> | </pre> | ||
= <span style="color:# | <br><br> | ||
= <span style="color:#00695c;">2 — Création de l'Autorité de Certification (CA)</span> = | |||
{| style="width:100%; background:# | {| style="width:100%; background:#e0f2f1; border:1px solid #80cbc4; padding:12px; border-radius:10px; overflow:hidden;" | ||
| | | | ||
<b>Création | <b style="color:#00695c;">Création d'une CA interne qui signera tous les certificats du VPN</b> | ||
|} | |} | ||
Accès : | == <span style="color:#00897b;">Accès au gestionnaire de certificats</span> == | ||
Naviguer vers : | |||
<b>System → Certificate | <b>System → Certificate Authorities → Add</b> | ||
- Method | == <span style="color:#00897b;">Configuration de la CA</span> == | ||
- Descriptive Name | |||
- Key Length | Remplir les champs de la manière suivante : | ||
- Digest | |||
- Lifetime : | {| class="wikitable" style="width:60%;" | ||
! Champ !! Valeur | |||
|- | |||
| Method || Create an internal Certificate Authority | |||
|- | |||
| Descriptive Name || VPN-CA | |||
|- | |||
| Key Length || 2048 | |||
|- | |||
| Digest Algorithm || SHA256 | |||
|- | |||
| Lifetime || 3650 | |||
|- | |||
| Common Name || VPN-CA | |||
|} | |||
Remplir les informations d'identité : | |||
<pre> | <pre> | ||
Country Code : FR | |||
City : Montpellier (ou au choix) | |||
</pre> | </pre> | ||
{| style="width:100%; background:#e8f8f5; border:1px solid #a9dfbf; padding:10px; border-radius:8px; overflow:hidden;" | |||
| | |||
<b style="color:#1e8449;">ℹ INFO :</b> La durée de vie de 3650 jours correspond à 10 ans. La CA sera valable pendant toute cette période pour signer les certificats du VPN. | |||
|} | |||
Cliquer sur <b>Save</b>. | |||
<br><br> | |||
< | = <span style="color:#00695c;">3 — Création du certificat serveur</span> = | ||
- | {| style="width:100%; background:#e0f2f1; border:1px solid #80cbc4; padding:12px; border-radius:10px; overflow:hidden;" | ||
| | |||
<b style="color:#00695c;">Génération du certificat d'identité du serveur OpenVPN, signé par la CA</b> | |||
|} | |||
== <span style="color:#00897b;">Accès à la section Certificates</span> == | |||
Naviguer vers : | |||
= <span style="color:# | <b>System → Certificates → Add / Sign</b> | ||
== <span style="color:#00897b;">Configuration du certificat serveur</span> == | |||
Remplir les champs de la manière suivante : | |||
{| class="wikitable" style="width:60%;" | |||
! Champ !! Valeur | |||
|- | |||
| Method || Create internal certificate | |||
|- | |||
| Descriptive Name || OpenVPN-Server | |||
|- | |||
| Certificate Authority || VPN-CA | |||
|- | |||
| Type || Server Certificate | |||
|} | |||
{| style="width:100%; background:#fff3e0; border:1px solid #ffb74d; padding:10px; border-radius:8px; overflow:hidden;" | |||
| | |||
<b style="color:#e65100;">⚠ ATTENTION :</b> Le type doit impérativement être <b>Server Certificate</b> et non User Certificate, sinon OpenVPN refusera de démarrer. | |||
|} | |||
Cliquer sur <b>Save</b>. | |||
<br><br> | |||
= <span style="color:#00695c;">4 — Création du serveur OpenVPN</span> = | |||
{| style="width:100%; background:#e0f2f1; border:1px solid #80cbc4; padding:12px; border-radius:10px; overflow:hidden;" | |||
| | |||
<b style="color:#00695c;">Configuration du serveur VPN via l'assistant intégré de pfSense</b> | |||
|} | |||
== <span style="color:#00897b;">Accès à l'assistant</span> == | |||
Naviguer vers : | |||
<b>VPN → OpenVPN → Wizards</b> | <b>VPN → OpenVPN → Wizards</b> | ||
Sélectionner le backend d'authentification : | |||
<pre> | <pre> | ||
Local User Access | Authentication Backend : Local User Access | ||
</pre> | </pre> | ||
Puis sélectionner successivement : | |||
<pre> | <pre> | ||
VPN-CA | CA : VPN-CA | ||
Certificate : OpenVPN-Server | |||
</pre> | </pre> | ||
--- | == <span style="color:#00897b;">Configuration générale du serveur</span> == | ||
{| class="wikitable" style="width:65%;" | |||
! Paramètre !! Valeur | |||
|- | |||
| Server Mode || Remote Access (SSL/TLS) | |||
|- | |||
| Protocol || UDP | |||
|- | |||
| Interface || LAN (lab Proxmox) | |||
|- | |||
| Port || 1194 | |||
|} | |||
== <span style="color:#00897b;">Cryptographie</span> == | |||
{| class="wikitable" style="width:65%;" | |||
! Paramètre !! Valeur | |||
|- | |||
| TLS Authentication || Activé | |||
|- | |||
| Encryption Algorithm || AES-256-GCM | |||
|- | |||
| Auth Digest Algorithm || SHA256 | |||
|} | |||
{| style="width:100%; background:#e8f8f5; border:1px solid #a9dfbf; padding:10px; border-radius:8px; overflow:hidden;" | |||
| | |||
<b style="color:#1e8449;">ℹ INFO :</b> AES-256-GCM est le chiffrement recommandé — il combine chiffrement et authentification du message en un seul algorithme performant. | |||
|} | |||
== <span style="color:#00897b;">Configuration réseau</span> == | |||
{| class="wikitable" style="width:65%;" | |||
! Paramètre !! Valeur | |||
|- | |||
| Tunnel Network || 10.8.0.0/24 | |||
|- | |||
| Local Network || 192.168.60.0/24 | |||
|- | |||
| DNS Server 1 || 192.168.60.254 | |||
|} | |||
{| style="width:100%; background:#fff3e0; border:1px solid #ffb74d; padding:10px; border-radius:8px; overflow:hidden;" | |||
| | |||
<b style="color:#e65100;">⚠ ATTENTION :</b> Le champ <b>Tunnel Network</b> doit être un réseau inutilisé sur votre infrastructure. Le champ <b>Local Network</b> correspond au réseau LAN réel à exposer aux clients VPN. | |||
|} | |||
Cliquer sur <b>Finish</b> pour terminer l'assistant. | |||
<br><br> | |||
= <span style="color:#00695c;">5 — Création d'un utilisateur VPN</span> = | |||
{| style="width:100%; background:#e0f2f1; border:1px solid #80cbc4; padding:12px; border-radius:10px; overflow:hidden;" | |||
| | |||
<b style="color:#00695c;">Création d'un compte utilisateur avec son certificat client pour l'authentification VPN</b> | |||
|} | |||
== <span style="color:#00897b;">Accès au gestionnaire d'utilisateurs</span> == | |||
Naviguer vers : | |||
<b>System → User Manager → Add</b> | |||
== | == <span style="color:#00897b;">Configuration de l'utilisateur</span> == | ||
Remplir les informations du compte : | |||
-- | {| class="wikitable" style="width:50%;" | ||
! Champ !! Valeur | |||
|- | |||
| Username || vpnuser | |||
|- | |||
| Password || (mot de passe sécurisé) | |||
|} | |||
Cocher l'option : | |||
<pre> | <pre> | ||
Click to create a user certificate | |||
</pre> | </pre> | ||
Dans le menu déroulant qui apparaît, sélectionner : | |||
<pre> | <pre> | ||
CA : VPN-CA | |||
</pre> | </pre> | ||
{| style="width:100%; background:#e8f8f5; border:1px solid #a9dfbf; padding:10px; border-radius:8px; overflow:hidden;" | |||
< | | | ||
<b style="color:#1e8449;">ℹ INFO :</b> En cochant cette case, pfSense va automatiquement générer et signer un certificat client pour cet utilisateur. Ce certificat sera embarqué dans le fichier de configuration .ovpn. | |||
</ | |} | ||
Cliquer sur <b>Save</b>. | |||
<br><br> | |||
= <span style="color:#00695c;">6 — Installation du package d'export client</span> = | |||
{| style="width:100%; background:#e0f2f1; border:1px solid #80cbc4; padding:12px; border-radius:10px; overflow:hidden;" | |||
| | |||
<b style="color:#00695c;">Installation du package pfSense permettant d'exporter les configurations clients OpenVPN</b> | |||
|} | |||
== <span style="color:#00897b;">Accès au gestionnaire de paquets</span> == | |||
Naviguer vers : | |||
<b>System → Package Manager → Available Packages</b> | |||
< | == <span style="color:#00897b;">Installation du package</span> == | ||
Rechercher et installer le package suivant : | |||
<pre> | <pre> | ||
openvpn-client-export | |||
</pre> | </pre> | ||
Cliquer sur <b>Install</b> puis confirmer. | |||
< | |||
</ | |||
{| style="width:100%; background:#e8f8f5; border:1px solid #a9dfbf; padding:10px; border-radius:8px; overflow:hidden;" | |||
| | |||
<b style="color:#1e8449;">ℹ INFO :</b> Ce package ajoute une interface dans pfSense permettant de générer automatiquement les fichiers de configuration pour chaque utilisateur VPN, incluant les certificats et clés embarquées. | |||
|} | |||
<br><br> | |||
= <span style="color:#00695c;">7 — Export de la configuration client</span> = | |||
<b> | {| style="width:100%; background:#e0f2f1; border:1px solid #80cbc4; padding:12px; border-radius:10px; overflow:hidden;" | ||
| | |||
<b style="color:#00695c;">Génération et téléchargement du fichier de configuration pour le client VPN</b> | |||
|} | |||
== <span style="color:#00897b;">Accès à l'export client</span> == | |||
Naviguer vers : | |||
<b>VPN → OpenVPN → Client Export</b> | <b>VPN → OpenVPN → Client Export</b> | ||
La liste des utilisateurs configurés apparaît. | |||
== <span style="color:#00897b;">Téléchargement de la configuration</span> == | |||
Choisir le format adapté au système du client : | |||
Pour <b>Windows</b> : | |||
<pre> | <pre> | ||
Windows Installer (.exe) | Windows Installer (.exe) | ||
</pre> | </pre> | ||
- | {| style="width:100%; background:#fff3e0; border:1px solid #ffb74d; padding:10px; border-radius:8px; overflow:hidden;" | ||
| | |||
<b style="color:#e65100;">⚠ IMPORTANT :</b> Le fichier .ovpn contient les certificats, clés et paramètres de connexion. Il est confidentiel : ne pas le partager ni le stocker dans un endroit non sécurisé. | |||
|} | |||
<br><br> | |||
== OpenVPN | = <span style="color:#00695c;">8 — Règles de pare-feu pfSense</span> = | ||
{| style="width:100%; background:#e0f2f1; border:1px solid #80cbc4; padding:12px; border-radius:10px; overflow:hidden;" | |||
| | |||
<b style="color:#00695c;">Création des règles de pare-feu pour autoriser les clients VPN à accéder au réseau LAN</b> | |||
|} | |||
== <span style="color:#00897b;">Règle OpenVPN → LAN</span> == | |||
Naviguer vers : | |||
<b>Firewall → Rules → OpenVPN</b> | <b>Firewall → Rules → OpenVPN</b> | ||
Créer la règle suivante : | |||
<pre> | |||
Action : Pass | |||
Interface : OpenVPN | |||
Protocol : any | |||
Source : OpenVPN net | |||
Destination : LAN net | |||
Description : Allow VPN clients to LAN | |||
</pre> | |||
{| style="width:100%; background:#fff3e0; border:1px solid #ffb74d; padding:10px; border-radius:8px; overflow:hidden;" | |||
| | |||
<b style="color:#e65100;">⚠ NOTE :</b> Pour un environnement de production, affiner les règles en précisant les protocoles et ports autorisés plutôt que d'utiliser "any". | |||
|} | |||
Schéma du flux réseau VPN : | |||
<pre> | |||
┌──────────────────────────────────────────────────────────────┐ | |||
│ pfSense Firewall │ | |||
├──────────────────────────────────────────────────────────────┤ | |||
│ │ | |||
│ WAN Rules : ✓ UDP 1194 → OpenVPN Server │ | |||
│ OpenVPN Rules: ✓ OpenVPN net → LAN net (any) │ | |||
│ LAN Rules : ✓ Trafic habituel │ | |||
│ │ | |||
└──────────────────────────────────────────────────────────────┘ | |||
</pre> | |||
Cliquer sur <b>Save</b> puis <b>Apply Changes</b>. | |||
<br><br> | |||
= <span style="color:# | = <span style="color:#00695c;">9 — Client VPN (VM Windows)</span> = | ||
{| style="width:100%; background:#e0f2f1; border:1px solid #80cbc4; padding:12px; border-radius:10px; overflow:hidden;" | |||
| | |||
<b style="color:#00695c;">Installation et configuration du client OpenVPN sur la VM Windows</b> | |||
|} | |||
== <span style="color:#00897b;">Installation du client</span> == | |||
Sur la VM Windows, installer le client OpenVPN officiel puis importer le fichier exporté depuis pfSense : | |||
* <b>Clic droit</b> sur l'icône OpenVPN dans la barre des tâches | |||
* Sélectionner <b>Import file</b> | |||
* Choisir le fichier <b>.ovpn</b> téléchargé | |||
= <span style="color:# | == <span style="color:#00897b;">Connexion au VPN</span> == | ||
* <b>Clic droit</b> sur l'icône OpenVPN dans la barre des tâches | |||
* Sélectionner <b>Connect</b> | |||
* Saisir les identifiants du compte créé : | |||
<pre> | |||
Username : vpnuser | |||
Password : (mot de passe défini dans pfSense) | |||
</pre> | |||
L'icône doit passer au vert indiquant une connexion établie. | |||
<br><br> | |||
= <span style="color:#00695c;">10 — Tests</span> = | |||
{| style="width:100%; background:#e0f2f1; border:1px solid #80cbc4; padding:12px; border-radius:10px; overflow:hidden;" | |||
| | |||
<b style="color:#00695c;">Vérification du bon fonctionnement de la connexion OpenVPN</b> | |||
|} | |||
== <span style="color:#00897b;">Test de connectivité</span> == | |||
Une fois connecté, vérifier l'accès au réseau interne : | |||
* <b>Ping vers pfSense</b> (passerelle LAN) : | |||
<pre> | <pre> | ||
ping 192.168.60.254 | ping 192.168.60.254 | ||
</pre> | |||
* <b>Ping vers la VM cible</b> : | |||
<pre> | |||
ping 192.168.60.33 | ping 192.168.60.33 | ||
</pre> | </pre> | ||
* <b>Vérification de l'adresse IP VPN attribuée</b> (doit être dans le tunnel 10.8.0.0/24) : | |||
<pre> | |||
ipconfig | |||
</pre> | |||
Résultat attendu : | |||
<pre> | <pre> | ||
10.8.0.x | Carte Ethernet OpenVPN : | ||
Adresse IPv4. . . . . . . : 10.8.0.x | |||
Masque de sous-réseau . . : 255.255.255.0 | |||
Passerelle par défaut . . : 10.8.0.1 | |||
</pre> | </pre> | ||
= <span style="color:# | == <span style="color:#00897b;">Vérification côté pfSense</span> == | ||
Dans l'interface web pfSense, vérifier les connexions actives : | |||
<b>Status → OpenVPN</b> | |||
<pre> | |||
┌──────────────┬──────────────┬──────────────┬──────────────┐ | |||
│ User │ Real IP │ VPN IP │ Connected │ | |||
├──────────────┼──────────────┼──────────────┼──────────────┤ | |||
│ vpnuser │ X.X.X.X │ 10.8.0.2 │ 00:05:32 │ | |||
└──────────────┴──────────────┴──────────────┴──────────────┘ | |||
</pre> | |||
<br><br> | |||
= <span style="color:#004d40;">Résultat attendu</span> = | |||
{| style="width:100%; background:#e0f2f1; border:1px solid #80cbc4; padding:12px; border-radius:10px; overflow:hidden;" | |||
| | |||
<b style="color:#004d40;">Récapitulatif des indicateurs de succès</b> | |||
|} | |||
--- | * ✓ <b>VPN connecté</b> — icône verte dans le client OpenVPN | ||
* ✓ <b>IP tunnel attribuée</b> — adresse en 10.8.0.x visible dans ipconfig | |||
* ✓ <b>Accès au réseau 192.168.60.0/24</b> — ping vers pfSense et VMs opérationnel | |||
* ✓ <b>Accès aux machines internes</b> — communication établie avec 192.168.60.33 | |||
<br><br> | |||
= <span style="color:#004d40;">Conclusion</span> = | |||
{| style="width:100%; background:#b2dfdb; border:1px solid #4db6ac; padding:15px; border-radius:10px; overflow:hidden;" | |||
| | |||
<span style="font-size:115%; color:#004d40;"> | |||
Mise en place d'un <b>VPN Remote Access SSL/TLS</b> sur pfSense permettant un accès sécurisé au réseau interne via authentification utilisateur et certificat. <br><br> | |||
Le tunnel chiffré <b>AES-256-GCM</b> garantit la confidentialité des échanges, tandis que l'authentification par certificat assure l'identité des clients connectés. | |||
</span> | |||
|} | |||
<br><br> | |||
Dernière version du 20 avril 2026 à 22:34
Installation et Configuration OpenVPN sur pfSense (Remote Access)
1 — Préparation du réseau
Adressage réseau
| Élément | Adresse |
|---|---|
| pfSense LAN | 192.168.60.254 |
| Réseau LAN | 192.168.60.0/24 |
| VM cible | 192.168.60.33 |
Schéma de l'architecture :
Internet
│
┌────────────┴────────────┐
│ │
┌─────────────────┐ ┌─────────────────────┐
│ Client VPN │ │ pfSense │
│ (PC distant) │ ════► │ OpenVPN Remote │
│ .ovpn importé │ │ Access Port 1194 │
└─────────────────┘ └──────────┬──────────┘
│
┌──────────┴──────────┐
│ LAN 192.168.60.x │
│ VM : 192.168.60.33 │
└─────────────────────┘
2 — Création de l'Autorité de Certification (CA)
Accès au gestionnaire de certificats
Naviguer vers :
System → Certificate Authorities → Add
Configuration de la CA
Remplir les champs de la manière suivante :
| Champ | Valeur |
|---|---|
| Method | Create an internal Certificate Authority |
| Descriptive Name | VPN-CA |
| Key Length | 2048 |
| Digest Algorithm | SHA256 |
| Lifetime | 3650 |
| Common Name | VPN-CA |
Remplir les informations d'identité :
Country Code : FR City : Montpellier (ou au choix)
Cliquer sur Save.
3 — Création du certificat serveur
Accès à la section Certificates
Naviguer vers :
System → Certificates → Add / Sign
Configuration du certificat serveur
Remplir les champs de la manière suivante :
| Champ | Valeur |
|---|---|
| Method | Create internal certificate |
| Descriptive Name | OpenVPN-Server |
| Certificate Authority | VPN-CA |
| Type | Server Certificate |
Cliquer sur Save.
4 — Création du serveur OpenVPN
Accès à l'assistant
Naviguer vers :
VPN → OpenVPN → Wizards
Sélectionner le backend d'authentification :
Authentication Backend : Local User Access
Puis sélectionner successivement :
CA : VPN-CA Certificate : OpenVPN-Server
Configuration générale du serveur
| Paramètre | Valeur |
|---|---|
| Server Mode | Remote Access (SSL/TLS) |
| Protocol | UDP |
| Interface | LAN (lab Proxmox) |
| Port | 1194 |
Cryptographie
| Paramètre | Valeur |
|---|---|
| TLS Authentication | Activé |
| Encryption Algorithm | AES-256-GCM |
| Auth Digest Algorithm | SHA256 |
Configuration réseau
| Paramètre | Valeur |
|---|---|
| Tunnel Network | 10.8.0.0/24 |
| Local Network | 192.168.60.0/24 |
| DNS Server 1 | 192.168.60.254 |
Cliquer sur Finish pour terminer l'assistant.
5 — Création d'un utilisateur VPN
Accès au gestionnaire d'utilisateurs
Naviguer vers :
System → User Manager → Add
Configuration de l'utilisateur
Remplir les informations du compte :
| Champ | Valeur |
|---|---|
| Username | vpnuser |
| Password | (mot de passe sécurisé) |
Cocher l'option :
Click to create a user certificate
Dans le menu déroulant qui apparaît, sélectionner :
CA : VPN-CA
Cliquer sur Save.
6 — Installation du package d'export client
Accès au gestionnaire de paquets
Naviguer vers :
System → Package Manager → Available Packages
Installation du package
Rechercher et installer le package suivant :
openvpn-client-export
Cliquer sur Install puis confirmer.
7 — Export de la configuration client
Accès à l'export client
Naviguer vers :
VPN → OpenVPN → Client Export
La liste des utilisateurs configurés apparaît.
Téléchargement de la configuration
Choisir le format adapté au système du client :
Pour Windows :
Windows Installer (.exe)
8 — Règles de pare-feu pfSense
Règle OpenVPN → LAN
Naviguer vers :
Firewall → Rules → OpenVPN
Créer la règle suivante :
Action : Pass Interface : OpenVPN Protocol : any Source : OpenVPN net Destination : LAN net Description : Allow VPN clients to LAN
Schéma du flux réseau VPN :
┌──────────────────────────────────────────────────────────────┐ │ pfSense Firewall │ ├──────────────────────────────────────────────────────────────┤ │ │ │ WAN Rules : ✓ UDP 1194 → OpenVPN Server │ │ OpenVPN Rules: ✓ OpenVPN net → LAN net (any) │ │ LAN Rules : ✓ Trafic habituel │ │ │ └──────────────────────────────────────────────────────────────┘
Cliquer sur Save puis Apply Changes.
9 — Client VPN (VM Windows)
Installation du client
Sur la VM Windows, installer le client OpenVPN officiel puis importer le fichier exporté depuis pfSense :
- Clic droit sur l'icône OpenVPN dans la barre des tâches
- Sélectionner Import file
- Choisir le fichier .ovpn téléchargé
Connexion au VPN
- Clic droit sur l'icône OpenVPN dans la barre des tâches
- Sélectionner Connect
- Saisir les identifiants du compte créé :
Username : vpnuser Password : (mot de passe défini dans pfSense)
L'icône doit passer au vert indiquant une connexion établie.
10 — Tests
Test de connectivité
Une fois connecté, vérifier l'accès au réseau interne :
- Ping vers pfSense (passerelle LAN) :
ping 192.168.60.254
- Ping vers la VM cible :
ping 192.168.60.33
- Vérification de l'adresse IP VPN attribuée (doit être dans le tunnel 10.8.0.0/24) :
ipconfig
Résultat attendu :
Carte Ethernet OpenVPN : Adresse IPv4. . . . . . . : 10.8.0.x Masque de sous-réseau . . : 255.255.255.0 Passerelle par défaut . . : 10.8.0.1
Vérification côté pfSense
Dans l'interface web pfSense, vérifier les connexions actives :
Status → OpenVPN
┌──────────────┬──────────────┬──────────────┬──────────────┐ │ User │ Real IP │ VPN IP │ Connected │ ├──────────────┼──────────────┼──────────────┼──────────────┤ │ vpnuser │ X.X.X.X │ 10.8.0.2 │ 00:05:32 │ └──────────────┴──────────────┴──────────────┴──────────────┘
Résultat attendu
- ✓ VPN connecté — icône verte dans le client OpenVPN
- ✓ IP tunnel attribuée — adresse en 10.8.0.x visible dans ipconfig
- ✓ Accès au réseau 192.168.60.0/24 — ping vers pfSense et VMs opérationnel
- ✓ Accès aux machines internes — communication établie avec 192.168.60.33
Conclusion