Exploring AWS Network Firewall: Hands-On Demo

Welcome to our AWS Certified Solutions Architect Professional tutorial series. In this tutorial, we’ll delve into the world of AWS Network Firewall, a powerful new feature introduced by AWS during the 2020 Re:Invent conference. We’ll take a hands-on approach to show you how to create a Network Firewall in your VPC, understand its architecture, and explore the problems it can solve for your VPC workloads.

But first, let’s take a moment to review the security capabilities AWS offers for your VPC.

Securing Your VPC

AWS provides various security features to protect your Virtual Private Cloud (VPC). At the instance level, we have Security Groups, which allow you to define rules for incoming and outgoing traffic to instances. Network ACLs, on the other hand, are applied at the subnet level and provide stateless rules for controlling traffic flow. Additionally, services like AWS WAF (Web Application Firewall) and AWS Shield help protect your web applications from threats and DDoS attacks.

While these features offer substantial security for your VPC workloads, there have been certain limitations. For example, there was no straightforward way to apply URL filtering or control traffic based on specific URLs. To address these limitations, AWS introduced the AWS Network Firewall.

Introducing AWS Network Firewall

AWS Network Firewall is a highly available, managed firewall service designed to work seamlessly with your VPC. It provides advanced capabilities to inspect and control traffic, making it an ideal solution for enhancing the security of your VPC workloads.

Let’s dive into the architecture of AWS Network Firewall and explore how it works.

AWS Network Firewall Architecture

In a typical VPC setup, traffic flows from your subnets directly to the internet gateway. While you can use security groups and network ACLs to control traffic, there’s often a need for more granular control and inspection. This is where AWS Network Firewall comes into play.

In a single Availability Zone (AZ) architecture, AWS Network Firewall creates a new subnet within your VPC dedicated to firewalling. Here’s how it works:

  1. Any outgoing traffic from your subnet to the internet is routed through the firewall subnet.
  2. The firewall subnet inspects the traffic based on your defined rules.
  3. If the traffic complies with the rules, it’s forwarded to the internet gateway; otherwise, it’s dropped.

For inbound traffic from the internet, AWS Network Firewall intercepts it and performs the same inspection process. This architecture provides a crucial layer of security that allows you to filter and control traffic entering and exiting your VPC.

In a two-Availability Zone architecture, you can set up firewall subnets in both AZs, ensuring comprehensive coverage for your VPC. The traffic inspection remains the same, with each firewall subnet handling traffic in its respective AZ.

Hands-On Demonstration

Now, let’s roll up our sleeves and create an AWS Network Firewall in your VPC to see how it works in practice.

Step 1: Preparations

Before starting, ensure that you have the following components set up in your VPC:

  • VPC with subnets (customer subnet and firewall subnet).
  • Route tables for each subnet.
  • Internet gateway associated with your VPC.

Step 2: Create AWS Network Firewall

  1. Go to the AWS VPC console.
  2. Create a new Network Firewall, specifying your VPC and selecting a subnet in which to deploy it.

Step 3: Configure Route Tables

  1. Modify your customer subnet’s route table to route traffic to the firewall subnet.
  2. Modify your firewall subnet’s route table to route traffic to the internet gateway.

Step 4: Define Firewall Rules

Create stateful and stateless rules in the Network Firewall rule groups to define the criteria for traffic inspection. Stateful rules are evaluated when traffic is initiated and when responses are received, while stateless rules are evaluated independently.

Step 5: Apply Firewall Policy

Create a Firewall Policy to combine your rule groups. In this policy, you can specify which rules to apply to your traffic. Policies are associated with the firewall.

Step 6: Test the Firewall

With the Network Firewall in place, test the traffic. For example, you can try accessing different websites to see how the firewall enforces your rules. URLs or other criteria can be used to block or allow traffic.

And there you have it – you’ve successfully set up and tested AWS Network Firewall in your VPC. It’s a robust solution for enhancing the security of your VPC workloads.

Conclusion

AWS Network Firewall offers an effective way to enhance the security of your VPC. By creating dedicated firewall subnets and defining granular rules, you can control and inspect incoming and outgoing traffic to meet your specific security requirements. This hands-on guide has shown you the practical steps to set up and use AWS Network Firewall effectively in your AWS infrastructure.

Stay tuned for more exciting deep dives into AWS services, and don’t forget to like, share, and subscribe for the latest updates and AWS tutorials. If you have specific topics or services you’d like us to explore, please let us know – we’re here to help you master the cloud!

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top