1. Library
  2. Firewalls and Security
  3. Firewall Types

Updated 10 hours ago

Cloud computing introduces new approaches to network security that differ fundamentally from traditional firewall deployments. Cloud firewalls and security groups provide network protection using software-defined infrastructure rather than physical appliances, adapting firewall concepts to cloud-native architectures.

The Fundamental Shift

Traditional firewalls are bouncers at the door. All traffic flows through them, and they decide what enters and exits the network. Cloud firewalls take a radically different approach—they're bodyguards that travel with each resource.

When you create a cloud firewall rule, you're not configuring a specific device. You're defining policy that the cloud platform enforces across its infrastructure. The actual enforcement happens at multiple points—hypervisor layers, virtual switches, physical network infrastructure—invisible to you but surrounding every resource.

Traditional firewalls ask "should this traffic enter my network?" Cloud firewalls ask "should this traffic reach this specific resource?"—a different question entirely.

This distributed enforcement eliminates single points of failure. Scaling is automatic—as you add cloud resources, firewall protection scales with them. Performance isn't bottlenecked through one appliance—each resource has dedicated enforcement capacity.

Security Groups: The Core Construct

Security groups are the primary cloud firewall mechanism, originated by AWS but now offered in similar forms by all major cloud providers.

A security group is a collection of firewall rules associated with cloud resources like virtual machines. You define inbound rules (what traffic can reach the resource) and outbound rules (what traffic the resource can send). Rules specify sources and destinations (IP ranges or other security groups), protocols (TCP, UDP, ICMP), and ports.

Two characteristics define security groups:

Stateful: If you allow inbound traffic, return traffic is automatically permitted. No need for explicit outbound rules matching every inbound rule.

Default deny: All traffic is blocked unless you create a rule specifically permitting it. Unlike traditional firewalls where you specify both allow and deny rules, security groups only have allows—everything else is implicitly denied.

Assignment by Resource, Not Location

Security groups attach to resources, not network positions. When you launch a virtual machine, you associate it with one or more security groups. Those rules then control traffic to and from that instance regardless of where it sits in the network.

This enables powerful patterns. Multiple resources share security groups—all web servers use a "web-servers" group allowing ports 80 and 443. Resources combine security groups—a server has both "web-servers" and "ssh-access" groups.

Changes propagate instantly. Modify the "web-servers" security group to allow a new port, and all instances using that group immediately permit that port. No firewall rule tables to update, no change windows to schedule.

Security Groups vs. Traditional Firewalls

Security groups provide network access control, not comprehensive threat protection. They differ from traditional firewalls in important ways:

Simpler stateful tracking: Security groups remember which connections were initiated and allow return traffic. They don't provide deep stateful inspection examining protocol compliance or application behavior.

No advanced features: Application awareness, intrusion prevention, deep packet inspection, SSL decryption—these require dedicated firewall services, not basic security groups.

Per-resource enforcement: Each virtual machine has its own firewall boundary. Traffic between two instances in the same subnet still passes through security group evaluation.

Dynamic references: Rules can reference other security groups, not just IP addresses. Allow traffic from the "application-servers" security group, and the rule automatically adjusts as resources join or leave that group.

Network ACLs: The Subnet Layer

Cloud platforms also offer network ACLs (Access Control Lists) that filter at the subnet level, closer to traditional firewall placement.

Network ACLs apply to entire subnets. Rules are evaluated in order—first matching rule wins. They're stateless—you must explicitly allow both inbound requests and outbound responses.

Network ACLs typically serve as a secondary defense layer. Security groups provide primary protection per-resource; network ACLs provide broader filtering at subnet boundaries. Defense in depth.

Micro-Segmentation: The Real Power

Cloud firewalls enable something difficult in traditional networks: micro-segmentation, creating granular security boundaries between workloads in the same network.

In traditional networks, everything in the same subnet can typically communicate freely. Once inside the perimeter, movement is easy. Cloud security groups change this—you control traffic between resources even in the same subnet.

Picture web servers, application servers, and database servers all in the same subnet. Security groups ensure web servers can only reach application servers on specific ports. Application servers can only reach databases on database ports. Databases can't initiate outbound connections at all.

This limits lateral movement. If an attacker compromises one resource, security groups prevent easy access to other resources even in the same network segment. The blast radius shrinks.

