AWS Network Firewall
A managed, VPC-wide firewall and IPS that inspects traffic from Layer 3 to Layer 7, in any direction. It is the answer to "protect the entire VPC in a sophisticated way" — beyond what a security group or NACL can express, and deeper into the network than WAF reaches.
Một firewall và IPS quản lý ở cấp toàn VPC, soi traffic từ Layer 3 tới Layer 7, theo mọi hướng. Đây là đáp án cho "bảo vệ cả VPC một cách tinh vi" — vượt xa những gì security group hay NACL diễn đạt được, và đi sâu vào mạng hơn tầm với của WAF.
The things that make it exam-recognisable: it can filter by domain and protocol, does intrusion prevention, uses the Gateway Load Balancer internally, and deploys as a central inspection VPC behind a Transit Gateway.
Những điểm nhận diện trong đề: lọc được theo domain và protocol, làm ngăn chặn xâm nhập (IPS), dùng Gateway Load Balancer bên trong, và triển khai thành một inspection VPC tập trung phía sau Transit Gateway.
Where it sits — the network-protection familyNó nằm ở đâu — họ công cụ bảo vệ mạng
AWS network protection is a stack of tools at different layers. Network Firewall is the VPC-wide, L3–L7, any-direction one — it does not replace the others, it sits above them. Know which question each answers. Bảo vệ mạng trên AWS là một chồng công cụ ở các tầng khác nhau. Network Firewall là cái ở cấp toàn VPC, L3–L7, mọi hướng — nó không thay thế các cái kia, mà đứng trên chúng. Nhớ mỗi cái trả lời câu hỏi nào.
| ToolCông cụ | Scope & layerPhạm vi & tầng | AnswersTrả lời cho |
|---|---|---|
| Security GroupSecurity Group | per ENI / instance · stateful · allow-only · L4theo ENI / instance · stateful · chỉ allow · L4 | who may reach this instanceai được tới instance này |
| NACL | per subnet · stateless · allow + deny · L4theo subnet · stateless · allow + deny · L4 | coarse allow/deny at the subnet edgeallow/deny thô ở biên subnet |
| WAF | L7 HTTP on CloudFront / ALB / API GatewayL7 HTTP trên CloudFront / ALB / API Gateway | malicious web requests (SQLi, XSS, rate)request web độc hại (SQLi, XSS, rate) |
| Shield | edge · DDoS protectionedge · chống DDoS | volumetric / DDoS attackstấn công DDoS / volumetric |
| Firewall ManagerFirewall Manager | org-wide policy managerquản lý policy toàn tổ chức | manage WAF/SG/Network Firewall across accountsquản lý WAF/SG/Network Firewall xuyên account |
| Network FirewallNetwork Firewall | whole VPC · L3–L7 · any direction · stateful + IPScả VPC · L3–L7 · mọi hướng · stateful + IPS | sophisticated whole-VPC filtering: domains, protocols, threatslọc cả VPC tinh vi: domain, protocol, mối đe doạ |
What it inspects — any direction, L3 to L7Nó soi gì — mọi hướng, L3 tới L7
You route the traffic you want inspected through the firewall. It can sit on any path in or out of the VPC: to and from the internet, to a peered VPC, and to and from Direct Connect or Site-to-Site VPN. Bạn định tuyến traffic cần soi đi xuyên qua firewall. Nó đặt được trên bất kỳ đường vào/ra VPC: đi/đến internet, tới VPC đã peer, và đi/đến Direct Connect hoặc Site-to-Site VPN.
Think of it as a checkpoint you can place on any road in or out of the VPC. Unlike a security group (tied to an ENI) or WAF (tied to an HTTP entry point), the firewall inspects whole flows regardless of direction — which is why "inspect VPC-to-VPC and egress traffic centrally" points straight here.
Coi nó như một trạm kiểm soát đặt được trên bất kỳ con đường vào/ra VPC. Khác security group (gắn vào ENI) hay WAF (gắn vào điểm vào HTTP), firewall soi cả luồng bất kể hướng nào — nên đề "soi traffic VPC-với-VPC và egress một cách tập trung" là trỏ thẳng vào đây.
Fine-grained controls — rules, actions, loggingKiểm soát chi tiết — rule, action, logging
Thousands of rules, matched however you need, each with an action of allow / drop / alert. Plus active flow inspection (intrusion prevention) against known network threats. Rule-match logs stream to S3, CloudWatch Logs, or Firehose. Hàng nghìn rule, khớp theo mọi kiểu bạn cần, mỗi rule có action allow / drop / alert. Kèm active flow inspection (ngăn chặn xâm nhập) chống các mối đe doạ mạng đã biết. Log rule khớp đẩy tới S3, CloudWatch Logs, hoặc Firehose.
*.mycorp.com or an approved software repo — domain-based egress control.Chỉ cho ra *.mycorp.com hoặc repo phần mềm được duyệt — kiểm soát egress theo domain.
*.mycorp.com and our package repo, nothing else on the internet" is a stateful domain list — and it is the classic Network Firewall question, because neither a security group (no domains, no egress-by-name) nor WAF (HTTP entry points only) can express it.
"Instance chỉ được tới *.mycorp.com và repo gói của chúng ta, ngoài ra không được ra internet" chính là một stateful domain list — và là câu hỏi Network Firewall kinh điển, vì cả security group (không có domain, không lọc egress theo tên) lẫn WAF (chỉ ở điểm vào HTTP) đều không diễn đạt nổi.
Central architecture — inspection VPC + Transit GatewayKiến trúc tập trung — inspection VPC + Transit Gateway
At scale you don't put a firewall in every VPC. You route everything through a Transit Gateway to one shared inspection VPC that holds the Network Firewall, then back out. That covers North-South (egress to internet, to VPN/DX) and East-West (VPC-to-VPC) from a single place. Ở quy mô lớn, bạn không đặt firewall vào mọi VPC. Bạn định tuyến mọi thứ qua một Transit Gateway tới một inspection VPC dùng chung chứa Network Firewall, rồi quay ra. Cách đó phủ cả Bắc-Nam (ra internet, tới VPN/DX) lẫn Đông-Tây (VPC-với-VPC) từ một chỗ duy nhất.
The shape to memorise: workload VPCs attach to a Transit Gateway, which forces traffic through the inspection VPC's firewall before it reaches the internet (via an egress VPC), on-prem (via VPN/DX), or another VPC. One firewall protects everything.
Dáng cần thuộc: các VPC workload gắn vào Transit Gateway, TGW ép traffic đi qua firewall trong inspection VPC trước khi tới internet (qua egress VPC), tới on-prem (qua VPN/DX), hay tới VPC khác. Một firewall bảo vệ tất cả.
Things that catch you outNhững chỗ dễ sập bẫy
- It is not WAF. WAF filters HTTP requests at CloudFront/ALB/API Gateway; Network Firewall filters whole-VPC L3–L7 traffic. "Block SQL injection on our web app" is WAF; "only allow egress to these domains" is Network Firewall. Nó không phải WAF. WAF lọc request HTTP ở CloudFront/ALB/API Gateway; Network Firewall lọc traffic L3–L7 cả VPC. "Chặn SQL injection trên web app" là WAF; "chỉ cho egress tới các domain này" là Network Firewall.
- Traffic must be routed to it. The firewall only inspects paths you send through it — via route tables (single VPC) or a Transit Gateway (central). Deploying it does nothing until routing points at it. Phải định tuyến traffic tới nó. Firewall chỉ soi những đường bạn gửi qua nó — bằng route table (một VPC) hoặc Transit Gateway (tập trung). Dựng lên mà chưa trỏ route thì chưa làm gì cả.
- Stateful needs symmetric routing. Multi-AZ central designs need appliance mode on the TGW attachment, or return packets miss the firewall and drop. Stateful cần định tuyến đối xứng. Thiết kế tập trung đa AZ cần appliance mode trên TGW attachment, nếu không gói chiều về lệch khỏi firewall và bị drop.
- Alert ≠ block. An alert action logs a match without stopping it — useful for tuning, but it is not protection until you switch matching rules to drop. Alert ≠ chặn. Action alert ghi log một match mà không chặn — hữu ích để tinh chỉnh, nhưng chưa phải bảo vệ cho tới khi bạn đổi rule khớp sang drop.
- Firewall Manager manages, it doesn't inspect. Use Firewall Manager to push Network Firewall rules across accounts; the packet inspection is done by Network Firewall itself. Firewall Manager để quản lý, không soi gói. Dùng Firewall Manager để đẩy rule Network Firewall xuyên account; việc soi gói do chính Network Firewall làm.
Exam reflexesPhản xạ khi thi
| The question says…Đề nói… | AnswerĐáp án |
|---|---|
| "Protect the entire VPC, sophisticated, L3–L7, managed""Bảo vệ cả VPC, tinh vi, L3–L7, quản lý sẵn" | AWS Network FirewallAWS Network Firewall |
"Allow outbound only to *.mycorp.com / approved domains""Chỉ cho ra *.mycorp.com / domain được duyệt" |
Network Firewall stateful domain listNetwork Firewall stateful domain list |
| "Block the SMB protocol outbound across the VPC""Chặn giao thức SMB đi ra khắp VPC" | Network Firewall protocol ruleNetwork Firewall protocol rule |
| "Central inspection of VPC-to-VPC and egress traffic""Soi tập trung traffic VPC-với-VPC và egress" | Network Firewall in an inspection VPC behind a Transit GatewayNetwork Firewall trong inspection VPC sau Transit Gateway |
| "Intrusion prevention (IPS) for network threats, managed""Ngăn chặn xâm nhập (IPS) cho mối đe doạ mạng, có quản lý" | Network Firewall active flow inspectionNetwork Firewall active flow inspection |
| "Filter HTTP attacks (SQLi/XSS) on a web app""Lọc tấn công HTTP (SQLi/XSS) trên web app" | WAF — not Network FirewallWAF — không phải Network Firewall |
| "Manage firewall rules across many accounts""Quản lý rule firewall xuyên nhiều account" | AWS Firewall ManagerAWS Firewall Manager |