Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
re:Growth infra 2020
Search
mokonist
February 09, 2021
Technology
4.8k
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
re:Growth infra 2020
mokonist
February 09, 2021
More Decks by mokonist
See All by mokonist
devio-2024-Introduction-golang-backend
mokocm
7
4.9k
Google Cloud Next '24 Recap(Cloud Run/k8s)
mokocm
0
1.2k
1年間モダンなアプリへの移行支援をやってみて分かった、モダナイズの重要性と難しさ
mokocm
1
1.7k
レガシーシステム、モダナイズへの道筋
mokocm
0
1.8k
Application Composerのすすめ
mokocm
0
1.6k
devio-2022-sapporo-moko.pdf
mokocm
2
180
DeepDive into Modern Development with AWS
mokocm
1
1.5k
IaCで全てが上手くいくと思うなよ_失敗事例のご紹介.pdf
mokocm
0
9.7k
入社1年でAWS資格フルコンプして本書いた話
mokocm
0
3.9k
Other Decks in Technology
See All in Technology
CSS2026:OWS研究会・招待講演「世界観を、実装する」
atsush1_sada
2
140
Codex を使った障害対応机上演習の実際
orgachem
PRO
0
240
局所最適は悪ではない。壊れているのは指標です。量と質を同時に見る先行指標の設計
recruitengineers
PRO
2
240
Persisting Massive Data with Rails ~Designing for 60 billion rows, and fighting the bottlenecks~ Railsで挑む大量データ永続化 〜600億件を永続化するための設計とボトルネックとの戦い〜
occhi
0
770
AI時代のGraphQL
joere
1
310
Post AI時代のリファクタリング実践記 / Refactoring in the post AI era
kaminashi
1
320
Claude Code on Bedrock で統制をかける小ネタ集/claude-code-bedrock-governance-tips
emiki
1
130
How to Design Configuration for Rails Applications
willnet
1
1.1k
AIネイティブ企業への変革。パーソルキャリアが挑む「データメッシュ×ガバナンス」のアーキテクチャ戦略
techtekt
PRO
0
120
【データ横丁主催】AI エージェント時代のTranslytical Data Platform
shisyu_gaku
0
200
DevelopersIO 2026 Tokyo 現時点の衛星通信サービスの現状を整理してみる
maroon1st
0
120
JAWS-UGグッズ職人仕事の流儀
kentapapa
0
130
Featured
See All Featured
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
1k
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.5k
Optimising Largest Contentful Paint
csswizardry
37
4k
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
3.2k
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
330
Agile Actions for Facilitating Distributed Teams - ADO2019
mkilby
0
310
Principles of Awesome APIs and How to Build Them.
keavy
128
18k
Heart Work Chapter 1 - Part 1
lfama
PRO
10
37k
StorybookのUI Testing Handbookを読んだ
zakiyama
31
7k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.6k
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
2
310
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
590
Transcript
AWS Network FirewallでSquidを滅ぼす AWS事業本部コンサルティング部 2021/02/05 1 @mokocm
2 セッションタイトル変更 AWS Network FirewallでSquidを滅ぼす AWS Network FirewallでSquidを滅ぼそうとし たらTransit Gatewayがムズすぎた
3 ⾃⼰紹介 Moko クラスメソッド株式会社 AWS事業本部 コンサルティング部 ソリューションアーキテクト 2020 APN AWS
Top Engineers ⼊社: 2019/07 本業/趣味: TerraformでAWS環境の構築 Twitter/GitHub: @mokocm 好きなAWSサービス: AWS Global Accelerator 好きな⾔語: TypeScript
4 re:Invent 2020 アツかったですね
5 AWS Network Firewall
6 AWS Network Firewall ・マネージドなNetwork Firewall ・これまでSquidなどで通信制御していた方は朗報 ・一元的なNetwork Hub /
Network Firewallを実現可能 ・NAT Gatewayが無料で使える ・NAT Gateway: $0.045/h, $0.045/GB ・Network Firewall: $0.395/h, $0.065/GB →+$0.35/h, $0.02/GBでNetwork Firewallが利⽤可能 ※料金は2021/01/04時点でのus-east-1の価格 ※1AZの料金
7 今⽇話すこと ・Network Firewallの経路についておさらい ・Network Firewallのルールについて ・シンプルな構成で作ってみる ・Transit Gatewayを用いたパターンの紹介
8 構成図
9 Inbound
10 Inbound
11 Inbound ✅
12 Inbound
13 Inbound
14 Inbound
15 Outbound
16 Outbound
17 Outbound ✅
18 Outbound
19 Outbound
20 Outbound
21 AWS Network Firewall ・VPC Ingress Routing 2019/09 GA ・Gateway
Load Balancer 2020/11 GA
22 Network Firewallで設定出来ること ・Stateless Rule Group ・5-tuple ルール ・Network ACLみたいな感じでプロトコル等でルール設定
・StateFul Rule Group ・5-tuple ルール ・ドメインリストルール ・Suricata IPS 互換 ルール 詳細: https://dev.classmethod.jp/articles/aws-network-firewall/
23 とりあえず やってみよう︕
24 Network Firewall 最低限のレシピ ・VPC 1個 ・Subnet 2個 ・Internet Gateway
1個 ・RouteTable 3個 ・Network Firewall 1個 ・疎通確認用EC2 1台
25 作った構成 ※SingleAZ ※ Public IPが必要 ※一旦ルール設定なし
26 接続確認 $ curl -I https://example.com –m 10 HTTP/2 200
content-encoding: gzip accept-ranges: bytes age: 544590 cache-control: max-age=604800 content-type: text/html; charset=UTF-8 date: Thu, 04 Feb 2021 16:36:34 GMT etag: "3147526947" expires: Thu, 11 Feb 2021 16:36:34 GMT last-modified: Thu, 17 Oct 2019 07:18:26 GMT server: ECS (dcb/7EA7) x-cache: HIT content-length: 648 SSHできてインターネットにも出れる
27 Stateful Rule 投⼊
28 接続確認 $ curl -I https://example.com -m 10 curl: (28)
Operation timed out after 10001 milliseconds with 0 out of 0 bytes received Drop!
29 Transit Gatewayと 合わせて使うパターン
30 元ネタ ・Deployment models for AWS Network Firewall https://aws.amazon.com/jp/blogs/networking-and-content-delivery/deployment-models-for-aws-network-firewall/ ・とても詳細にまとまっているので導入の際は是非ご覧下さい
・3つのパターンが紹介されている ・Distributed AWS Network Firewall deployment model ・各VPCにNetwork FirewallをDeployする(TGWを使わない) ・Centralized deployment model ・TGWでVPC間/Ingress/Egress/on-premisesを 集約してNetwork Firewallに通す ・Combined centralized and distributed deployment model ・VPC内通信、Ingress、EgressのNetwork Firewallを別ける ・一部VPCは個別でIGWとNetwork Firewallがある
31 理解するまで4時間くらい掛かったので 10分で解説します
32 ⽐較 ・Distributed AWS Network Firewall deployment model ・各VPCにNetwork FirewallをDeployする(TGWを使わない)
・Centralized deployment model ・TGWでVPC間/Ingress/Egress/on-premisesを 集約してNetwork Firewallに通す ・Combined centralized and distributed deployment model ・VPC内通信、Ingress、EgressのNetwork Firewallを別ける ・一部VPCは個別でIGWとNetwork Firewallがある https://aws.amazon.com/jp/blogs/networking-and-content-delivery/deployment-models-for-aws-network-firewall/
33 Distributed AWS Network Firewall deployment model https://aws.amazon.com/jp/blogs/networking-and-content-delivery/deployment-models-for-aws-network-firewall/
34 ⽐較 ・Distributed AWS Network Firewall deployment model ・各VPCにNetwork FirewallをDeployする(TGWを使わない)
・Centralized deployment model ・TGWでVPC間/Ingress/Egress/on-premisesを 集約してNetwork Firewallに通す ・Combined centralized and distributed deployment model ・VPC内通信、Ingress、EgressのNetwork Firewallを別ける ・一部VPCは個別でIGWとNetwork Firewallがある https://aws.amazon.com/jp/blogs/networking-and-content-delivery/deployment-models-for-aws-network-firewall/
35 Centralized deployment model https://aws.amazon.com/jp/blogs/networking-and-content-delivery/deployment-models-for-aws-network-firewall/
36 ⽐較 ・Distributed AWS Network Firewall deployment model ・各VPCにNetwork FirewallをDeployする(TGWを使わない)
・Centralized deployment model ・TGWでVPC間/Ingress/Egress/on-premisesを 集約してNetwork Firewallに通す ・Combined centralized and distributed deployment model ・VPC内通信、Ingress、EgressのNetwork Firewallを別ける ・一部VPCは個別でIGWとNetwork Firewallがある https://aws.amazon.com/jp/blogs/networking-and-content-delivery/deployment-models-for-aws-network-firewall/
37 Combined centralized and distributed deployment model https://aws.amazon.com/jp/blogs/networking-and-content-delivery/deployment-models-for-aws-network-firewall/
38 Network Firewall + Transit Gateway設計の留意点 ・CIDRが被らないこと(あたりまえ) ・Transit GatewayはAttach用のサブネットを作ること(/28) ・Network
Firewallのサブネットも/28でOK ・ELBのIngress集約はAutoScalingだと一工夫必要かも。 ・ex. AutoScalingがあるVPCにNLB配置 ・ Ingressの集約VPCにNLBのIPを ・詳細は後日ブログにします ・※構成図はSingleAZ, 実環境はMultiAZで組む
39 AWS Network Firewall まとめ ・Network Firewallはネットワークの門番 ・ManagedなのでSquidなどのProxy運用をしなくて良い ・トラフィックに対して完全に透過で、NATを行わない ・Route
Table / VPC Ingress RoutingでVPCEに送る ・Transit Gatewayと合わせて使うと便利 ・経路の設計が難しい ・Squidやめる話をしようとしたのに気がついたらTGWの経路の話になってた ・東京リージョン対応待ってます!!!!
40 参考 [新サービス] VPC 向け AWS マネージドファイアウォールサービス「AWS Network Firewall」がリ リースされました
https://dev.classmethod.jp/articles/aws-network-firewall/ AWS Network Firewall – New Managed Firewall Service in VPC https://aws.amazon.com/jp/blogs/aws/aws-network-firewall-new-managed-firewall-service-in- vpc/ Deployment models for AWS Network Firewall https://aws.amazon.com/jp/blogs/networking-and-content-delivery/deployment-models-for- aws-network-firewall/ What is AWS Network Firewall? https://docs.aws.amazon.com/network-firewall/latest/developerguide/ Resource: aws_networkfirewall_firewall https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/networkfirewall_fire wall
41