Installation et Configuration OpenVPN sur pfSense (Remote Access - LAB Proxmox)
Prérequis
Environnement nécessaire
- pfSense installé et fonctionnel
- VM client Windows
- Réseau LAN : 192.168.60.0/24
- pfSense LAN : 192.168.60.254
Accès interface pfSense :
https://192.168.60.254
Schéma logique :
VM Client VPN
│
▼
┌──────────────┐
│ pfSense │
│ OpenVPN SRV │
└──────┬───────┘
│
┌──────────┴──────────┐
│ │
192.168.60.33 autres VMs LAN
1 — Création de l’Autorité de Certification (CA)
|
Création de la CA interne pfSense |
Accès
System → Certificate Manager → Authorities → Add
Configuration
Method : Create an internal Certificate Authority Descriptive Name : VPN-CA Key Length : 2048 Digest : SHA256 Lifetime : 3650
Common Name :
VPN-CA
✔ Save
2 — Création du certificat serveur
System → Certificate Manager → Certificates → Add / Sign
Method : Create internal certificate Descriptive Name : OpenVPN-Server Certificate Authority : VPN-CA Type : Server Certificate Key Length : 2048 Digest : SHA256
✔ Save
3 — Configuration OpenVPN (Remote Access)
|
Configuration du serveur OpenVPN |
VPN → OpenVPN → Wizards
Authentification
Local User Access
CA :
VPN-CA
Certificat :
OpenVPN-Server
---
Paramètres serveur
Server Mode : Remote Access (SSL/TLS) Protocol : UDP Interface : LAN Port : 1194
---
Cryptographie
TLS Authentication : activé Encryption : AES-256-GCM Auth Digest : SHA256
---
Réseau VPN
Tunnel Network : 10.8.0.0/24 Local Network : 192.168.60.0/24 DNS Server : 192.168.60.254
✔ Finish
4 — Création utilisateur VPN
System → User Manager → Add
Username : vpnuser Password : sécurisé
✔ Cocher :
Click to create a user certificate
CA :
VPN-CA
✔ Save
5 — Export client OpenVPN
Installer :
openvpn-client-export
Puis :
VPN → OpenVPN → Client Export
Télécharger :
Windows Installer (.exe)
6 — Firewall pfSense
Firewall → Rules → OpenVPN
Action : Pass Source : OpenVPN net Destination : LAN net Protocol : any
7 — Client VPN (VM Windows)
Installer :
- contentReference[oaicite:0]{index=0}
Importer le fichier .ovpn
Connexion :
User : vpnuser Password : celui défini dans pfSense
8 — Tests de fonctionnement
Depuis la VM client :
ping 192.168.60.254 ping 192.168.60.33
Vérifier IP VPN :
10.8.0.x
Résultat attendu
✔ Connexion VPN établie ✔ IP tunnel 10.8.0.x attribuée ✔ Accès réseau 192.168.60.0/24 ✔ Accès aux VM internes Proxmox
Conclusion
La solution met en place un VPN Remote Access SSL/TLS sur pfSense dans un environnement Proxmox, permettant un accès sécurisé aux machines internes via authentification utilisateur et certificats.