Dynamic Environments Need Dynamic Security

Cloud environments are turbulent—resources created and destroyed constantly. Cloud firewalls accommodate this dynamism naturally.

Launch a new web server, and it automatically inherits the web server security group. No manual firewall updates. Terminate an instance, and no cleanup is needed—the security group association simply evaporates with the resource.

This is genuinely strange if you've spent years maintaining firewall rule tables, carefully adding and removing entries as servers come and go. In cloud environments, security configuration travels with the resource through its lifecycle.

Infrastructure-as-code tools define security groups alongside other infrastructure. Terraform or CloudFormation ensure security is configured consistently and automatically. Auto-scaling applies appropriate security groups to new instances as they spawn.

Advanced Cloud Firewall Services

Beyond security groups and network ACLs, cloud providers offer managed firewall services with advanced capabilities.

AWS Network Firewall, Azure Firewall, and Google Cloud Firewall provide stateful inspection, intrusion prevention, URL filtering, and protocol-specific filtering. These services bridge the gap between basic security groups and traditional next-generation firewalls.

They're deployed within your cloud virtual network but managed as a service—you configure policies without managing underlying infrastructure.

Virtual Appliances: Familiar but Complex

Traditional firewall vendors offer their products as cloud-deployable virtual appliances. Deploy Palo Alto Networks, Fortinet, or Check Point as virtual machines in cloud environments.

This provides familiar functionality for organizations already using these products. However, it means managing virtual appliance instances—updates, scaling, high availability—which increases complexity compared to native cloud firewalls.

Virtual appliances make sense for hybrid scenarios requiring consistent policy between on-premises and cloud, or when specific advanced features aren't available in native cloud firewalls.

Logging and Visibility

Cloud firewalls generate logs capturing traffic decisions. VPC Flow Logs (AWS), NSG Flow Logs (Azure), and VPC Flow Logs (Google Cloud) record traffic allowed or denied by firewall rules: source and destination addresses and ports, protocols, actions taken, timestamps.

Advanced managed firewall services provide deeper logging—application-layer information, detected threats, URL access patterns.

These logs feed monitoring systems, revealing cloud resource accessibility, security posture, and potential attacks.

Best Practices

Least privilege: Only open minimum required ports from minimum required sources. Default deny is built in—leverage it.

Defense in depth: Use both security groups (resource level) and network ACLs (subnet level). Layered protection catches what single layers miss.

Organize by role: Create security groups for web servers, application servers, databases. Assign multiple groups to resources rather than creating resource-specific groups.

Reference security groups in rules: Allow traffic from the "application" security group rather than hardcoding IP addresses. Rules automatically accommodate new application servers.

Audit regularly: Rules allowing 0.0.0.0/0 (all sources) deserve careful review. Security groups accumulate permissions over time.

Document intent: Tag security groups clearly. Maintain documentation of what each group protects and why specific rules exist.

Limitations

Cloud firewalls provide essential network security but have boundaries:

Basic security groups lack advanced threat protection—intrusion prevention, malware detection, URL filtering require managed firewall services or virtual appliances.

Application awareness is limited or absent in basic security groups. They see ports and protocols, not application behaviors.

SSL/TLS inspection isn't available in most cloud-native firewalls. Encrypted traffic passes uninspected.

Central visibility across multiple cloud accounts or providers requires additional tools.

Organizations often supplement cloud firewalls with additional controls—virtual appliances, cloud access security brokers, or enhanced managed services—depending on their security requirements.

Key Takeaways

  • Cloud firewalls distribute security enforcement throughout the infrastructure rather than concentrating it at boundaries. Each resource carries its own protection.
  • Security groups provide stateful, default-deny access control at the resource level. They're the primary cloud firewall construct.
  • The per-resource model enables micro-segmentation, restricting lateral movement even within the same subnet.
  • Cloud firewalls excel in dynamic environments. Security configuration travels with resources through their lifecycle—no manual rule maintenance.
  • Basic cloud firewalls lack advanced features like intrusion prevention and deep packet inspection. Advanced managed services or virtual appliances fill this gap.
  • Effective cloud firewall strategy combines security groups, network ACLs, and clear organization by functional role.

Frequently Asked Questions About Cloud Firewalls and Security Groups

Was this page helpful?

😔
🤨
😃