Skip to content

AWS Network Firewall as Centralized Egress Proxy

0

I want to setup a architecture like below.

Services going to use:- aws network firewall as a egress proxy, network firewall interface endpoint.

I have 2 vpc's.

  1. Security VPC where I am going to deploy aws network firewall. In Same VPC I am creating NAT GW and IGW.

  2. In Client VPC, I have private ec2(in private subnet) which will send traffic to security vpc using network firewall interface endpoint.

Steps:-

Traffic generated from private ec2 -> traffic forwarded to network firewall endpoint -> left the vpc and reach to security vpc -> inspect here if it is allowed then pass to NAT -> IGW -> Internet; else drop.

Blocker:-

  1. In my account VPC CIDR overlapping issue persist so I can't use AWS Transit GW.
  2. If I use Gateway LB and deployed in security vpc at that moment it uses port 6081. We have to associate it with network firewall endpoint. it never connect and health check always in Unhealthy state(Because firewall never go into appliance mode).

So please go through the requirement and suggest me the above architecture is possible? any alternative solution available.

3 Answers
0

Based on your requirements, the architecture you're proposing with AWS Network Firewall as a centralized egress proxy faces some challenges.

First, it's important to understand that AWS Network Firewall is designed to work with AWS Transit Gateway in a centralized deployment model. AWS recommends deploying Network Firewall endpoints in multiple Availability Zones where you're running workloads. The firewall subnet should not contain any other traffic because Network Firewall cannot inspect traffic from sources or destinations within its own subnet.

Your blocker regarding VPC CIDR overlapping is significant because Transit Gateway is the recommended way to implement centralized Network Firewall inspection. Without Transit Gateway, routing traffic between your Client VPC and Security VPC becomes challenging.

AWS Network Firewall does not function as a traditional proxy service. It's designed to inspect and filter Layer 3-7 network traffic but requires proper routing configuration through Transit Gateway to function as a centralized inspection point.

Alternative solutions to consider:

  1. Resolve the CIDR overlapping issue if possible, as this would allow you to use Transit Gateway, which is the recommended approach for centralized Network Firewall deployment.

  2. Consider using NAT Gateway with network ACLs and security groups for basic filtering. You can use ACLs on the NAT Gateway public subnet(s) to allow or block source or destination IP addresses.

  3. For a centralized VPC endpoint architecture without Transit Gateway, you might need to explore other options like proxy instances running on EC2 in your Security VPC, though this would require custom configuration.

  4. If you're primarily concerned with securing access to AWS services rather than general internet egress, consider using VPC endpoints directly in your Client VPC.

The architecture you're proposing would typically require Transit Gateway to route traffic properly between VPCs for Network Firewall inspection. Without resolving the CIDR overlap issue, implementing this specific architecture would be challenging.
Sources
Using the NAT gateway with AWS Network Firewall for centralized IPv4 egress - Building a Scalable and Secure Multi-VPC AWS Network Infrastructure
Using the NAT gateway for centralized IPv4 egress - Building a Scalable and Secure Multi-VPC AWS Network Infrastructure
Centralized network firewall - AWS Prescriptive Guidance
Migrate your workloads to use VPC endpoints with minimum downtime | Networking & Content Delivery

answered a year ago

0

The Centralized Egress Network Firewall deployment model requires the use of the transit gateway for inter-VPC connectivity. You have to resolve the issue of overlapping VPC CIDRs to use this deployment model. My recommendation will be to renumber the IP network by creating a new Security VPC with non-overlapping CIDR, if possible.

Connecting two networks with overlapping CIDRs with any other workaround typically adds additional complexity. Adding the centralized egress network firewall deployment model to an overlapping VPC CIDR architecture will further increase this complexity and would not be an ideal setup.

If you are unable to create a new Security VPC (with non-overlapping CIDR), I would suggest using the the Distributed network firewall deployment model for the specific VPC which has overlapping CIDR. Here is a blog with the deployment architecture. https://aws.amazon.com/blogs/networking-and-content-delivery/deployment-models-for-aws-network-firewall/

AWS
EXPERT

answered a year ago

0

Introducing AWS Network Firewall Proxy in preview

Posted on: Nov 25, 2025

AWS introduces Network Firewall Proxy in public preview. You can use it to exert centralized controls against data exfiltration and malware injection. You can set up your Network Firewall Proxy in explicit mode in just a few clicks and filter the traffic going out from your applications and the response that these applications receive.

Network Firewall Proxy enables customers to efficiently manage and secure web and inter-network traffic. It protects your organization against attempts to spoof the domain name or the Server Name Indication (SNI) and offers flexibility to set fine-grained access controls. You can use Network Firewall Proxy to restrict access from your applications to trusted domains or IP addresses, or block unintended response from external servers. You can also turn on TLS inspection and set granular filtering controls on HTTP header attributes. Your Network Firewall Proxy offers comprehensive logs for monitoring your applications. You can enable them and send to Amazon S3 and AWS CloudWatch for detailed analyses and audit.

Try out AWS Network Firewall Proxy in your test environment today in US East (Ohio) region. Proxy is available for free during public preview. For more information check AWS Network Firewall proxy documentation.

https://docs.aws.amazon.com/network-firewall/latest/developerguide/network-firewall-proxy-developer-guide.html

AWS
EXPERT

answered 9 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.