Accès Distant Sécurisé
Infrastructure d'accès distant déployée sur LXC 103 avec reverse proxy SSL, authentification SSO et VPN admin.
Architecture
Internet (176.150.159.44)
|
├─ Port 80/443 → Bbox NAT → LXC 103 NPM → Services web
└─ Port 51820/UDP → Bbox NAT → LXC 103 WireGuard → VPN
LXC 103 (192.168.1.14) - network-gateway
├── NPM : Reverse proxy SSL (80/443/81)
├── Authelia : SSO/2FA (9091)
├── WireGuard : VPN Server (51820/UDP)
├── Fail2ban : Protection anti-bruteforce
└── UFW : Firewall applicatif
Services Exposés
- flix.nliautaud.fr → LXC 100:8096 (Jellyfin, public)
- server.home.nliautaud.fr → LXC 101:3000 (Homepage)
- server.docs.nliautaud.fr → LXC 101:8001 (MkDocs)
- server.auth.nliautaud.fr → Authelia Portal
DNS & SSL
DNS OVH
Tous les sous-domaines pointent vers IP publique 176.150.159.44 :
flix.nliautaud.fr(A)server.*.nliautaud.fr(A)
Certificats SSL
- Provider : Let's Encrypt via NPM DNS-01 challenge
- API : OVH DNS API
- Renouvellement : Automatique (60j avant expiration)
- Validité : 90 jours
Configuration
Nginx Proxy Manager
WebUI : http://192.168.1.14:81
Proxy Hosts :
flix.nliautaud.fr→192.168.1.11:8096(Jellyfin)server.home.nliautaud.fr→192.168.1.12:3000(Homepage)server.docs.nliautaud.fr→192.168.1.12:8001(MkDocs)server.auth.nliautaud.fr→authelia:9091(Authelia)
Toutes les configurations incluent : Force SSL, HTTP/2, HSTS, WebSockets.
Authelia SSO
URL : https://server.auth.nliautaud.fr
Credentials : admin / AdminAuth2026!
Configuration : Voir authelia-forward-auth.md
WireGuard VPN
Endpoint : nliautaud.fr:51820
Subnet : 10.13.13.0/24
Configuration : Voir wireguard-setup.md
Peers : 3 configurés (adminlaptop, adminphone, admintablet)
Sécurité
Configuration : Voir security.md
Fail2ban : 4 jails actives (sshd, npm-general, npm-docker, authelia)
UFW : Firewall configuré
- SSH : LAN only (192.168.1.0/24)
- HTTP/HTTPS : Public (80/443)
- WireGuard : Public (51820/UDP)
Maintenance
Mise à jour services
# Update containers
pct exec 103 -- bash -c "cd /root/docker-compose && docker compose pull && docker compose up -d"
# Vérifier logs
pct exec 103 -- docker logs npm --tail 50
pct exec 103 -- docker logs authelia --tail 50
pct exec 103 -- docker logs wireguard --tail 50
Monitoring
# Docker stats
pct exec 103 -- docker stats --no-stream
# Fail2ban status
pct exec 103 -- fail2ban-client status
# UFW status
pct exec 103 -- ufw status verbose
# WireGuard peers connectés
pct exec 103 -- docker exec wireguard wg show
Troubleshooting
Service inaccessible depuis internet
- Vérifier DNS :
nslookup <domain> 8.8.8.8 - Vérifier NAT Bbox : http://192.168.1.254 > NAT/PAT
- Vérifier NPM Proxy Host : http://192.168.1.14:81
- Vérifier firewall UFW :
pct exec 103 -- ufw status - Tester depuis externe :
curl -I https://<domain>
Certificat SSL expiré
- Accéder NPM WebUI : http://192.168.1.14:81
- SSL Certificates > Renouveler manuellement
- Vérifier OVH API credentials valides
WireGuard ne connecte pas
- Vérifier NAT 51820/UDP dans Bbox
- Vérifier container :
pct exec 103 -- docker ps | grep wireguard - Tester port :
nc -vzu nliautaud.fr 51820 - Vérifier config client (Endpoint, PublicKey)
Accès LAN : DNS hairpinning
Symptôme : Services inaccessibles depuis PC LAN
Solution : Changer DNS PC vers Google DNS (8.8.8.8) - Bbox ne supporte pas NAT hairpinning.
Références
- LXC 103 Container
- Authelia Configuration
- WireGuard Setup
- Security (Fail2ban/UFW)
- Backup Infrastructure
Documentation officielle :