Firewall ACL Examples

Published
Length
3 min read

Luis Felipe Dias

All posts

You build firewall acl examples by writing ordered rules that allow or block network packets. Each rule checks the source IP, destination IP, port, and protocol before traffic moves. Most teams start by blocking all traffic and then open specific ports for apps. When teams make these rules too broad, any host on the subnet can reach private systems. How firewall acl examples work in network setups A network rule list acts as a strict filter on routers and switches. It reads packets one by one

Firewall Configuration: the complete guide

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

Free white paper. No spam. Unsubscribe anytime.

You build firewall acl examples by writing ordered rules that allow or block network packets. Each rule checks the source IP, destination IP, port, and protocol before traffic moves. Most teams start by blocking all traffic and then open specific ports for apps. When teams make these rules too broad, any host on the subnet can reach private systems.

How firewall acl examples work in network setups

A network rule list acts as a strict filter on routers and switches. It reads packets one by one from the top of the list down. When a packet matches a rule, the filter acts right away and stops reading. If a packet reaches the bottom without a match, a hidden rule drops it.

Standard firewall acl examples only look at the source IP address of the packet. Admins place these basic lists close to the final destination to avoid blocking valid paths. Extended rule lists check the source IP, destination IP, port number, and network protocol. Teams place extended lists close to the source so bad traffic drops early.

A common web tier pattern lets public users reach the configured port on load balancers. A second rule lets the load balancer talk to app servers on a private port. A third rule lets only those app servers reach the database port on the data subnet. All other ports between subnets stay closed by the final drop rule.

Another pattern blocks outbound traffic from internal servers to unknown public IP addresses. This stops a compromised server from sending data out to an external host. Teams also add a rule for admin subnets to reach servers over management ports. Each rule needs clear order numbers so admins can insert new rules later.

What network rules solve and where they fall short

Network rules are great at stopping random port scans and unauthorized subnet traffic. They keep public guests out of private data tiers and limit lateral movement across hosts. A good rule list shrinks the attack surface of your cloud or data center.

Still, network rules only check packet headers like IP addresses and port numbers. They do not know which person or service is sending the traffic over that port. Once a host passes the IP check, the network filter stops watching the session.

Firewall Configuration: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

This leaves a big gap when engineers or apps run commands inside the session. An engineer on an allowed subnet can log in and drop a production table. A shared app server can run a query that reads thousands of customer card numbers. The network filter sees a valid IP and port, so it lets everything pass.

IP addresses also change often when teams use containers, laptops, or dynamic cloud nodes. Updating big rule lists by hand for every new IP causes outages and broken rules. Over time, admins fear breaking apps, so they leave old wide rules in place.

Why port rules cannot inspect commands in flight

Port filters work at the network layer and transport layer of the stack. They see packets and TCP handshakes, not SQL statements, shell commands, or API calls. To a network filter, a safe read query looks just like a full table delete.

Real security needs controls that understand both user identity and the exact command in flight. Teams must verify who the user is before they run a single query. They also need a way to mask sensitive fields like emails or phone numbers in results. Pairing network rules with command-level checks closes the gap between the subnet and the data.

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 and stateful rules?

Stateless rules check both inbound and outbound packets separately against the rule list. Stateful rules track active sessions and allow return traffic back through without a second rule.

Why does rule order matter in an ACL?

The filter reads rules from top to bottom and stops at the first match. If a broad block rule sits above a specific allow rule, the allow rule never runs.

How often should teams review their firewall rules?

Teams should review their rule lists at least once every quarter. Regular checks help admins remove unused IP rules and fix overly broad subnet permissions.

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.