first
This commit is contained in:
@@ -0,0 +1,171 @@
|
||||
# Diagramme réseau – HAOS Project
|
||||
|
||||
## Vue d'ensemble
|
||||
|
||||
```text
|
||||
INTERNET
|
||||
│
|
||||
┌──────────────┴──────────────┐
|
||||
│ │
|
||||
┌─────────▼─────────┐ ┌───────────▼───────────┐
|
||||
│ Cloudflare CDN │ │ Admin (mobile / PC) │
|
||||
│ (DNS + Tunnel) │ │ Client WireGuard │
|
||||
└─────────┬─────────┘ └───────────┬───────────┘
|
||||
│ Tunnel chiffré (sortant) │ UDP :51820
|
||||
┌─────────▼─────────────────────────────▼───────────┐
|
||||
│ Box / Routeur │
|
||||
│ 192.168.1.1 │
|
||||
│ 1 seul port ouvert : UDP 51820 (WireGuard) │
|
||||
└──────────────────────┬─────────────────────────────┘
|
||||
│ LAN 192.168.1.0/24
|
||||
┌─────────────────┼──────────────────┐
|
||||
│ │ │
|
||||
┌─────────▼────────┐ ┌─────▼──────────┐ ┌───▼──────────────────┐
|
||||
│ Mini-PC Proxmox │ │ Mini-PC HAOS │ │ Équipements IoT │
|
||||
│ 192.168.1.Y │ │ 192.168.1.X │ │ (Wi-Fi / Zigbee) │
|
||||
│ │ │ │ │ │
|
||||
│ ┌──────────────┐ │ │ ┌────────────┐ │ │ • Caméras IP (RTSP) │
|
||||
│ │ WireGuard │ │ │ │Home Asst. │ │ │ • ESP32 ESPHome │
|
||||
│ │ LXC :51820 │ │ │ │:8123 │ │ │ • Radiateurs Heatzy │
|
||||
│ └──────┬───────┘ │ │ ├────────────┤ │ └──────────────────────┘
|
||||
│ │ VPN │ │ │Mosquitto │ │
|
||||
│ │tunnel │ │ │MQTT :1883 │ │ ┌──────────────────────┐
|
||||
│ ▼ LAN │ │ ├────────────┤ │ │ Réseau Zigbee │
|
||||
│ ┌──────────────┐ │ │ │Zigbee2MQTT │◄├──│ Canal 11 / 2.4GHz │
|
||||
│ │ Apache │ │ │ │UI :8099 │ │ │ │
|
||||
│ │ Guacamole │ │ │ ├────────────┤ │ │ • Sirène │
|
||||
│ │ (CF Tunnel) │ │ │ │Frigate NVR │ │ │ • Capteur fuite │
|
||||
│ └──────────────┘ │ │ │:5000/:1984 │ │ │ • Boutons Zigbee │
|
||||
│ │ │ ├────────────┤ │ │ • IR Blasters │
|
||||
│ (cf. pve-project)│ │ │Cloudflared │ │ │ • Clavier à code │
|
||||
└──────────────────┘ │ │(tunnel out)│ │ │ • Ampoules │
|
||||
│ └────────────┘ │ └──────────────────────┘
|
||||
└────────────────┘
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Rôles des machines
|
||||
|
||||
| Machine | IP | Rôle |
|
||||
| -------------- | ------------- | -------------------------------------------------- |
|
||||
| Box / Routeur | 192.168.1.1 | Passerelle, NAT, 1 port ouvert (UDP 51820) |
|
||||
| Mini-PC Proxmox| 192.168.1.Y | WireGuard VPN (LXC), Guacamole, OPNsense, lab |
|
||||
| Mini-PC HAOS | 192.168.1.X | Home Assistant OS + tous les services domotiques |
|
||||
|
||||
> Le serveur WireGuard est hébergé sur le **Proxmox** (LXC dédié), pas sur HAOS.
|
||||
> L'accès VPN donne un accès au LAN complet, donc aussi à HAOS et ses interfaces d'admin.
|
||||
|
||||
---
|
||||
|
||||
## Adressage réseau
|
||||
|
||||
| Service | Hôte | Port | Protocole | Accessible depuis |
|
||||
| ------------------- | -------------- | ---------- | ---------- | ----------------------- |
|
||||
| Home Assistant | 192.168.1.X | 8123 | HTTP/WS | LAN + CF Tunnel |
|
||||
| Mosquitto MQTT | 192.168.1.X | 1883 | MQTT (TCP) | LAN uniquement |
|
||||
| Zigbee2MQTT UI | 192.168.1.X | 8099 | HTTP | LAN + VPN |
|
||||
| Frigate (UI) | 192.168.1.X | 5000 | HTTP | LAN + VPN |
|
||||
| Frigate (RTSP out) | 192.168.1.X | 1984 | RTSP | LAN uniquement |
|
||||
| WireGuard VPN | 192.168.1.Y | 51820 | UDP | WAN (port ouvert) |
|
||||
| Guacamole | 192.168.1.Y | — | HTTPS | CF Tunnel (Proxmox) |
|
||||
| Caméras IP | 192.168.1.X+n | 554 | RTSP | LAN uniquement |
|
||||
| ESP32 ESPHome | 192.168.1.X+n | — | mDNS/HTTP | LAN uniquement |
|
||||
|
||||
---
|
||||
|
||||
## Flux réseau détaillés
|
||||
|
||||
### Accès HAOS distant (HTTPS)
|
||||
|
||||
```text
|
||||
Utilisateur
|
||||
│
|
||||
▼ HTTPS :443
|
||||
Cloudflare Edge
|
||||
│
|
||||
▼ Tunnel QUIC chiffré (connexion sortante depuis HAOS)
|
||||
Cloudflared add-on (Mini-PC HAOS)
|
||||
│
|
||||
▼ HTTP local
|
||||
Home Assistant :8123
|
||||
```
|
||||
|
||||
### Administration SSH / Zigbee2MQTT / Frigate
|
||||
|
||||
```text
|
||||
Admin
|
||||
│
|
||||
▼ UDP :51820
|
||||
WireGuard LXC (Proxmox, 192.168.1.Y)
|
||||
│
|
||||
▼ Tunnel VPN → LAN 192.168.1.0/24
|
||||
Mini-PC HAOS :8099 (Z2M) / :5000 (Frigate) / SSH
|
||||
```
|
||||
|
||||
### Flux Zigbee → Home Assistant
|
||||
|
||||
```text
|
||||
Équipement Zigbee
|
||||
│ Radio 2.4GHz
|
||||
▼
|
||||
Sonoff USB Dongle (coordinateur, USB sur HAOS)
|
||||
│ Série USB
|
||||
▼
|
||||
Zigbee2MQTT (add-on HAOS)
|
||||
│ MQTT publish
|
||||
▼
|
||||
Mosquitto :1883 (add-on HAOS)
|
||||
│ MQTT subscribe
|
||||
▼
|
||||
Home Assistant
|
||||
```
|
||||
|
||||
### Flux caméras → Frigate → Home Assistant
|
||||
|
||||
```text
|
||||
Caméra IP
|
||||
│ RTSP :554 (LAN)
|
||||
▼
|
||||
Frigate NVR (add-on HAOS — décodage + détection CPU)
|
||||
├─▼ Événements MQTT → Mosquitto → Home Assistant
|
||||
├─▼ Snapshots → /config/www/
|
||||
└─▼ Enregistrements → /media/frigate/
|
||||
```
|
||||
|
||||
### Flux ESPHome → Home Assistant
|
||||
|
||||
```text
|
||||
ESP32 (capteur sol)
|
||||
│ Wi-Fi LAN
|
||||
▼
|
||||
ESPHome add-on (HAOS)
|
||||
│ API native chiffrée (mDNS)
|
||||
▼
|
||||
Home Assistant
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## WireGuard – Plage VPN (LXC Proxmox)
|
||||
|
||||
| Interface | Adresse | Usage |
|
||||
| ------------ | ------------- | -------------- |
|
||||
| wg0 (serveur)| 10.0.0.1/24 | LXC Proxmox |
|
||||
| Client 1 | 10.0.0.2/32 | Mobile admin |
|
||||
| Client 2 | 10.0.0.3/32 | PC admin |
|
||||
|
||||
Les clients VPN ont accès au LAN `192.168.1.0/24` via la route configurée dans WireGuard, ce qui inclut HAOS (`192.168.1.X`) et Proxmox (`192.168.1.Y`).
|
||||
|
||||
---
|
||||
|
||||
## Segmentation et isolation
|
||||
|
||||
L'isolation des équipements IoT repose sur :
|
||||
|
||||
- **Aucun accès WAN** configuré pour les caméras, ESP32 et équipements Zigbee
|
||||
- **Flux RTSP** consommés uniquement par Frigate en local
|
||||
- **MQTT non exposé** sur le WAN (port 1883 LAN only)
|
||||
- **ESPHome** sans cloud (API locale uniquement)
|
||||
|
||||
> Pour aller plus loin : VLAN IoT dédié sur switch manageable + règles firewall OPNsense (disponible sur le Proxmox — cf. `pve-project`).
|
||||
Reference in New Issue
Block a user