Je viens de terminer la conf pour accés depuis l'exterieur a mon HA avec nom de domaine OVH + Cloudflare. J'ai utilisé le tuto de Makernix...J'arrive bien sur la page de login de mon HA mais une fois les identifiants entré, j'arrive là dessus ...
PS: Plus sérieusement, sans log, sans traces, sans détails sur l’installation, c’est impossible de dire quoi que ce soit. A part, qu’il y a une erreur.
Bonjour,
J’ai installé l’addon cloudflare et l’ai configuré comme il faut, bref j’ai suivi tout le tuto…
Voilà ce que dit l’addon Cloudflare
----------------------------------------------------------
Add-on: Cloudflared
Use a Cloudflare Tunnel to remotely connect to Home Assistant without opening any ports
-----------------------------------------------------------
Add-on version: 5.1.20
You are running the latest version of this add-on.
System: Debian GNU/Linux 11 (bullseye) (amd64 / qemux86-64)
Home Assistant Core: 2024.9.1
Home Assistant Supervisor: 2024.09.1
-----------------------------------------------------------
Please, share the above information when looking for help
or support in, e.g., GitHub, forums or the Discord chat.
-----------------------------------------------------------
[14:40:14] INFO: Checking add-on config...
[14:40:15] INFO: Checking for existing certificate...
[14:40:15] NOTICE: No certificate found
[14:40:15] INFO: Creating new certificate...
[14:40:15] NOTICE:
[14:40:15] NOTICE: Please follow the Cloudflare Auth-Steps:
[14:40:15] NOTICE:
Please open the following URL and log in with your Cloudflare account:
https://dash.cloudflare.com/argotunnel?aud=&callback=https%3A%2F%2Flogin.cloudflareaccess.org%2Fvg_Z-LeSOfudkJv-1n450GqfFW3OLqkph6TxxxxxxxEGc%3D
Leave cloudflared running to download the cert automatically.
2024-09-16T12:41:08Z INF Waiting for login...
2024-09-16T12:42:00Z INF Waiting for login...
2024-09-16T12:42:53Z INF Waiting for login...
2024-09-16T12:43:46Z INF Waiting for login...
2024-09-16T12:44:38Z INF Waiting for login...
You have successfully logged in.
If you wish to copy your credentials to a server, they have been saved to:
/root/.cloudflared/cert.pem
[14:44:46] INFO: Authentication successfull, moving auth file to the '/data' folder
[14:44:46] INFO: Checking for existing certificate...
[14:44:46] INFO: Existing certificate found
[14:44:46] INFO: Checking for existing tunnel...
[14:44:46] NOTICE: No tunnel file found
[14:44:46] INFO: Creating new tunnel...
Tunnel credentials written to /data/tunnel.json. Keep this file secret. To revoke these credentials, delete the tunnel.
Created tunnel homeassistant with id 0cfb8698-4d79-4ff2-b33e-28305938bec9
[14:44:48] INFO: Checking for existing tunnel...
[14:44:48] INFO: Existing tunnel with ID 0cfb8698-4d79-4ff2-b33e-28305938bec9 found
[14:44:48] INFO: Checking if existing tunnel matches name given in config
[14:44:48] INFO: Existing Cloudflare Tunnel name matches config, proceeding with existing tunnel file
[14:44:48] INFO: Creating config file...
[14:44:49] INFO: Validating config file...
Validating rules from /tmp/config.json
OK
[14:44:49] INFO: Creating DNS entry ha-xxxxxx.fr...
2024-09-16T12:44:51Z INF Added CNAME ha-flahaut.fr which will route to this tunnel tunnelID=0cfb8698-4d79-4ff2-b33e-xxxxxxxxxxx8bec9
[14:44:51] INFO: Finished setting up the Cloudflare Tunnel
[14:44:51] INFO: Connecting Cloudflare Tunnel...
2024-09-16T12:44:51Z INF Starting tunnel tunnelID=0cfb8698-4d79-4ff2-b33e-2830xxxxxxxbec9
2024-09-16T12:44:51Z INF Version 2024.9.1
2024-09-16T12:44:51Z INF GOOS: linux, GOVersion: go1.22.2, GoArch: amd64
2024-09-16T12:44:51Z INF Settings: map[config:/tmp/config.json cred-file:/data/tunnel.json credentials-file:/data/tunnel.json metrics:0.0.0.0:36500 no-autoupdate:true origincert:/data/cert.pem]
2024-09-16T12:44:51Z INF Generated Connector ID: acxxxxxxxx6-66c6-4d4d-8ba0-034a2a4a3c57
2024-09-16T12:44:51Z INF Initial protocol quic
2024-09-16T12:44:51Z INF ICMP proxy will use 172.30.33.2 as source for IPv4
2024-09-16T12:44:51Z INF ICMP proxy will use :: as source for IPv6
2024-09-16T12:44:51Z INF Starting metrics server on [::]:36500/metrics
2024/09/16 14:44:51 failed to sufficiently increase receive buffer size (was: 208 kiB, wanted: 7168 kiB, got: 416 kiB). See https://github.com/quic-go/quic-go/wiki/UDP-Buffer-Sizes for details.
2024-09-16T12:44:52Z INF Registered tunnel connection connIndex=0 connection=c9a4306b-506d-4e3a-98e3-33bc6c5cb39f event=0 ip=198.41.200.193 location=cdg09 protocol=quic
2024-09-16T12:44:52Z INF Registered tunnel connection connIndex=1 connection=478a5031-236c-422b-a521-3ae7c4355f49 event=0 ip=198.41.192.227 location=cdg12 protocol=quic
2024-09-16T12:44:53Z INF Registered tunnel connection connIndex=2 connection=b0d8d56f-3628-44b6-867c-a82b05e4566f event=0 ip=198.41.200.73 location=cdg01 protocol=quic
2024-09-16T12:44:54Z INF Registered tunnel connection connIndex=3 connection=c85a5935-cd12-4b49-a430-511475d01ccb event=0 ip=198.41.192.47 location=cdg12 protocol=quic
Je vois également ca dans le journal HOME ASSISTANT CORE
Login attempt or request with invalid authentication from ecs-90-xx-xxx-xx.compute.prod-cloud-ocb.orange-business.com (90.xx-xxx-xx). Requested URL: '/auth/token'. (Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36)
Je ne vois pas en quoi on accède à HA de manière « très sécurisée » ? Enfin si on suit cette vidéo
Au minima il ne faut pas pouvoir accéder de l’extérieur à HA en HTTP.
Il ne faut pas laisser la possibilité de se connecter en HTTP de l’extérieur et forcer le mode HTTPS c’est un réglage à faire sous Cloudflare, toutefois j’ai l’impression que le module permet ce paramétrage sous HA.
Je ne peux que vous encourager à lire la doc de l’add-on qui malheureusement n’est pas à jour par rapport à cloudflare
Configurer également les utilisateurs en fonction des réseaux
Pour le réseau extérieur pour l’utilisateur autorisé dans Utilisateur-Sécurité vous pouvez activer l’authentification multi-facteur.
Ton accès se fait par cloudflare, après a toi de gérer tes règle la bas.
A mon gout beaucoup plus sécurise que la solution duckdns … Et certainement plus a jour niveau sécurité qu’une installation perso, ou faut faire les maj de sécurité, savoir pourquoi on ouvre se port ci ou ça … (pour la grande majorité des utilisateurs)
Franchement le seul vrai inconvénient de cette solution est HA companion quand on fixe des règles chez cloudflare mais hormis ça …
Merci !
J’ai réussi à activer les protection contre les bots et restreindre les accès à la France mais je ne trouve pas la page avec les options de sécurié de Couldflared. Elle est à quel niveau ?
Merci