Upgrade to Pro — share decks privately, control downloads, hide ads and more …

basics_of_dns_that_phper_should_know

 basics_of_dns_that_phper_should_know

第125回 PHP勉強会@東京 で発表したスライドです。

mamy1326

April 25, 2018
Tweet

More Decks by mamy1326

Other Decks in Programming

Transcript

  1. ͓࿩͢Δ͜ͱ ▶︎ υϝΠϯ໊ͷੜཱ͍ͪ ▶︎ ໊લղܾ ▶︎ ໦ߏ଄ͱκʔϯ ▶︎ ϦιʔεϨίʔυ ▶︎

    ίϯςϯπαʔό ▶︎ ελϒϦκϧό ͱϑϧαʔϏεϦκϧό ▶︎ DNS·ͱΊ
  2. ͓࿩͢Δ͜ͱ ▶︎ υϝΠϯ໊ͷੜཱ͍ͪ ▶︎ ໊લղܾ ▶︎ ໦ߏ଄ͱκʔϯ ▶︎ ϦιʔεϨίʔυ ▶︎

    ίϯςϯπαʔό ▶︎ ελϒϦκϧό ͱϑϧαʔϏεϦκϧό ▶︎ DNS·ͱΊ
  3. ͓࿩͢Δ͜ͱ ▶︎ υϝΠϯ໊ͷੜཱ͍ͪ ▶︎ ໊લղܾ ▶︎ ໦ߏ଄ͱκʔϯ ▶︎ ϦιʔεϨίʔυ ▶︎

    ίϯςϯπαʔό ▶︎ ελϒϦκϧό ͱϑϧαʔϏεϦκϧό ▶︎ DNS·ͱΊ
  4. ελϒϦκϧό ϩʔΧϧͷ %/4αʔό ࠶ؼݕࡧ ᶃXXXNBNZKQΛϒϥ΢βͰ࣮ߦ %/4Ωϟογϡαʔό ʢϑϧαʔϏεϦκϧόʣ ϧʔτ %/4αʔό KQ

    %/4αʔό NBNZKQ %/4αʔό NBNZKQͷ8FCαʔό *1 ᶅXXXNBNZKQͷ*1ΞυϨεڭ͑ͯʂ⾣ ⾢ᶆKQ͔ͩΒɺKQͷ%/4αʔόʹฉ͍ͯʂ KQͷ%/4αʔόͷ /4Ϩίʔυͱ"ϨίʔυΛฦ͢ ᶇXXXNBNZKQͷ*1ΞυϨεڭ͑ͯʂ⾣ ⾢ᶈNBNZͷ%/4αʔόʹฉ͍ͯʂ NBNZͷ%/4αʔόͷ /4Ϩίʔυͱ"ϨίʔυΛฦ͢ ᶉXXXNBNZKQͷ*1ΞυϨεڭ͑ͯʂ⾣ ⾢ᶊXXXNBNZKQ͸ XXXNBNZKQͷ "ϨίʔυΛฦ͢ ൓ ෮ ݕ ࡧ ˛ᶋXXXNBNZKQͷ ɹ*1ΞυϨε͸ ᶌ8FCϒϥ΢β͕ʹΞΫηε⾣ ᶄXXXNBNZKQ ɹͷ*1ΞυϨε͸ʁ˝ %/4ίϯςϯπαʔό ໊લղܾͷྲྀΕ
  5. ͓࿩͢Δ͜ͱ ▶︎ υϝΠϯ໊ͷੜཱ͍ͪ ▶︎ ໊લղܾ ▶︎ ໦ߏ଄ͱκʔϯ ▶︎ ϦιʔεϨίʔυ ▶︎

    ίϯςϯπαʔό ▶︎ ελϒϦκϧό ͱϑϧαʔϏεϦκϧό ▶︎ DNS·ͱΊ
  6. KQ OFU DP BD NBNZ NBNZ TUVEZ IPCCZ VL DPN

    ϧʔτ  EOT HBNF υϝΠϯ໊͸໦ߏ଄
  7. υϝΠϯ໊͸໦ߏ଄ KQ OFU DP BD NBNZ NBNZ TUVEZ IPCCZ VL

    DPN ϧʔτ  EOT HBNF 8FCαʔό  EOTTUVEZNBNZDPKQ
  8. KQ OFU DP BD NBNZ NBNZ TUVEZ IPCCZ VL DPN

    ϧʔτ  EOT HBNF 8FCαʔό  EOTTUVEZNBNZDPKQ υϝΠϯ໊͸໦ߏ଄
  9. KQ OFU DP BD NBNZ NBNZ TUVEZ IPCCZ VL DPN

    ʜ%/4 ɹίϯςϯπαʔό ϧʔτ  EOT HBNF 8FCαʔό  EOTTUVEZNBNZDPKQ υϝΠϯ໊͸໦ߏ଄
  10. KQ OFU DP BD NBNZ NBNZ TUVEZ IPCCZ VL DPN

    ʜ%/4 ɹίϯςϯπαʔό ϧʔτ  EOT HBNF 8FCαʔό  EOTTUVEZNBNZDPKQ υϝΠϯ໊͸໦ߏ଄
  11. KQ OFU DP BD NBNZ NBNZ TUVEZ IPCCZ VL DPN

    ʜ%/4 ɹίϯςϯπαʔό ϧʔτ  EOT HBNF ໦ߏ଄Λ ൓෮໰߹ͤͰḷΔ 8FCαʔό  EOTTUVEZNBNZDPKQ υϝΠϯ໊͸໦ߏ଄
  12. KQ OFU DP BD NBNZ NBNZ TUVEZ IPCCZ VL DPN

    ʜ%/4 ɹίϯςϯπαʔό ϧʔτ  EOT HBNF ໦ߏ଄Λ ൓෮໰߹ͤͰḷΔ 8FCαʔό  EOTTUVEZNBNZDPKQ 5PQ-FWFM%PNBJO Λ؅ཧ τοϓϨϕϧυϝΠϯ υϝΠϯ໊͸໦ߏ଄
  13. KQ OFU DP BD NBNZ NBNZ TUVEZ IPCCZ VL DPN

    ʜ%/4 ɹίϯςϯπαʔό ϧʔτ  EOT HBNF ໦ߏ଄Λ ൓෮໰߹ͤͰḷΔ 8FCαʔό  EOTTUVEZNBNZDPKQ KQυϝΠϯ Λ؅ཧ υϝΠϯ໊͸໦ߏ଄
  14. KQ OFU DP BD NBNZ NBNZ TUVEZ IPCCZ VL DPN

    ʜ%/4 ɹίϯςϯπαʔό ϧʔτ  EOT HBNF ໦ߏ଄Λ ൓෮໰߹ͤͰḷΔ 8FCαʔό  EOTTUVEZNBNZDPKQ DPKQυϝΠϯ Λ؅ཧ υϝΠϯ໊͸໦ߏ଄
  15. KQ OFU DP BD NBNZ NBNZ TUVEZ IPCCZ VL DPN

    ʜ%/4 ɹίϯςϯπαʔό ϧʔτ  EOT HBNF ໦ߏ଄Λ ൓෮໰߹ͤͰḷΔ 8FCαʔό  EOTTUVEZNBNZDPKQ NBNZDPKQ υϝΠϯΛ؅ཧ υϝΠϯ໊͸໦ߏ଄
  16. KQ OFU DP BD NBNZ NBNZ TUVEZ IPCCZ VL DPN

    ʜ%/4 ɹίϯςϯπαʔό ϧʔτ  EOT HBNF ໦ߏ଄Λ ൓෮໰߹ͤͰḷΔ 8FCαʔό  EOTTUVEZNBNZDPKQ TUVEZNBNZDPKQ υϝΠϯΛ؅ཧ υϝΠϯ໊͸໦ߏ଄
  17. KQ OFU DP BD NBNZ NBNZ TUVEZ IPCCZ VL DPN

    ϧʔτ  EOT HBNF ໊લۭؒ υϝΠϯ໊͸໦ߏ଄
  18. ໦ߏ଄ͱκʔϯ KQ OFU DP BD NBNZ NBNZ TUVEZ IPCCZ VL

    DPN ϧʔτ  EOT HBNF 8FCαʔό  EOTTUVEZNBNZDPKQ
  19. ໦ߏ଄ͱκʔϯ KQ OFU DP BD NBNZ NBNZ TUVEZ IPCCZ VL

    DPN ϧʔτ  EOT HBNF 8FCαʔό  EOTTUVEZNBNZDPKQ ϧʔτͷ ωʔϜαʔό ͷκʔϯ
  20. ໦ߏ଄ͱκʔϯ KQ OFU DP BD NBNZ NBNZ TUVEZ IPCCZ VL

    DPN ϧʔτ  EOT HBNF 8FCαʔό  EOTTUVEZNBNZDPKQ KQͷ ωʔϜαʔόͷκʔϯ
  21. ໦ߏ଄ͱκʔϯ KQ OFU DP BD NBNZ NBNZ TUVEZ IPCCZ VL

    DPN DPKQͷ ωʔϜαʔόͷκʔϯ ϧʔτ  EOT HBNF 8FCαʔό  EOTTUVEZNBNZDPKQ
  22. ໦ߏ଄ͱκʔϯ KQ OFU DP BD NBNZ NBNZ TUVEZ IPCCZ VL

    DPN NBNZDPKQͷ ωʔϜαʔόͷκʔϯ ϧʔτ  EOT HBNF 8FCαʔό  EOTTUVEZNBNZDPKQ
  23. ͓࿩͢Δ͜ͱ ▶︎ υϝΠϯ໊ͷੜཱ͍ͪ ▶︎ ໊લղܾ ▶︎ ໦ߏ଄ͱκʔϯ ▶︎ ϦιʔεϨίʔυ ▶︎

    ίϯςϯπαʔό ▶︎ ελϒϦκϧό ͱϑϧαʔϏεϦκϧό ▶︎ DNS·ͱΊ
  24. ⾣ओͳϑΥʔϚοτ ໊લ λΠϓ 55- σʔλ 3%"5" NBNZKQ /4  OTBXTEOTDPN

    /4 /BNF4FSWFS Ϩίʔυ ɾ໊લ ɹɹˠϦιʔεϨίʔυͷ໊લɻ/4ͷ৔߹͸υϝΠϯ໊ͱͳΔ ɾλΠϓ ɹɹˠϦιʔεϨίʔυΛࣝผ͢ΔλΠϓɻ/4͸ωʔϜαʔόʔΛද͢ ɾ55- ɹɹˠϦιʔεϨίʔυΛΩϟογϡ͢Δ࣌ؒ ඵ  ɾσʔλ ɹɹˠλΠϓʹґଘ͢Δσʔλɻ/4ͷ৔߹͸%/4ίϯςϯπαʔό໊
  25. ⾣EJHίϚϯυͰݟΔ /4 /BNF4FSWFS Ϩίʔυ EJH"/:ZPVSTHNPKQ ʢதུʣ 26&45*0/4&$5*0/ ZPVSTHNPKQ  

    */ "/: "/48&34&$5*0/ ZPVSTHNPKQ  */ "  "65)03*5:4&$5*0/ HNPKQ    */ /4 OTHNPJOUFSOFUKQ HNPKQ    */ /4 OTHNPJOUFSOFUKQ HNPKQ    */ /4 OTHNPJOUFSOFUDPN "%%*5*0/"-4&$5*0/ OTHNPJOUFSOFUDPN  */ "  OTHNPJOUFSOFUKQ  */ "  OTHNPJOUFSOFUDPN  */ """"  OTHNPJOUFSOFUKQ  */ """"  %/4ίϯςϯπαʔό໊
  26. ⾣EJHίϚϯυͰݟΔ /4 /BNF4FSWFS Ϩίʔυ EJH"/:ZPVSTHNPKQ ʢதུʣ 26&45*0/4&$5*0/ ZPVSTHNPKQ  

    */ "/: "/48&34&$5*0/ ZPVSTHNPKQ  */ "  "65)03*5:4&$5*0/ HNPKQ    */ /4 OTHNPJOUFSOFUKQ HNPKQ    */ /4 OTHNPJOUFSOFUKQ HNPKQ    */ /4 OTHNPJOUFSOFUDPN "%%*5*0/"-4&$5*0/ OTHNPJOUFSOFUDPN  */ "  OTHNPJOUFSOFUKQ  */ "  OTHNPJOUFSOFUDPN  */ """"  OTHNPJOUFSOFUKQ  */ """"  %/4ίϯςϯπαʔόͷ ࣮ࡍͷ*1ΞυϨε
  27. ⾣ओͳϑΥʔϚοτ ໊લ λΠϓ 55- σʔλ 3%"5" NBNZKQ "  

    ɾ໊લ ɹɹˠϦιʔεϨίʔυͷ໊લɻ"ͷ৔߹͸υϝΠϯ໊ͱͳΔ ɾλΠϓ ɹɹˠϦιʔεϨίʔυΛࣝผ͢ΔλΠϓɻ"͸*1ΞυϨεΛද͢ ɾ55- ɹɹˠϦιʔεϨίʔυΛΩϟογϡ͢Δ࣌ؒ ඵ  ɾσʔλ ɹɹˠλΠϓʹґଘ͢Δσʔλɻ"ͷ৔߹͸αʔόͷ*1ΞυϨε " "EESFTT Ϩίʔυ
  28. ⾣EJHίϚϯυͰݟΔ EJH"/:ZPVSTHNPKQ ʢதུʣ 26&45*0/4&$5*0/ ZPVSTHNPKQ   */ "/: "/48&34&$5*0/

    ZPVSTHNPKQ  */ "  "65)03*5:4&$5*0/ HNPKQ    */ /4 OTHNPJOUFSOFUKQ HNPKQ    */ /4 OTHNPJOUFSOFUKQ HNPKQ    */ /4 OTHNPJOUFSOFUDPN "%%*5*0/"-4&$5*0/ OTHNPJOUFSOFUDPN  */ "  OTHNPJOUFSOFUKQ  */ "  OTHNPJOUFSOFUDPN  */ """"  OTHNPJOUFSOFUKQ  */ """"  υϝΠϯ໊ʹରԠ͢Δ *1ΞυϨε " "EESFTT Ϩίʔυ
  29. ͓࿩͢Δ͜ͱ ▶︎ υϝΠϯ໊ͷੜཱ͍ͪ ▶︎ ໊લղܾ ▶︎ ໦ߏ଄ͱκʔϯ ▶︎ ϦιʔεϨίʔυ ▶︎

    ίϯςϯπαʔό ▶︎ ελϒϦκϧό ͱϑϧαʔϏεϦκϧό ▶︎ DNS·ͱΊ
  30. ίϯςϯπαʔόͱ͸ ⾣໾ׂ ɾΫϥΠΞϯτͷ໰߹ͤʹϦιʔεϨίʔυԠ౴ ɹɹˠݖҖαʔόͱɺͦͷηΧϯμϦαʔό ɾϦιʔεϨίʔυΛఏڙ͢Δଆ ɹɹˠϧʔτɺKQ 5-% ɺDP 4-% ɺNBNZɺFUD

    ɾκʔϯϑΝΠϧͰϦιʔεϨίʔυ؅ཧ ɹɹˠࣗ෼ͷ؅׋ͷκʔϯʹؔ͢Δ৘ใΛσʔλϕʔεԽ ɾΘ͔Βͳ͍৔߹͸ʮΘ͔ΒΜʯͱ౴͑Δ ɹɹˠυϝΠϯ͕·ͩऔಘ͞Εͯͳ͍ɺ/4Ϩίʔυ͕ͳ͍৔߹ͳͲ
  31. ͓࿩͢Δ͜ͱ ▶︎ υϝΠϯ໊ͷੜཱ͍ͪ ▶︎ ໊લղܾ ▶︎ ໦ߏ଄ͱκʔϯ ▶︎ ϦιʔεϨίʔυ ▶︎

    ίϯςϯπαʔό ▶︎ ελϒϦκϧό ͱϑϧαʔϏεϦκϧό ▶︎ DNS·ͱΊ
  32. ελϒϦκϧόͷಈ࡞ ΫϥΠΞϯτ Ϣʔβ ΞϓϦέʔγϣϯ ελϒϦκϧό ᶃXXXNBNZKQʹ ɹ͋Δ8FCαΠτΛݟ͍ͨͳ ᶄXXXNBNZKQ ɹͰ͸Θ͔Βͳ͍͔Β ɹ໊લղܾ͓ئ͍Ͷ

    ᶅXXXNBNZKQ ɹΛωʔϜαʔόʹ ɹ໰͍߹ΘͤΔΑ %/4Ωϟογϡαʔό ϑϧαʔϏεϦκϧό ໰͍߹Θͤ Ԡ౴ ᶆԠ౴Λड͚औͬͨͷͰ ɹ݁ՌΛ౉͢Α
  33. ͓࿩͢Δ͜ͱ ▶︎ υϝΠϯ໊ͷੜཱ͍ͪ ▶︎ ໊લղܾ ▶︎ ໦ߏ଄ͱκʔϯ ▶︎ ϦιʔεϨίʔυ ▶︎

    ίϯςϯπαʔό ▶︎ ελϒϦκϧό ͱϑϧαʔϏεϦκϧό ▶︎ DNS·ͱΊ
  34. %/4·ͱΊ  ⾣౷Ұ࢓༷Ͱ࣮૷͞Εɺ࣮ݱ͞Ε͍ͯΔ ɹˠ*$"//ɺ+134 ϨδετϦ ɺ໊͓લ Ϩδετϥ  ⾣ෛՙ෼ࢄ΍ো֐ରࡦͰ৑௕ߏ੒ ɹˠϓϥΠϚϦͱηΧϯμϦ

    ⾣ΩϟογϡΛϑϧ׆༻ ɹˠϑϧαʔϏεϦκϧόʢ%/4Ωϟογϡαʔόʣ ɹɹ͚ͩͰͳ͘ɺ༷ʑͳ৔ॴʹΩϟογϡʢ55-ʣ