AI and network security

How does a single gateway reduce attack surface?

A single gateway reduces attack surface by making it the only device on a site that the internet can reach. Every other device talks on the local network and sends anything that has to leave through that one point, so an attacker on the internet has one target instead of one per device, and defenders have one place to filter, watch and patch.

TL;DR

A gateway that is the only device on a site touching the internet turns hundreds of reachable targets into one, and gives defenders one place to filter, log and patch. NIST's SC-7(3) control asks to limit external connections. The gain holds only if the gateway carries a defined set of messages and devices keep working locally when it is down.

Learning objectives

After reading this article you will be able to:

  • Explain why routing a site's external traffic through one point shrinks what the internet can reach
  • Harden a gateway so it carries only what the site needs to send and receive
  • Keep the local network working when the gateway is down, so the narrow door never becomes a single point of failure

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.

  1. 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.
  2. 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.
  3. 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.
  4. 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.
  5. 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.

Frequently asked questions

Is one gateway a single point of failure?

Only for traffic that has to leave the site. If devices coordinate locally, the site keeps working when the gateway is down and queues what needs to go out. For availability, add a standby built to the same narrow contract rather than a second, different kind of door.

Is a gateway the same as a firewall?

No. A firewall filters traffic that passes through it, while a gateway in this pattern is the only device that talks to the outside at all, often translating between the local network and the internet. A gateway usually runs a firewall, but the bigger gain is that nothing behind it is reachable from the internet.

Does a single gateway stop attacks from inside the network?

No. It controls what crosses the boundary. Inside, devices should still authenticate each other and authorise every request, since NIST's zero trust guidance says no trust should come from network location alone.

What should a gateway be allowed to send?

Only the messages the site's workflows need, to the destinations they need, under the gateway's own credentials. Anything broader, such as general web access or remote shell from the internet, widens the door again.

Can the gateway read the messages it carries?

Not if content is encrypted end to end before it reaches the gateway. It then carries ciphertext, though it still sees volume and timing and can drop or delay messages.

Sources

Build it with Offline Protocol

The transport and routing docs explain how Offline Protocol devices coordinate over Bluetooth LE, Wi-Fi and local IP, and how a gateway is provisioned against a contract covering identity, delivery verdicts and recovery.

Read the transport and routing docs