Cloud Network Access Control
You set up cloud network access control by pairing subnet rules with host firewall rules. These rules check IP addresses, ports, and protocols before traffic reaches your servers or databases. Most teams start by blocking all public traffic and opening specific ports for internal subnets. When teams make these rules too broad, one open port exposes every service on that subnet. Attackers or broken scripts can then move across hosts without hitting another check. How native cloud network access
Network Access Control (NAC): the complete guide
Architecture patterns, implementation strategies, and security best practices. Delivered to your inbox.
You set up cloud network access control by pairing subnet rules with host firewall rules. These rules check IP addresses, ports, and protocols before traffic reaches your servers or databases. Most teams start by blocking all public traffic and opening specific ports for internal subnets. When teams make these rules too broad, one open port exposes every service on that subnet. Attackers or broken scripts can then move across hosts without hitting another check.
How native cloud network access control works
Cloud providers split traffic checks into two layers inside a virtual private network. The first layer sits at the subnet boundary and checks packets entering or leaving. Subnet rules are stateless, so you must write separate rules for inbound and outbound traffic. They process rules in order and stop at the first match that allows or blocks.
The second layer wraps around individual compute instances, containers, or database nodes. Host rules are stateful, so return traffic flows back out without a second rule. Instead of raw IP blocks, host rules can reference other host groups by their tags. An app server group can talk to a database group on one specific port. If a new server joins the app group, it gets the right path right away. Teams also attach identity roles to cloud workloads so services can talk to cloud APIs.
Why network rules leave an operational gap
Subnet and host rules do a great job of keeping unknown traffic off your ports. They stop scanners on the public web from reaching your private database or internal app. They also keep dev subnets separate from prod subnets when teams set them up right.
Still, network rules only care about where traffic starts and which port it hits. Once a packet passes the port check, the network layer steps out of the way. It cannot see who is typing commands or what queries run inside that open pipe. A user on an allowed VPN subnet can still run a drop table query. A script on an allowed app host can still read millions of customer card numbers. Static keys stored on those hosts stay valid until someone rotates them by hand. Network checks decide which host can reach a port, not what happens inside the session.
Network Access Control (NAC): architecture patterns and best practices
Continue reading? Get the full guide.
Free. No spam. Unsubscribe anytime.
How to tighten rules across cloud subnets
Start by mapping every service that needs to talk to another service on your network. Group your servers by function and give each group its own security tag. Replace broad subnet CIDR blocks in your host rules with those specific group tags. Remove any rule that opens all ports to internal private networks.
Next, place databases and internal stores in private subnets with no route to the internet. Use stateless subnet rules as a coarse backstop to block known bad port ranges. Review your network flow logs each week to find unused open ports and close them. Pair these network rules with query and command checks so you control actions in flight.
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 stateless subnet rules and stateful host rules?
Stateless subnet rules check inbound and outbound packets one by one with no memory. Stateful host rules track open sessions and let return traffic pass back through on its own.
Do private subnets remove the need for host firewall rules?
No, private subnets only block direct traffic from the public internet. You still need host rules to stop lateral movement between servers inside the same network.
Can cloud network rules mask sensitive fields like emails or phone numbers?
No, network rules only inspect packet headers like IP addresses and port numbers. Masking emails, phone numbers, or card numbers requires inspecting the actual data payload in flight.
Related guides
In this post