Date : 2026-03-21
Auteur : Daniel Caron
Version OS : Ubuntu 24.04 LTS Minimal
Rôle : Proxy interne — Nginx + Certificats PKI interne
VLAN : 60 (Serveurs)
IP : 10.21.60.14
FQDN : whvu1515.home.carontech.net
whvu1515 est le proxy interne de la zone Serveurs. Il reçoit le trafic HTTPS de whvu1010 (DMZ) et le route vers les serveurs applicatifs en HTTP. Il utilise des certificats signés par la CA intermédiaire interne CaronTech.
whvu1010:443 (Let's Encrypt) → whvu1515:443 (PKI interne) → serveur applicatif (HTTP)
Tous les services exposés via whvu1010 passent obligatoirement par whvu1515 — c'est le seul point d'entrée vers la zone Serveurs depuis la DMZ.
whvu1515| Type | Nom | Valeur |
|---|---|---|
| A | whvu1515.home.carontech.net |
10.21.60.14 |
sudo apt update && sudo apt upgrade -y
sudo apt install -y nginx
sudo systemctl enable nginx
sudo systemctl start nginx
Créée manuellement pour stocker les certificats PKI internes.
sudo mkdir -p /etc/pki/certs
sudo mkdir -p /etc/pki/private
sudo mkdir -p /etc/pki/csr
sudo mkdir -p /etc/pki/archive
sudo chown -R ubuntuadmin:ubuntuadmin /etc/pki
sudo chmod 700 /etc/pki/private
/etc/pki/
├── certs/ (certificats fullchain déployés)
├── private/ (clés privées — chmod 700)
├── csr/ (CSR temporaires)
└── archive/ (anciens certificats)
Le certificat de whvu1515 couvre tous les services proxifiés via SAN.
Généré depuis la station admin Windows via sign-cert.ps1.
| # | SAN |
|---|---|
| 1 | whvu1515.home.carontech.net |
| 2 | wiki.carontech.net |
| 3 | photos.carontech.net |
| 4 | vault.carontech.net |
Note : À chaque ajout de service, le certificat doit être régénéré avec le nouveau SAN ajouté.
.\sign-cert.ps1 -server whvu1515 -verbose
Le script effectue automatiquement :
whvu1515whvd9999whvu1515 → /etc/pki/certs/whvu1515-fullchain.crt| Fichier | Chemin |
|---|---|
| Fullchain | /etc/pki/certs/whvu1515-fullchain.crt |
| Clé privée | /etc/pki/private/whvu1515.key |
Modifier sign-cert.ps1 sur la station admin — section $serverSANs :
"whvu1515" = @(
"whvu1515.home.carontech.net",
"wiki.carontech.net",
"photos.carontech.net",
"vault.carontech.net",
"nouveau-service.carontech.net" # ajouter ici
)
sudo nano /etc/nginx/sites-available/immich.conf
#---------------------------
# Immich - proxy depuis whvu1010 et acces admin direct
#---------------------------
server {
listen 443 ssl;
server_name photos.carontech.net;
ssl_certificate /etc/pki/certs/whvu1515-fullchain.crt;
ssl_certificate_key /etc/pki/private/whvu1515.key;
ssl_protocols TLSv1.2 TLSv1.3;
ssl_ciphers HIGH:!aNULL:!MD5;
location / {
proxy_pass http://10.21.60.12:2283;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
}
sudo ln -s /etc/nginx/sites-available/immich.conf /etc/nginx/sites-enabled/
sudo nano /etc/nginx/sites-available/wiki.conf
#---------------------------
# Wiki.JS - proxy depuis whvu1010 et acces admin direct
#---------------------------
server {
listen 443 ssl;
server_name wiki.carontech.net;
ssl_certificate /etc/pki/certs/whvu1515-fullchain.crt;
ssl_certificate_key /etc/pki/private/whvu1515.key;
ssl_protocols TLSv1.2 TLSv1.3;
ssl_ciphers HIGH:!aNULL:!MD5;
location / {
proxy_pass http://10.21.60.16:3000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
sudo ln -s /etc/nginx/sites-available/wiki.conf /etc/nginx/sites-enabled/
sudo nano /etc/nginx/sites-available/vaultwarden.conf
#---------------------------
# Vaultwarden - proxy depuis whvu1010 et acces admin direct
#---------------------------
server {
listen 443 ssl;
server_name vault.carontech.net;
ssl_certificate /etc/pki/certs/whvu1515-fullchain.crt;
ssl_certificate_key /etc/pki/private/whvu1515.key;
ssl_protocols TLSv1.2 TLSv1.3;
ssl_ciphers HIGH:!aNULL:!MD5;
# Sécurité headers recommandés
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
add_header X-Content-Type-Options nosniff;
# Proxy HTTP Vaultwarden
location / {
proxy_pass http://10.21.60.17:8080;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
# Proxy WebSocket Vaultwarden
location /notifications/hub {
proxy_pass http://10.21.60.17:8080/notifications/hub;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
# proxy_set_header X-Real-IP $remote_addr;
# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# proxy_set_header X-Forwarded-Proto $scheme;
}
}
```bash
sudo ln -s /etc/nginx/sites-available/wiki.conf /etc/nginx/sites-enabled/
sudo nginx -t
sudo systemctl reload nginx
| Source | Destination | Port | Action |
|---|---|---|---|
| whvu1010 (VLAN 70) | whvu1515 (VLAN 60) | 443 | Allow |
| whvu1515 (VLAN 60) | whvu2020 (VLAN 60) | 2283 | Allow |
| whvu1515 (VLAN 60) | whvd2001 (VLAN 60) | 3000 | Allow |
| whvu1515 (VLAN 60) | whvd2002 (VLAN 60) | 8080 | Allow |
# Statut Nginx
sudo systemctl status nginx
# Vérifier les sites actifs
ls /etc/nginx/sites-enabled/
# Vérifier que Nginx écoute sur 443
sudo ss -tlnp | grep 443
# Tester l'accès à Wiki.JS depuis whvu1515
curl http://10.21.60.16:3000
# Tester l'accès à Immich depuis whvu1515
curl http://10.21.60.12:2283
# Tester l'accès à VaultWarden depuis whvu1515
curl http://10.21.60.17:8080
# Vérifier le certificat PKI
openssl x509 -in /etc/pki/certs/whvu1515-fullchain.crt -noout -text | grep -A1 'Subject Alternative Name'
openssl x509 -in /etc/pki/certs/whvu1515-fullchain.crt -noout -enddate
Voir runbook : Ajout d'un service sur le proxy