Gateway attack surface reduction
A single gateway reduces attack surface because it is the only thing on the site the internet can reach. Every other device, from phones and handhelds to sensors and controllers, talks on the local network and has no public address of its own. An attacker on the internet who wants into the site has one target to work on, not hundreds.
This is how the largest IoT attacks worked in reverse. In 2016 the Mirai botnet continuously scanned the internet for vulnerable devices and tried a short list of 62 common default usernames and passwords over Telnet. CISA reported that one Mirai attack used about 380,000 infected devices, mostly home routers, network cameras and video recorders. Each of those devices was reachable from the internet on its own. Behind a single gateway, none of them would have answered the scan.
NIST’s security control catalogue makes the same point as a requirement. Control SC-7(3) says to limit the number of external network connections to a system, because fewer connections make inbound and outbound traffic easier to monitor. CISA’s guidance for operational technology goes further: its first mitigation is to remove OT connections to the public internet entirely.
Gateway benefits for defenders
A gateway gives defenders one place to look and one place to act.
- One place to filter. The gateway decides which destinations the site may talk to and which messages may cross. A rule written once applies to every device behind it.
- One place to log. Every message that leaves or enters passes through it, so unusual traffic, such as a device suddenly sending far more than usual, is visible in one log.
- One place to patch. When a flaw is published in an internet-facing component, there is one device to update fast, not a fleet with mixed firmware.
- One identity to the outside. Outside services see the gateway’s credentials, not a separate key on every device, so there is one credential to scope, rotate and revoke.
Gateway hardening
Hardening a gateway means making it narrow, then making it boring. A gateway that does many things is a server with a large attack surface of its own.
- Carry a defined set of messages. Decide what the site sends out and receives, and refuse everything else. The gateway should not offer general web browsing, remote desktop or a shell to the internet.
- Open no inbound ports if you can avoid it. A gateway that only makes outbound connections to known destinations has nothing listening for an internet scanner to find.
- Give it its own identity. Authenticate the gateway to the services it reaches with credentials scoped to its job, and authenticate devices to the gateway with their own keys.
- Encrypt content end to end before it reaches the gateway. Then a compromised gateway carries ciphertext it cannot read. It can still see volume and timing and can drop or delay messages, so applications should confirm delivery with a receipt from the destination.
- Keep authorising inside. NIST’s zero trust guidance says no trust should be granted on network location alone. A device on the local network should still prove who it is, and every request should still be authorised.
Gateway single point of failure
A single gateway is not a single point of failure if the site works without it. The gateway is a single point of failure only for workflows that need the internet. If devices coordinate locally, a gateway outage pauses what has to leave the site while everything else carries on, and outbound messages wait in a queue until the path returns. CISA’s guidance for operational technology follows the same thinking when it asks operators to practise and maintain the ability to run their systems manually: the site should never depend on its outside link to do its core job.
For higher availability, add a standby gateway built to exactly the same narrow contract. Two copies of one small door are still a small attack surface; a second door of a different kind is not.
Offline Protocol gateway design
Offline Protocol was built for this single-gateway shape. Devices discover, verify and message each other over Bluetooth LE, Wi-Fi and local IP with no internet, using Ed25519 keys generated on each device and MLS end-to-end encryption, and a local mesh needs no portal account or API key. Nothing about local coordination requires a device to be reachable from the internet.
When a site does need the wider network, it gets there through a gateway you deploy and configure, not a role a phone drifts into. The docs are explicit: a gateway is provisioned against a defined contract, including identity, delivery verdicts and recovery, and a device that happens to have internet access does not automatically become a trusted upload destination. A Python gateway runs as a full peer on a Linux box, and can run with its internet path switched off until you decide what should cross. The threat model also records what the gateway does not prove: gateway delivery is not authenticated proof that the destination accepted a message (residual risk R10), so applications confirm with their own receipts. The result is a site with one hardened, narrow door to the internet and a local network that keeps working on its own.