Network Zoning
You set up network zoning by splitting your cloud into small, isolated subnets. Then you place firewall rules between those zones to block bad traffic. Most teams start with three main zones for web apps, worker nodes, and databases. When teams make zones too big, one bad server can reach every database. Broad firewall rules also let devs log in with wide roles across many hosts. How network zoning works in cloud networks A zone is a group of hosts that share the same trust level. You build z
Zoning: the complete guide
Architecture patterns, implementation strategies, and security best practices. Delivered to your inbox.
You set up network zoning by splitting your cloud into small, isolated subnets. Then you place firewall rules between those zones to block bad traffic. Most teams start with three main zones for web apps, worker nodes, and databases. When teams make zones too big, one bad server can reach every database. Broad firewall rules also let devs log in with wide roles across many hosts.
How network zoning works in cloud networks
A zone is a group of hosts that share the same trust level. You build zones using virtual networks, subnets, route tables, and security groups. First, you map out how data flows between your apps and data stores. Public web traffic enters the edge zone first.
That edge zone only talks to the app zone on specific ports. Next, the app zone sends queries to the data zone over private routes. The data zone has no direct route to the public web at all. Route tables drop any packet that tries to skip a zone in line.
Teams also build a separate zone for admin tools and deployment runners. Engineers log in to that admin zone to fix servers or check logs. Security groups check the source address and port of every single packet. If the source address matches the rule, the firewall lets the traffic pass. If the address does not match, the firewall drops the packet right away.
Where native network zoning falls short
Subnets and firewalls do a great job of blocking strangers on the network. They stop a public web server from talking straight to a private database. They also keep test servers away from live production data stores. Still, a firewall only checks the host address and the port number.
Once a port is open, the firewall does not read the traffic inside. It decides who can open a pipe, not what runs inside that pipe. For example, an engineer in the admin zone can reach the production database. The firewall sees a valid source address and lets the session start.
Zoning: architecture patterns and best practices
Continue reading? Get the full guide.
Free. No spam. Unsubscribe anytime.
After login, that engineer often shares a broad database role with the team. They can run a bad delete query or dump a huge user table. The network log only shows bytes moving between two IP addresses on the configured port. It does not record which user ran a query or what rows changed.
How to add controls inside your zones
To close this gap, teams pair network rules with strict query and command checks. First, shrink your subnets so each app has its own small zone. Remove broad CIDR blocks that let whole office networks reach the data zone. Next, tie every action to a real person instead of a shared network role.
When a dev runs a query, your system should log the exact text. You should also require peer approval before someone runs a risky command in production. Data masking can rewrite emails, phone numbers, and card numbers in query results. This keeps sensitive fields safe even when a user is inside the right zone.
Add runtime guardrails and masking beside your databases and APIs
Login rules, role grants, and CI checks govern who connects to your stack. Yet any allowed script, engineer, or AI agent still runs commands with the full scope of its role. For workloads on Postgres, MySQL, SQL Server, MongoDB, ClickHouse, Kubernetes, SSH, or internal HTTP services, hoop.dev sits inline in the protocol beside the service as an open-source proxy, a sidecar for your database or API. On every production query an agent or human runs, hoop.dev decides whether to pass, mask, block, or escalate it for review.
Before a query runs, hoop.dev guardrails check the statement against your rules, an AI Analyzer you configure can score intent or hold risky calls for human approval, and hoop.dev data masking rewrites sensitive fields in responses in memory. Explore the MIT-licensed project on GitHub.
Frequently asked questions
What is the difference between a subnet and a security zone?
A subnet is a range of IP addresses inside your cloud network. A security zone is a trust boundary that can hold one or more subnets. All hosts inside a single zone follow the exact same firewall rules.
How many zones should a standard cloud setup have?
Most teams start with four core zones for their live cloud systems. These are the public edge zone, app zone, data zone, and admin zone. You should also keep test and staging zones separate from production zones.
Does network zoning stop bad database queries?
No, network rules only check IP addresses and ports before a session starts. Once a user logs in from an allowed zone, the firewall steps back. You need query controls and data masking to protect data during live sessions.
Related guides
In this post