New: the AI firewall watches the whole platform and explains each incident in plain words. See how it works

Putting my ESP32 sensors on their own network: what do they need to reach?

Putting my ESP32 sensors on their own network: what do they need to reach?

Solved 6 4

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.

Ask me about 4–20 mA.
♥ 0

Does the AX55 let you set firewall rules per network, or only the guest on/off isolation switch?

♥ 2

Only the isolation switch as far as I can see, plus a bandwidth limit. No proper rules.

Ask me about 4–20 mA.
♥ 0

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?

Measure twice, poll once.
♥ 0

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.

Accepted solution♥ 1

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.

Ask me about 4–20 mA.
♥ 2

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.

♥ 1
Viewing 7 posts – 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.

Join the conversation

Sign in to ask and answer, like helpful posts and mark the reply that solved your problem. Every contribution earns points and levels.

Share