Separar mis sensores ESP32 en su propia red: ¿a qué necesitan acceder?
Traducido del English por IA ·
Hola a todos, soy un principiante total, perdonad por el post tan largo.Tengo 5 ESP32 repartidos por casa (dos sensores de temperatura/humedad, un interruptor de lámina para la puerta del garaje, un sensor de fugas de agua bajo la caldera y otro que lee el LED del contador de la luz). Todos envían datos a mi cuenta de Hermetry por MQTT y me está yendo genial. Pero sigo leyendo historias de terror sobre dispositivos IoT baratos que se usan para entrar en redes domésticas, y mi mujer trabaja desde casa con un portátil de empresa en el mismo Wi-Fi, así que me gustaría separarlos.Mi router es un TP-Link Archer AX55 (el que me dio la compañía está en modo módem). Tiene una «Guest Network» con una opción llamada «Allow guests to see each other and access my local network», y también tengo una Raspberry Pi 3 antigua por ahí, por si sirve de algo.Lo que no tengo claro:1. Si pongo los ESP en la red de invitados, ¿seguirán llegando a Hermetry? ¿Necesito reenviar algún puerto? 2. ¿Hay algo en el lado de Hermetry que deba cambiar para blindarlo? 3. Uno de los ESP tiene una pequeña página web de configuración (el del contador). ¿Perderé el acceso a ella desde el móvil?Anoche moví uno de los sensores de temperatura a la Wi-Fi de invitados como prueba y desde entonces no ha enviado nada, así que seguro que he roto algo.
Hi all, total beginner here so apologies for the long post.
I’ve got 5 ESP32s around the house (two temp/humidity, a garage door reed switch, a water leak sensor under the boiler and one reading the electricity meter LED). They all report to my Hermetry account over MQTT and it’s been great. But I keep reading horror stories about cheap IoT stuff being used to get into home networks, and my wife works from home with a work laptop on the same Wi-Fi, so I’d like to separate them.
My router is a TP-Link Archer AX55 (ISP supplied one is in modem mode). It has a «Guest Network» with an option called «Allow guests to see each other and access my local network», and I also have an old Raspberry Pi 3 lying around if that helps.
What I’m not sure about:
1. If I put the ESPs on the guest network, will they still reach Hermetry? Do I need to forward any ports? 2. Is there anything on the Hermetry side I should change to lock it down? 3. One ESP has a little web page for config (the meter one). Will I lose access to that from my phone?
I tried moving one of the temperature sensors to the guest Wi-Fi last night as a test and it hasn’t sent anything since, so I’ve clearly broken something.
Traducido del English por IA ·
¿El AX55 permite configurar reglas de cortafuegos por red, o solo el interruptor de activación/desactivación del aislamiento de la red de invitados?
Does the AX55 let you set firewall rules per network, or only the guest on/off isolation switch?
Traducido del English por IA ·
Por lo que veo, solo el interruptor de aislamiento, además de un límite de ancho de banda. No hay reglas adecuadas.
Only the isolation switch as far as I can see, plus a bandwidth limit. No proper rules.
Traducido del English por IA ·
Creo que tendrás que reenviar el puerto 8883 en el router hacia los ESP, ya que el broker tiene que llegar a ellos a través de la red de invitados.
I think you’ll need to forward 8883 on the router to the ESPs, since the broker has to get to them through the guest network?
Traducido del English por IA ·
No hace falta reenvío, los dispositivos siempre inician las conexiones hacia afuera. Yo también soy del área de instalaciones, no de TI, pero lo viví en nuestro hotel el año pasado, cuando nuestro contratista de TI puso todos los sensores de las habitaciones y la pasarela de la caldera en un SSID separado, y aprendí mucho de aquello.Lo que los sensores necesitan de salida:
TCP 8883 MQTT over TLS to the device host on your Connection details card
TCP 443 only if any of them use the HTTPS device API
UDP 53 DNS (they connect by host name, TLS needs the name)
UDP 123 NTP, the ESP needs real time to check the server certificate
Nada de entrada. En la red de invitados del AX55 con «verse entre sí y acceder a mi red local» desactivado, obtienes más o menos lo correcto: los ESP pueden llegar a internet pero no al portátil.Mi suposición para tu sensor de prueba: o no puede resolver el host (algunas redes de invitados entregan DNS raros), o no puede obtener la hora. A nosotros nos pasó exactamente eso: los ESP fallaban en TLS porque NTP estaba bloqueado en el nuevo SSID. Mira la salida serie si puedes.En el lado de Hermetry, abre el perfil de tu dispositivo y revisa la lista de endurecimiento en la página de seguridad del transporte de dispositivos: MQTT sin cifrar desactivado (solo TLS, puerto 8883), token en la URL desactivado, comandos permitidos sin TLS vacío. También hay un campo de Redes permitidas (hasta 64 redes o direcciones); los dispositivos fuera de él son rechazados. Si tu casa tiene una IP pública fija, puedes ponerla ahí, de modo que un token copiado de una placa no sirva en ningún otro lugar.Para tu página del medidor: con el aislamiento activado, tu teléfono en la Wi-Fi principal no podrá acceder a él. Nosotros dejábamos un portátil en el SSID de los dispositivos para ese tipo de cosas.
No forwarding needed, the devices always call out. I’m a facilities guy too, not IT, but I went through this at our hotel last year when our IT contractor put all the room sensors and the boiler gateway on a separate SSID, and I learned a lot from that.
What the sensors need outbound:
TCP 8883 MQTT over TLS to the device host on your Connection details card
TCP 443 only if any of them use the HTTPS device API
UDP 53 DNS (they connect by host name, TLS needs the name)
UDP 123 NTP, the ESP needs real time to check the server certificate
Nothing inbound. On the AX55 guest network with «see each other and access my local network» switched OFF you get roughly the right thing: the ESPs can reach the internet but not the laptop.
My bet for your test sensor: either it can’t resolve the host (some guest networks hand out odd DNS), or it can’t get time. Ours did exactly that, the ESPs sat there failing TLS because NTP was blocked on the new SSID. Watch the serial output if you can.
On the Hermetry side, open your device profile and check the hardening list on the device transport security page: plain MQTT off (TLS only, port 8883), token in the URL off, commands allowed without TLS empty. There is also an Allowed networks field (up to 64 networks or addresses); devices outside it are refused. If your home has a fixed public IP you can put it there, so a token copied off a board is useless anywhere else.
For your meter page: with isolation on, your phone on the main Wi-Fi won’t reach it. We kept one laptop on the device SSID for that kind of thing.
Traducido del English por IA ·
Era eso. La red de invitados entrega bien el router como DNS, pero mi sketch usaba una IP de NTP fija que un cortafuegos bloqueaba, así que el reloj nunca se ajustó y TLS falló. Lo cambié a pool.ntp.org y el sensor volvió a funcionar. Los cinco están ahora en la red de invitados, con el aislamiento desactivado, y el portátil del trabajo no puede verlos.No toqué el reenvío de puertos, Kevin, gracias de todos modos.
That was it. Guest network hands out the router as DNS fine, but my sketch was using a hardcoded NTP IP that a firewall blocked, so the clock never set and TLS failed. Switched it to pool.ntp.org and the sensor came back. All five are on the guest network now, isolation off, and the work laptop can’t see them.
Didn’t touch the port forwarding, Kevin, thanks anyway.
Traducido del English por IA ·
Cuidado con las redes permitidas en una conexión doméstica. La mayoría de los ISP del Reino Unido cambian su IP pública de vez en cuando, y el día que cambie, todos los sensores serán rechazados (CONNACK 5; el motivo solo aparece en la pestaña Log del dispositivo). Utilícelo solo si paga por una IP estática.
Careful with Allowed networks on a home connection. Most UK ISPs change your public IP now and then, and the day it changes every sensor gets refused (CONNACK 5, the reason only shows on the device Log tab). Only use it if you pay for a static IP.
- Debes estar registrado para responder a este debate.
Únete a la conversación
Inicia sesión para preguntar y responder, dar me gusta a las publicaciones útiles y marcar la respuesta que resolvió tu problema. Cada aportación suma puntos y niveles.

