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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
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
AI時代、つくる力を自分たちの手に。 ──電通×KAG、アジャイルとAI駆動開発で挑む開発の変革
yuukiyo
3
440
生き様としてのSRE
hokkai7go
0
140
AI AgentによるEmbedded SREの取り組み
tgidgd
1
290
構造で守らせる データ・法務・セキュリティ・開発チームとつくる AI時代のデータガバナンスとデータ基盤のリアル
legalontechnologies
PRO
2
700
[General] 개발자로 해외 기업에서 일하기
skydoves
1
150
Jev の中身は50行で再現できる。でも本物との差はどこにあるのか
hisuzuya
0
230
AI秘書と毎日働くのはもう当たり前。開発以外の業務に足りない機能をどう埋める?
minorun365
PRO
4
2k
ビジネス部門からPOを迎えての半年間の進歩と課題
zozotech
PRO
0
170
Claude Codeから見る、エンジニアの世界の変容とその先
oikon48
7
4.9k
スマートロックを支えるFlutter × ネイティブ連携の実践 / Flutter and Native Integration in Practice: Powering Smart Locks
bitkey
PRO
0
120
Autonomous AI Lakehouse - Live AI Hubから始めるセキュアなAIデータ活用 -
oracle4engineer
PRO
2
180
仕様駆動開発の、その先へ。決める力と確かめる仕組み
inariku
1
150
Featured
See All Featured
Leo the Paperboy
mayatellez
10
2.4k
コードの90%をAIが書く世界で何が待っているのか / What awaits us in a world where 90% of the code is written by AI
rkaga
63
47k
Agile Actions for Facilitating Distributed Teams - ADO2019
mkilby
0
330
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs
inesmontani
PRO
3
3.8k
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
120
120k
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
780
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
560
My Coaching Mixtape
mlcsv
0
370
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.5k
Automating Front-end Workflow
addyosmani
1370
210k
Design in an AI World
tapps
1
380
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
56
3.5k
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