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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Ken Kato
July 16, 2024
Technology
780
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
330
Datadog RUMを導入するまで
kkato1
0
150
初めてのPostgreSQLメジャーバージョンアップ
kkato1
0
2.3k
ウォンテッドリーのマイクロサービス運用・開発を加速する kube
kkato1
0
360
PostgreSQLのVACUUMとは
kkato1
3
3.5k
論理レプリケーションを使ったDB統合
kkato1
0
1.3k
ウォンテッドリーにおけるk8sマニフェストの管理方法
kkato1
0
360
入社後初めてのタスクでk8sアップグレードした話.pdf
kkato1
1
910
Other Decks in Technology
See All in Technology
Amazon Quick on DesktopがIAM Identity Centerで動かない理由
yukiogawa
0
160
生成AIのテナント制御とシャドーMCP対策 | AIを"止めずに"、情報を守る
yukun
0
150
TinyGo 開発サイクルを高速化する:Go で作るエミュレータ入門
zozotech
PRO
1
610
深夜のクラウド懺悔室 1:29:300 or 1:0:0
kazzpapa3
1
230
DEFCON_CHV_CTF_Write-up.pdf
bata_24
0
140
When Does a Local Qwen Start to Break
morshoto
0
200
リージョンの壁を越える、 ちょっと変わったAWSサービスの話
falken
PRO
1
300
株式会社シーエーシー エンジニア向け会社紹介資料
cac
0
57k
GuardDuty 検知対応を DevOps Agent で効率化しようとしている話 / GuardDuty Investigations with DevOps Agent
masahirokawahara
1
360
Multica × 長期記憶:40個のミニプロジェクト管理
eiei114
1
240
多層防御と最⼩権限で実現する、安全なAIエージェント設計パターン
lycorptech_jp
PRO
1
260
2026-09-10 【Snowflake World Tour Tokyo 2026】dbt Core と Snowflake で実現する多層的なデータガバナンス / Multi-Layered Data Governance Powered by dbt Core and Snowflake
civitaspo
0
320
Featured
See All Featured
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
2.1k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
35
2.8k
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
230
GraphQLの誤解/rethinking-graphql
sonatard
75
12k
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
1
820
Fashionably flexible responsive web design (full day workshop)
malarkey
408
67k
Optimising Largest Contentful Paint
csswizardry
37
3.9k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.5k
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
1
520
From Legacy to Launchpad: Building Startup-Ready Communities
dugsong
0
330
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
230
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