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
170
初めてのPostgreSQLメジャーバージョンアップ
kkato1
0
2.3k
ウォンテッドリーのマイクロサービス運用・開発を加速する kube
kkato1
0
370
PostgreSQLのVACUUMとは
kkato1
3
3.6k
論理レプリケーションを使ったDB統合
kkato1
0
1.3k
ウォンテッドリーにおけるk8sマニフェストの管理方法
kkato1
0
360
入社後初めてのタスクでk8sアップグレードした話.pdf
kkato1
1
920
Other Decks in Technology
See All in Technology
「Docker Desktop不要の時代」は 来たのか?
ueponx
0
580
AI時代のPRレビューにどう向き合うか?
kairim0
1
210
今さら理解するウェブフォントver.2026
takanorip
3
690
AI駆動開発の時代になったのでトヨタ生産方式から見直す
terurou
7
5.9k
FOSS4Gを活用した自治体業務DXの試み
470715
0
150
QA4AI 2026-Oct 生成AI時代の品質保証
tokuty
0
570
TinyGoでオブザーバビリティ?OpenTelemetryはTinyGoで使えるのか / Is OpenTelemetry available in TinyGo environment?
ymotongpoo
2
140
OSC2026on_the-world-is-waiting-for-your-voice.pdf
naruoga
0
370
DWH の限界突破! AI エージェント向け爆速リアルタイムデータ基盤 ClickHouse
jozono
1
390
Deep Data Security 機能解説
oracle4engineer
PRO
2
800
Essential architectural thinking (revised edition)
ufried
0
120
Persisting Massive Data with Rails ~Designing for 60 billion rows, and fighting the bottlenecks~ Railsで挑む大量データ永続化 〜600億件を永続化するための設計とボトルネックとの戦い〜
occhi
0
380
Featured
See All Featured
How GitHub (no longer) Works
holman
316
150k
Accessibility Awareness
sabderemane
1
250
What's in a price? How to price your products and services
michaelherold
247
13k
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.5k
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
2
1.6k
Fashionably flexible responsive web design (full day workshop)
malarkey
409
67k
Bootstrapping a Software Product
garrettdimon
PRO
306
120k
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1.4k
[RailsConf 2023] Rails as a piece of cake
palkan
59
7.1k
Six Lessons from altMBA
skipperchong
29
4.5k
Rails Girls Zürich Keynote
gr2m
96
14k
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
260
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