IoT Security Basics You Shouldn't Skip
Default credentials, unencrypted MQTT, and open ports — and the simple fixes that close them.
By PB Lab
IoT devices are computers on your network, and too often they are the weakest link. A single insecure smart plug can become the doorway an attacker uses to reach everything else. The good news: most IoT breaches exploit a handful of basic mistakes, and each has a simple fix. Getting these right puts you ahead of the vast majority of deployments.
1. Change default credentials — always
The most common IoT vulnerability is also the most embarrassing: devices left on their factory username and password. Automated bots scan the internet for exactly these. Every device, every account, gets a unique strong password before it goes into service. No exceptions.
2. Encrypt your traffic
Plain MQTT and plain HTTP send everything — including credentials and sensor data — as readable text that anyone on the network path can capture. Use TLS: MQTT over TLS (port 8883) and HTTPS everywhere. On a local broker like Mosquitto, enabling TLS is a configuration change, not a rewrite, and it closes an entire class of eavesdropping attacks.
- MQTT over TLS (8883) instead of plain MQTT (1883)
- HTTPS for every web interface and API
- Reject unencrypted connections rather than merely allowing encrypted ones
3. Don't expose devices directly to the internet
Port-forwarding a device or a broker straight to the public internet is asking for trouble. Keep IoT devices on the local network and reach them through a secured gateway, a VPN, or an authenticated tunnel. If a service must be public, put authentication in front of it and keep it patched.
4. Segment your network
Put IoT devices on their own VLAN or guest network, separate from your computers and phones. If a device is ever compromised, segmentation contains the damage — the attacker lands in an isolated zone instead of on the same network as your sensitive data. Most modern routers support a separate IoT/guest network out of the box.
5. Keep firmware updated
Vulnerabilities are discovered constantly; updates are how they get fixed. Prefer devices from vendors that ship security updates, and for your own devices build in OTA updates from day one. A device you can't update is a liability with an expiry date.
The mindset
Treat every IoT device as if it will eventually be attacked, because at scale, everything is. None of these steps require deep expertise — just discipline. Unique passwords, encryption, no direct exposure, segmentation, and updates will keep you safe from the overwhelming majority of real-world threats.