Installation et Configuration OpenVPN sur pfSense (Remote Access - LAB Proxmox)
Prérequis
|
Environnement nécessaire avant configuration |
- pfSense installé et fonctionnel
- VM client Windows
- Réseau LAN : 192.168.60.0/24
- pfSense LAN : 192.168.60.254
Accès interface :
https://192.168.60.254
---
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
Pays : FR
✔ Save
---
2 — Création du certificat serveur
System → Certificate Manager → Certificates → Add / Sign
- Method : Create internal certificate - Descriptive Name : OpenVPN-Server - CA : VPN-CA - Type : Server Certificate
✔ Save
---
3 — Configuration OpenVPN (Remote Access)
VPN → OpenVPN → Wizards
Authentication Backend :
Local User Access
CA :
VPN-CA
Certificat :
OpenVPN-Server
---
Paramètres serveur
- Mode : Remote Access (SSL/TLS) - Protocol : UDP - Interface : LAN (IMPORTANT en lab Proxmox) - 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 :
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
OpenVPN rules
Firewall → Rules → OpenVPN
Règle :
- Action : Pass - Source : OpenVPN net - Destination : LAN net - Protocol : any
---
WAN (si nécessaire)
- UDP 1194 autorisé vers pfSense
---
7 — Client VPN (VM Windows)
Installer :contentReference[oaicite:0]{index=0}
Importer le fichier .ovpn
Connexion :
- user : vpnuser - password : celui défini
---
8 — Tests de fonctionnement
Depuis 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 en environnement virtualisé Proxmox, permettant un accès sécurisé aux ressources internes via authentification utilisateur et certificats.