<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>cloud security consultant on Digi Hunch</title><link>https://www.digihunch.com/tag/cloud-security-consultant/</link><description>Recent content in cloud security consultant on Digi Hunch</description><generator>Hugo -- gohugo.io</generator><language>en-US</language><lastBuildDate>Wed, 02 Apr 2025 10:50:05 -0400</lastBuildDate><atom:link href="https://www.digihunch.com/tag/cloud-security-consultant/index.xml" rel="self" type="application/rss+xml"/><item><title>Firewall Deployment Patterns</title><link>https://www.digihunch.com/2024/11/firewall-deployment-patterns/</link><pubDate>Sat, 16 Nov 2024 16:24:15 -0400</pubDate><guid>https://www.digihunch.com/2024/11/firewall-deployment-patterns/</guid><description>&lt;img src="https://www.digihunch.com/wp-content/uploads/2025/04/feature-fw-deploy.webp" alt="Featured image of post Firewall Deployment Patterns" /&gt;&lt;p class="wp-block-paragraph"&gt;The Hub-and-Spoke topology is the most common topic in the discussion for building cloud infrastructure design. This topology appeared in both AWS and Azure design papers and had been around as a very important option in physical networking design. &lt;/p&gt;&#10;&lt;p class="wp-block-paragraph"&gt;The AWS whitepaper &lt;a href="https://docs.aws.amazon.com/pdfs/whitepapers/latest/building-scalable-secure-multi-vpc-network-infrastructure/building-scalable-secure-multi-vpc-network-infrastructure.pdf"&gt;Building a Scalable and Secure Multi-VPC AWS Network Infrastructure &lt;/a&gt;has thorough discussion on the topology. This topology often feature a Transit Gateway as the hub. In addition to workload VPCs, the network topology often includes some special-purpose VPCs, such as &lt;a href="https://github.com/aws-samples/landing-zone-accelerator-on-aws-for-cccs-medium/blob/main/architecture-doc/readme.md#632-endpoint-vpc"&gt;interface endpoints&lt;/a&gt; VPC, or &lt;a href="https://github.com/aws-samples/landing-zone-accelerator-on-aws-for-cccs-medium/tree/main/architecture-doc#636-central-vpc"&gt;shared tooling &lt;/a&gt;VPCs. One of the special-purpose VPC is the inspection VPC. It is a key design area to suit the need of inspection and traffic management for the business and the design may vary a lot depending on the available inspection tools such as a Firewall appliance. &lt;/p&gt;&#10;&lt;h2 class="wp-block-heading"&gt;Inspection Requirements&lt;/h2&gt;&#10;&lt;p class="wp-block-paragraph"&gt;The most common situation with an enterprise is connecting with on-prem networking. Options including Direct Connect, site-to-site IPsec or SD-WAN overlay. The business decides whether and at what level they would like to inspect the traffic between on-prem and their VPCs. Here is an example.&lt;/p&gt;&#10;&lt;figure class="wp-block-table"&gt;&lt;table class="has-fixed-layout"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;strong&gt;Connectivity&lt;/strong&gt;&lt;/td&gt;&lt;td&gt;&lt;strong&gt;Inspection Requirement&lt;/strong&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Between Workload VPCs (East-West)&lt;/td&gt;&lt;td&gt;No inspection&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Between a workload VPC and a special-purpose VPC&lt;/td&gt;&lt;td&gt;Normal Inspection&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Ingress Traffic from Internet to Workload VPC&lt;/td&gt;&lt;td&gt;Deep Packet Inspection&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Egress Traffic from Workload VPC to Internet&lt;/td&gt;&lt;td&gt;Deep Packet Inspection&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Between Workload VPC and on-prem networking over Direct Connect&lt;/td&gt;&lt;td&gt;Normal Inspection&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&amp;#8230;&amp;#8230;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/figure&gt;&#10;&lt;p class="wp-block-paragraph"&gt;With a normal inspection, the firewall appliance only checks the information in the packet&amp;#8217;s header, such as the source and destination IP addresses, port number, etc. With deep packet inspection, the appliance examins a larger range of metadata as well as the data in each packet. DPI provides a more effective mechanism to perform network packet filtering and find otherwise hidden threats. It is however an expensive operations from a performance standpoint. Ultimately the business makes the call but it is important to identify ALL connectivity scenarios in this phase and explicitly document the decision and rationales. They can choose from an NGFW product or the Network Firewall service from AWS, depending on capability required.&lt;/p&gt;&#10;&lt;h2 class="wp-block-heading"&gt;Inspection Architecture&lt;/h2&gt;&#10;&lt;p class="wp-block-paragraph"&gt;At minimum, inspection is required for ingress and egress traffic to and from workload VPC. The design must account for both routing and inspection. Many would use the same VPC for ingress/egress traffic and for inspection. &lt;/p&gt;&#10;&lt;p class="wp-block-paragraph"&gt;It is also possible to separate these two purposes into two different dedicated VPCs: an inspection VPC that hosts firewall services or appliances, and an ingress/egress VPC that directs traffic from and to the Internet but we must route the traffic to the inspection appliance. If all traffic to be inspected has to be routed through the Transit Gateway both ways, the cost would be high. In 2020 AWS introduced Gateway Load Balancer (GWLB) to address this use case. &lt;/p&gt;&#10;&lt;figure class="wp-block-image size-full"&gt;&lt;img loading="lazy" decoding="async" width="1024" height="351" src="https://www.digihunch.com/wp-content/uploads/2024/11/fw-gwlb.webp" alt="" class="wp-image-12996" srcset="https://www.digihunch.com/wp-content/uploads/2024/11/fw-gwlb.webp 1024w, https://www.digihunch.com/wp-content/uploads/2024/11/fw-gwlb-300x103.webp 300w, https://www.digihunch.com/wp-content/uploads/2024/11/fw-gwlb-768x263.webp 768w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /&gt;&lt;/figure&gt;&#10;&lt;p class="wp-block-paragraph"&gt;The &lt;a href="https://aws.amazon.com/blogs/networking-and-content-delivery/integrate-your-custom-logic-or-appliance-with-aws-gateway-load-balancer/"&gt;recommended pattern&lt;/a&gt; using GWLB allows you to place firewall appliance and a GWLB in one VPC, and place the GWLB endpoint (GWLBE) in a different VPC. The connectivity between GWLBE and GWLB is backed by HyperPlane, a technology that also enables other endpoint service such as PrivateLink. The connectivity between GWLB and the appliance take place with &lt;a href="https://en.wikipedia.org/wiki/Generic_Network_Virtualization_Encapsulation"&gt;Geneve&lt;/a&gt; encapsulation. This pattern places any appliance behind an endpoint, so long as the appliance supports Geneve protocol. &lt;/p&gt;&#10;&lt;p class="wp-block-paragraph"&gt;The GWLB technology enables a number of inspection patterns based on distributed ingress paths, as summarized in &lt;a href="https://d1.awsstatic.com/architecture-diagrams/ArchitectureDiagrams/distributed-inspection-architectures-gwlb-ra.pdf"&gt;this&lt;/a&gt; document. Distributed ingress/egress means each workload VPC can have their own Internet Gateway and NAT gateways. They must configure their route table so as to send the traffic via GWLBEs to inspection appliances. In general, I recommend this pattern over the centralized &lt;a href="https://d1.awsstatic.com/architecture-diagrams/ArchitectureDiagrams/centralized-ingress-with-alb-and-ec2-target-ra.pdf?did=wp_card&amp;amp;trk=wp_card"&gt;ingress&lt;/a&gt;/&lt;a href="https://d1.awsstatic.com/architecture-diagrams/ArchitectureDiagrams/NAT-gateway-centralized-egress-ra.pdf?did=wp_card&amp;amp;trk=wp_card"&gt;egress&lt;/a&gt; patterns where only the inspection VPC can take ingress traffic from Internet Gateway. The &lt;a href="https://d1.awsstatic.com/events/reinvent/2021/Network_architectures_for_inbound_traffic_inspection_REPEAT_NET311-R1.pdf"&gt;Network architectures for ingress traffic inspection&lt;/a&gt; presentation from 2021 ReInvent covered this topic as well, especially about the scaling benefit of distributed ingress.&lt;/p&gt;&#10;&lt;h2 class="wp-block-heading"&gt;Firewall deployment patterns&lt;/h2&gt;&#10;&lt;p class="wp-block-paragraph"&gt;The firewall deployment pattern available differ between vendors and the requirements. Since the GWLB pattern places appliances behind the GWLB, the appliances rely on Geneve traffic that GWLB forward over. Some vendors may argue that this pattern keeps the NGFW product from performing other tasks that do not support Geneve traffic. One example is Network Address Translation. The native NAT gateway services is very expensive (consider &lt;a href="https://fck-nat.dev/stable/"&gt;fck-nat&lt;/a&gt; as an alternative for NAT). Many clients want to use the NAT feature of the NGFW product. The architecture therefore has to be adjusted in favour of centralized egress. Review &lt;a href="https://aws.amazon.com/blogs/networking-and-content-delivery/best-practices-for-deploying-gateway-load-balancer/"&gt;this post &lt;/a&gt;about one-arm mode and two-arm mode.&lt;/p&gt;&#10;&lt;p class="wp-block-paragraph"&gt;If we have to go with central ingress/egress anyways, there are still numerous options. Take FortiGate for example, while the GWLB pattern of deployment is &lt;a href="https://github.com/fortinet/fortigate-terraform-deploy/tree/main/aws/7.6/gwlb-transit"&gt;supported&lt;/a&gt;, other available options include:&lt;/p&gt;&#10;&lt;ul class="wp-block-list"&gt;&#10;&lt;li&gt;&lt;a href="https://github.com/fortinet/fortigate-terraform-deploy/tree/main/aws/7.6/transitgwy"&gt;Traditional pattern&lt;/a&gt; with multiple interfaces across different subnets in the inspection VPC (L3 mode)&lt;/li&gt;&#10;&lt;li&gt;Integration with Transit Gateway using Transit Gateway &lt;a href="https://github.com/fortinet/fortigate-terraform-deploy/tree/main/aws/7.6/transitgwyconnect"&gt;Connect Attachment&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;Integration with Transit Gateway using Transit Gateway &lt;a href="https://community.fortinet.com/t5/Blogs/FortiGate-in-AWS-Landing-Zone-Accelerator/ba-p/339107"&gt;VPN Attachment&lt;/a&gt;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p class="wp-block-paragraph"&gt;I regard the first option as traditional because it does not &lt;span style="text-decoration: underline;"&gt;directly&lt;/span&gt; integrate with Transit Gateway and it is very similar to how we deploy them in a physical networking environment. Fortigate refers to it as &lt;a href="https://docs.fortinet.com/document/fortigate/7.4.0/ips-architecture-guide/756476/l3-nat-route-mode"&gt;L3 (NAT/route) mode&lt;/a&gt;. In this mode the Firewall appliance can also influence network routing. &lt;/p&gt;&#10;&lt;figure class="wp-block-image size-full"&gt;&lt;img loading="lazy" decoding="async" width="1024" height="680" src="https://www.digihunch.com/wp-content/uploads/2024/11/fgt-deploy.webp" alt="" class="wp-image-12997" srcset="https://www.digihunch.com/wp-content/uploads/2024/11/fgt-deploy.webp 1024w, https://www.digihunch.com/wp-content/uploads/2024/11/fgt-deploy-300x199.webp 300w, https://www.digihunch.com/wp-content/uploads/2024/11/fgt-deploy-768x510.webp 768w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /&gt;&lt;/figure&gt;&#10;&lt;p class="wp-block-paragraph"&gt;The second and the third options are similar except for different types of Transit Gateway attachments are used. The reason to directly integrate with Transit Gateway is so that the Transit Gateway can route the traffic for inspection therefore no need for a Gateway Load Balancer, and thus no dependency on the firewall features supporting Geneve. &lt;/p&gt;&#10;&lt;p class="wp-block-paragraph"&gt;The second option builds a GRE (Generic Routing Encapsulation) tunnel over a Transit Gateway Connect attachment as the transport tunnel, and uses BGP to exchange routes between the Transit Gateway and the appliance. It treats the firewall instances as &lt;a href="https://aws.amazon.com/blogs/networking-and-content-delivery/migrating-sd-wan-appliances-to-aws-transit-gateway-connect/"&gt;SD-WAN appliance&lt;/a&gt; and has performance benefit. The third option uses VPN attachment with the main benefit of encryption if it is part of compliance requirement.&lt;/p&gt;&#10;&lt;h2 class="wp-block-heading"&gt;Rules&lt;/h2&gt;&#10;&lt;p class="wp-block-paragraph"&gt;The rule configuration for Firewall is critical to the operation of the entire multi-VPC network configuration. Unfortunately, there is no standard with the rule syntax across majore NGFW vendors, leading to challenges for customers to swap vendors. Most flavours of rules have common elements such as&lt;/p&gt;&#10;&lt;ul class="wp-block-list"&gt;&#10;&lt;li&gt;Action (Pass, drop, or alert)&lt;/li&gt;&#10;&lt;li&gt;Source and Destination&lt;/li&gt;&#10;&lt;li&gt;Protocol and Port&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p class="wp-block-paragraph"&gt;A very common open-source firewall rule syntax is the &lt;a href="https://docs.suricata.io/en/latest/index.html"&gt;Suricata&lt;/a&gt;-compatible format. One important adopter is the AWS Network Firewall, which supports both stateful and stateless rule groups. With stateful rule group, there are two options for how the Suricata engine &lt;a href="https://docs.aws.amazon.com/network-firewall/latest/developerguide/suricata-rule-evaluation-order.html"&gt;evaluates rules&lt;/a&gt;. &lt;/p&gt;&#10;&lt;ul class="wp-block-list"&gt;&#10;&lt;li&gt;With &amp;#8220;Action Order&amp;#8221; option, Suricata engine evaluates the rules in the order of: pass, drop, reject and alert. You can use the priority attribute to influence evaluation; &lt;/li&gt;&#10;&lt;li&gt;With strict order, the rules are evaluated in the order of the rule definition;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p class="wp-block-paragraph"&gt;It is important to be aware of the rule evaluation order since it impacts the firewall behaviour deeply.&lt;/p&gt;&#10;&lt;h2 class="wp-block-heading"&gt;Summary&lt;/h2&gt;&#10;&lt;p class="wp-block-paragraph"&gt;In the networking infrastructure design, ingress and egress routing are the most critical one-way door decision. This decision must account for both routing and inspection. While there are many options, we usually start with capturing the key requirements. In this post we reviewed how to approach the requirement, a key technology Gateway Load Balancer and some firewall deployment patterns with FortiGate as an example. The approach is similar for other NGFW vendors, such as &lt;a href="https://www.paloaltonetworks.com/resources/guides/aws-transit-gateway-deployment-guide"&gt;Palo Alto&lt;/a&gt;, &lt;a href="https://checkpoint.awsworkshop.io/"&gt;Check Point&lt;/a&gt; or &lt;a href="https://catalog.us-east-1.prod.workshops.aws/workshops/38565e8c-3a5f-4e93-8412-5fdec23744ca/en-US"&gt;Cisco&lt;/a&gt; Secure Firewall. &lt;/p&gt;&#10;&lt;nav class="wp-post-navigation" aria-label="Post navigation"&gt;&#10;&lt;a rel="prev" href="https://www.digihunch.com/2024/10/choosing-cloud-certifications-wisely/"&gt;&lt;span class="wp-post-navigation-label"&gt;Previous Post&lt;/span&gt;&lt;strong class="wp-post-navigation-title"&gt;Cloud Certifications for Learning?&lt;/strong&gt;&lt;/a&gt;&#10;&lt;a rel="next" href="https://www.digihunch.com/2025/02/the-most-cost-effective-web-and-email-hosting/"&gt;&lt;span class="wp-post-navigation-label"&gt;Next Post&lt;/span&gt;&lt;strong class="wp-post-navigation-title"&gt;The Leanest Web and Email Hosting&lt;/strong&gt;&lt;/a&gt;&#10;&lt;/nav&gt;&#10;</description></item></channel></rss>