Lesson 3 of 4 Elastic Load Balancing

Inserting Network Appliances with a Gateway Load Balancer

This lesson explains how the Gateway Load Balancer inserts fleets of third-party virtual appliances, such as firewalls and intrusion detection systems, transparently into network traffic and scales them.

Learning outcomes

After completing this lesson, you will be able to:

  • Describe how a Gateway Load Balancer works.
  • Identify typical inspection designs.
  • Choose between a Gateway Load Balancer and AWS Network Firewall.

How it works

The Gateway Load Balancer (GWLB) distributes traffic to fleets of virtual network appliances, such as firewalls and intrusion detection systems. It operates at layer 3, forwarding whole IP packets to the appliances encapsulated with the GENEVE protocol on port 6081, so the appliances see the original packets.

GWLB endpoints, a type of PrivateLink endpoint, are placed as targets in route tables, so traffic is steered through the appliances transparently, without changing its source or destination addresses. Health checks remove failed appliances, and flow stickiness keeps both directions of each connection on the same appliance, which stateful inspection requires. The appliances themselves are typically bought from AWS Marketplace vendors.

The following diagram shows inbound traffic steered through an appliance fleet.

How a Gateway Load Balancer inspects traffic. A route table sends traffic to a GWLB endpoint, which carries it to the Gateway Load Balancer. The GWLB forwards each packet, encapsulated with GENEVE on port 6081, to a healthy appliance, keeping both directions of a flow on the same appliance. Inspected traffic returns the same way and continues to its destination with its addresses unchanged.
Because the appliances see the original packets, they can inspect traffic without the application or its clients changing anything.
True or false

How GWLB works

Exam skills 1.2.1

Check how a Gateway Load Balancer handles traffic.

Log in to try this activity Interactive activities are free with an account.

Typical designs

A Gateway Load Balancer is used to send traffic through security appliances without changing the application, and it appears in two common designs. In ingress inspection, the route table of the internet gateway sends incoming traffic to a Gateway Load Balancer endpoint, the GWLB distributes it across a fleet of firewall appliances, and the inspected traffic continues to the application. In centralised inspection, a single inspection VPC, attached to a transit gateway, holds the appliances, and the transit gateway routes traffic between VPCs, and from VPCs to the internet, through it, so one fleet inspects traffic for the whole network. The following table summarises the two designs.

DesignTraffic inspected
Ingress inspectionInternet traffic entering an application VPC, routed from the internet gateway through a GWLB endpoint
Centralised inspectionTraffic between VPCs and to the internet, routed through an inspection VPC attached to a transit gateway

GWLB or Network Firewall?

Both AWS Network Firewall and a Gateway Load Balancer with appliances inspect network traffic, and the choice depends on the organisation's requirements. AWS Network Firewall is AWS's own managed firewall, with stateless and stateful rules, intrusion prevention and domain-name filtering; it needs no appliances to manage and is usually the simpler choice. A Gateway Load Balancer is chosen when the organisation requires a particular third-party firewall or inspection appliance, for example to keep using the same vendor and policies it uses on premises.

Scenario questions

GWLB or Network Firewall?

Exam skills 1.2.1 · 3.4.4

Choose between a Gateway Load Balancer and AWS Network Firewall.

Log in to try this activity Interactive activities are free with an account.
Worked example

Inspecting inbound traffic with third-party firewalls

A company's security policy requires all internet traffic to its web application to pass through a specific vendor's firewall, which it already uses on premises.

ComponentRole
Firewall appliances from AWS MarketplaceRun in an inspection VPC, behind a GWLB
GWLB endpoint in the application VPCTarget of the ingress route table on the internet gateway
GWLB health checksRemove failed appliances automatically
Auto Scaling for the appliancesAdds capacity as traffic grows

Traffic flows from the internet gateway to the GWLB endpoint, through the appliances, and back to the ALB, without the application or its addresses changing.

Check yourself

What is a Gateway Load Balancer used for?

Show answer

Sending traffic transparently through a fleet of third-party virtual appliances, such as firewalls, and scaling them, using the GENEVE protocol.

Exam Tips

Remember for the exam

  • To place third-party firewall appliances inline, use a GWLB.
  • To inspect traffic with appliances without changing application routing, use GWLB endpoints in route tables.
  • For a managed AWS firewall with no appliances to run, use AWS Network Firewall.