Network Segments

Published
Length
3 min read

Luis Felipe Dias

All posts

Network segments are small, separate parts of a computer network. You create them with subnets, virtual local networks, and firewall rules. Teams often put web servers, app servers, and databases into separate zones. If you make rules too broad, one hacked server can reach everything. Good zones limit where an attacker can move inside your systems. How network segments work in modern cloud setups To build network segments, you divide a large IP address block into subnets. Each subnet holds a

Segments: the complete guide

Architecture patterns, implementation strategies, and security best practices. Delivered to your inbox.

Free white paper. No spam. Unsubscribe anytime.

Network segments are small, separate parts of a computer network. You create them with subnets, virtual local networks, and firewall rules. Teams often put web servers, app servers, and databases into separate zones. If you make rules too broad, one hacked server can reach everything. Good zones limit where an attacker can move inside your systems.

How network segments work in modern cloud setups

To build network segments, you divide a large IP address block into subnets. Each subnet holds a specific group of servers or cloud workloads. Public subnets hold load balancers that take traffic from the open internet. Private subnets hold backend apps and databases that need strict protection.

Route tables control how packets move from one subnet to another. Network access control lists check traffic as it enters or leaves a subnet. These lists look at the source IP, destination IP, and port number. Security groups act like virtual firewalls right on the server network card. They track active links and block any port you do not open.

Teams also use virtual local networks when they run physical office switches. Each virtual network tags packets with a number to keep groups apart. Routers read these tags and drop traffic that crosses without a rule. In cloud setups, teams peer virtual networks or use transit hubs. This lets central security teams check traffic moving between different cloud accounts.

Planning IP blocks and routing rules

Good design starts with clear IP blocks that do not overlap. If two zones share IP ranges, routers cannot send packets between them. Teams usually give each cloud account and region its own address block. Within that block, they split zones by workload tier and data sensitivity.

Next, admins write deny-by-default rules on every zone boundary. They open only the exact port needed for one app to talk. For example, the app zone can reach the database port. The public web zone cannot reach the database zone at all. Admins also log blocked packets at the zone edge to spot scans.

What network zones solve and what they miss

Dividing a network stops broad network scans and limits lateral movement. If an attacker gets into a web server, they hit a wall. They cannot scan the management port on a database five subnets away. This setup is great for keeping public traffic away from private backends. It also helps teams meet basic audit rules for separating card data.

Segments: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

Still, network rules only check IP addresses and port numbers. Once a user or app is inside an allowed zone, the firewall steps back. The firewall allows the link, and it cannot read the commands inside. It decides who can open a socket, not what queries run in flight.

Engineers still need a way to run tasks on production databases. Teams often open VPN routes or peering paths from staff laptops to private zones. Once that network path opens, an engineer logs in with a shared role. A mistyped delete query or a huge data export sails right through. The firewall sees valid traffic on an allowed port and lets it pass.

Static network rules also struggle when cloud servers change IP addresses every hour. Teams end up opening whole subnet ranges just to keep apps running. When a whole subnet is open, any server in that zone has reach. True safety requires checking the user identity and each command at run time. Masking rules can also rewrite emails, phone numbers, and card numbers in results.

Govern statements and responses across databases and APIs

Good config and scoped roles are needed setup. They do not check single queries in flight or mask sensitive fields in returned rows. Across Postgres, MySQL, SQL Server, MongoDB, ClickHouse, Kubernetes APIs, SSH, and internal HTTP endpoints, hoop.dev runs beside each supported service as an open-source proxy, a sidecar for your database or API.

First, hoop.dev guardrails block banned queries before they run. Then hoop.dev data masking rewrites matched sensitive values in responses in memory. The audit trail records every statement and verdict per resource. Furthermore, hoop.dev holds SOC 2 Type II and is open source on GitHub.

Frequently asked questions

What is the difference between a subnet and a VLAN?

A VLAN splits traffic at layer two on local switches using packet tags. A subnet splits traffic at layer three using IP address blocks and routers. Most teams map one subnet to one VLAN to keep network rules simple.

How many zones should a basic cloud app use?

A standard setup uses three main tiers for each deployment stage. You put load balancers in a public zone and apps in a private zone. Databases go into a third isolated zone that has no internet route.

Do network firewalls stop bad database queries?

No, standard network firewalls and security groups only check IP addresses and ports. If a user has a valid route and port open, the firewall passes traffic. It cannot read SQL statements, stop a drop table command, or mask card numbers.

Save the open-source gateway.

hoop is MIT-licensed infrastructure for controlling how AI agents reach production data. Star hoophq/hoop so you can inspect it, deploy it, or share it when your team starts governing agent access.