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
DNSルックアップの回数制限でハマった話
Search
Ken Kato
July 16, 2024
Technology
820
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
DNSルックアップの回数制限でハマった話
Ken Kato
July 16, 2024
More Decks by Ken Kato
See All by Ken Kato
Blue/Green Deployment を用いた PostgreSQL のメジャーバージョンアップ
kkato1
1
340
Datadog RUMを導入するまで
kkato1
0
180
初めてのPostgreSQLメジャーバージョンアップ
kkato1
0
2.3k
ウォンテッドリーのマイクロサービス運用・開発を加速する kube
kkato1
0
370
PostgreSQLのVACUUMとは
kkato1
3
3.6k
論理レプリケーションを使ったDB統合
kkato1
0
1.3k
ウォンテッドリーにおけるk8sマニフェストの管理方法
kkato1
0
370
入社後初めてのタスクでk8sアップグレードした話.pdf
kkato1
1
920
Other Decks in Technology
See All in Technology
データマネジメント × 法務で作りあげる、 freeeの新しいデータガバナンスへの軌跡
freee
PRO
1
340
CTO Night|NotionのAIエージェントとFDE
kzkhykw1991
0
310
AI コーディングと人間の認知スループット / CTO Night & Day 2026 Morning Session / AI Coding and Human Cognitive Throughput
prog893
5
1.5k
背中から、背中へ ー 社外コミュニティで学んだ「雑に背中を押す」という恩送り ー / easygoing encouragement and pay forward to community
naitosatoshi
0
210
AIで選択肢が広がった組織設計の理想と現実
konifar
3
1k
書き手が人でもAIでも正しくなる道、SREを埋め込んだDeveloper Platform / tech drivers day8
chmikata
4
670
LLM-as-a-Judgeは本当に信頼できるのか――評価器を評価する話
taka_aki
3
1.1k
(swiftc) NonCopyableとライフタイム修飾子
teamhimeh
0
110
Practical ransomware detection on macOS (via maths, not AI)
patrickwardle
0
110
企画を Software Factory-ready にする——開発が高速になったとき、PdMの仕事はどう変わったか
yachibit
1
260
トークン化預金DCJPYの取り組みと活用ユースケース
finengine
0
250
DevelopersIO 2026 Tokyo 現時点の衛星通信サービスの現状を整理してみる
maroon1st
0
290
Featured
See All Featured
VelocityConf: Rendering Performance Case Studies
addyosmani
331
25k
Google's AI Overviews - The New Search
badams
0
1.6k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
10k
Deep Space Network (abreviated)
tonyrice
0
380
Test your architecture with Archunit
thirion
2
2.5k
The untapped power of vector embeddings
frankvandijk
2
2k
Odyssey Design
rkendrick25
PRO
2
890
ラッコキーワード サービス紹介資料
rakko
4
5.5M
Building the Perfect Custom Keyboard
takai
2
920
Bash Introduction
62gerente
615
220k
How to make the Groovebox
asonas
2
2.5k
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
2
2.1k
Transcript
© 2024 Wantedly, Inc. DNSルックアップの回数制限で ハマった話 令和最新版 メールの技術LT会 / yabaibuki.dev
#1 July 16 2024 - Ken Kato
© 2024 Wantedly, Inc. 自己紹介 加藤 健 所属:ウォンテッドリー株式会社 職種:インフラエンジニア 趣味:ボルダリング
🧗 X: @kkato25
© 2024 Wantedly, Inc. はじめに
© 2024 Wantedly, Inc. SPFレコードとは? 送信サーバーのIPアドレスとDNS上のIPアドレス(SPFレコード)を比較して、 一致していることを確認する。 送信サーバー 受信サーバー SPFレコード
問い合わせ DNSサーバー
© 2024 Wantedly, Inc. DNSルックアップの回数制限とは? DNSルックアップ:DNSを使用して必要な情報を検索すること • ドメイン名 -> IPアドレス
(正引き) • IPアドレス -> ドメイン名 (逆引き) wantedly.com 3.113.203.192 DNSルックアップの上限は10回と決まっている。 • 制限の対象:「a」「 mx」「 include」「 redirect」 • 制限の対象外:「ip4」「ip6」
© 2024 Wantedly, Inc. 対策前 $ dig TXT +short wantedly.com
| grep spf | ggrep -oP 'include:\K[\-_a-z0-9.]+' _spf.google.com 1 email-wantedly2.wantedly.com 2 mail.zendesk.com 3 mktomail.com 4 _spf.salesforce.com 5 servers.mcsv.net 6 aspmx.pardot.com 7 cust-spf.exacttarget.com 8 $ dig TXT +short _spf.google.com | grep spf | ggrep -oP 'include:\K[\-_a-z0-9.]+' _netblocks.google.com 9 _netblocks2.google.com 10 _netblocks3.google.com 11 $ dig TXT +short aspmx.pardot.com | grep spf | ggrep -oP 'include:\K[\-_a-z0-9.]+' et._spf.pardot.com 12 $ dig TXT +short _spf.salesforce.com | grep spf | ggrep -oP exists:%{i.}.\K[\-_a-z0-9.]+' _spf.mta.salesforce.com 13 「include」に加えて「a」も 設定しているので、合計で 14回 DNSルックアップしている
© 2024 Wantedly, Inc. 対策案 対策案は以下の2つ • 使用していないSPFレコードを削除する ◦ 全て使用していて、これ以上削除できるものがない
• SPFレコードをフラット化する ◦ こちらを実施した SPFレコードのフラット化とは、includeの中身をあらかじめ展開すること。 $ dig TXT +short email-wantedly2. wantedly.com | grep spf | ggrep -oP ip[4|6]:[\-_:a-z0-9./]+' ip4:167.89.73.92 # この値をwantedly.com直下に「ip4」として持ってくる
© 2024 Wantedly, Inc. ハマったところ フラット化しすぎて、SPFレコードの文字数制限(1000文字)に引っかかった... なので、一部だけフラット化することにした
© 2024 Wantedly, Inc. 対策後 $ dig TXT +short wantedly.com
| grep spf | ggrep -oP 'include:\K[\-_a-z0-9.]+' _spf.google.com 1 _spf.salesforce.com 2 aspmx.pardot.com 3 cust-spf.exacttarget.com 4 $ dig TXT +short _spf.google.com | grep spf | ggrep -oP 'include:\K[\-_a-z0-9.]+' _netblocks.google.com 5 _netblocks2.google.com 6 _netblocks3.google.com 7 $ dig TXT +short _spf.salesforce.com | grep spf | ggrep -oP exists:%{i.}.\K[\-_a-z0-9.]+' _spf.mta.salesforce.com 8 $ dig TXT +short aspmx.pardot.com | grep spf | ggrep -oP 'include:\K[\-_a-z0-9.]+' et._spf.pardot.com 9 「a」も設定しているので、 合計で10回DNSルックアップして いる
© 2024 Wantedly, Inc. まとめ DNSルックアップの回数制限はハマりポイントが多くてヤバい • 回数制限は10回 • SPFレコードをフラット化することで回避できる
• 但しフラット化しすぎると、SPFレコードの文字数制限に引っかかる
© 2024 Wantedly, Inc. We are hiring! https://www.wantedly.com/projects/522096