dnstap (brief intro and update) Merike Kaeo - - PowerPoint PPT Presentation

dnstap brief intro and update
SMART_READER_LITE
LIVE PREVIEW

dnstap (brief intro and update) Merike Kaeo - - PowerPoint PPT Presentation

dnstap (brief intro and update) Merike Kaeo merike@interne6den6ty.com NANOG61 - DNS Track dnstap What is it? High speed DNS logging without


slide-1
SLIDE 1

dnstap ¡ (brief ¡intro ¡and ¡update) ¡

Merike ¡Kaeo ¡ merike@interne6den6ty.com ¡

NANOG61 ¡-­‑ ¡DNS ¡Track ¡

slide-2
SLIDE 2

dnstap ¡– ¡What ¡is ¡it? ¡

  • High ¡speed ¡DNS ¡logging ¡without ¡packet ¡capture ¡ ¡

– Encoding ¡uses ¡Protocol ¡Buffers ¡ ¡

  • Binary ¡clean ¡
  • Efficient ¡encoding ¡
  • Extendable ¡
  • Implementa6ons ¡available ¡for ¡many ¡programming ¡languages ¡
  • Schema ¡file: ¡

– hVps://github.com/dnstap/dnstab.pb/blob/master/ dnstap.proto ¡

NANOG61 ¡-­‑ ¡DNS ¡Track ¡

slide-3
SLIDE 3

Why ¡create ¡dnstap? ¡

  • Frustra6on ¡with ¡certain ¡limita6ons ¡in ¡packet ¡

capture ¡approach ¡to ¡passive ¡DNS ¡replica6on ¡

  • Issues ¡found ¡in ¡DNS-­‑intensive ¡analysis ¡of ¡pcap ¡

data ¡

– Bailiwick ¡reconstruc6on ¡ ¡ – UDP ¡fragment ¡reassembly ¡ – UDP ¡checksums ¡ – TCP ¡stream ¡reassembly ¡ – DNS ¡query/response ¡matching ¡

NANOG61 ¡-­‑ ¡DNS ¡Track ¡

slide-4
SLIDE 4

Two ¡specific ¡use ¡cases ¡

  • Query ¡Logging ¡

– Make ¡it ¡faster ¡by ¡elimina6ng ¡boVlenecks ¡like ¡text ¡ forma^ng ¡and ¡synchronous ¡I/O ¡

  • Passive ¡DNS ¡replica6on ¡

– Avoid ¡complicated ¡state ¡reconstruc6on ¡issues ¡by ¡ capturing ¡messages ¡instead ¡of ¡packets ¡

  • Able ¡to ¡support ¡both ¡use ¡cases ¡with ¡the ¡same ¡

generic ¡mechanism ¡

NANOG61 ¡-­‑ ¡DNS ¡Track ¡

slide-5
SLIDE 5

dnstap ¡– ¡Some ¡of ¡the ¡how ¡

  • Add ¡a ¡lightweight ¡message ¡duplica6on ¡facility ¡

directly ¡into ¡the ¡DNS ¡server ¡

– Verba6m ¡wire-­‑format ¡DNS ¡messages ¡with ¡context ¡

  • Use ¡a ¡fast ¡logging ¡implementa6on ¡that ¡

doesn’t ¡degrade ¡performance ¡

– Circular ¡queues ¡ – Asynchronous, ¡buffered ¡I/O ¡ – Prefer ¡to ¡drop ¡log ¡payloads ¡instead ¡of ¡blocking ¡ the ¡server ¡under ¡load ¡

NANOG61 ¡-­‑ ¡DNS ¡Track ¡

slide-6
SLIDE 6

dnstap ¡– ¡Message ¡Types ¡

  • Present ¡

– Stub ¡{Q,R} ¡ – Authorita6ve ¡{Q,R} ¡ – Resolver ¡{Q,R} ¡ – Client ¡{Q,R} ¡ – Forwarder ¡{Q,R} ¡

  • Prospec6ve ¡

– RRL ¡bucket ¡{Start,End} ¡ – Zone ¡Transfer ¡in ¡{S,E} ¡ – Zone ¡Transfer ¡out ¡{S,E} ¡ – Cache ¡Purge ¡(LRU) ¡ – Cache ¡Expiry ¡(TTL) ¡

NANOG61 ¡-­‑ ¡DNS ¡Track ¡

slide-7
SLIDE 7

dnstap-­‑enabled ¡DNS ¡server ¡

NANOG61 ¡-­‑ ¡DNS ¡Track ¡

slide-8
SLIDE 8

dnstap ¡Components ¡

  • Flexible, ¡structured ¡log ¡format ¡for ¡DNS ¡

sofware ¡

  • Helper ¡libraries ¡for ¡adding ¡support ¡to ¡DNS ¡

sofware ¡

  • Patch ¡sets ¡that ¡integrate ¡dnstap ¡support ¡into ¡

exis6ng ¡DNS ¡sofware ¡

  • Capture ¡tools ¡for ¡receiving ¡dnstap ¡messages ¡

from ¡dnstap-­‑enabled ¡sofware ¡

NANOG61 ¡-­‑ ¡DNS ¡Track ¡

slide-9
SLIDE 9

Advantages ¡of ¡dnstap ¡ ¡ ¡

  • Extensible ¡and ¡can ¡offer ¡mechanism ¡into ¡more ¡

detailed ¡nameserver ¡instrumenta6on ¡ ¡

– A ¡way ¡to ¡easily ¡audit ¡the ¡records ¡that ¡have ¡been ¡ received ¡and ¡accepted ¡by ¡a ¡recursive ¡DNS ¡server ¡into ¡ its ¡cache ¡ – Visibility ¡into ¡a ¡new ¡NS ¡RRset ¡overwri6ng ¡an ¡already ¡ exis6ng ¡NS ¡RRset ¡for ¡the ¡same ¡name ¡

  • Vendor ¡Neutral ¡

– Implemen6ng ¡dnstap ¡support ¡in ¡mul6ple ¡pieces ¡of ¡ DNS ¡sofware ¡at ¡once ¡to ¡make ¡sure ¡the ¡same ¡dnstap ¡ message ¡means ¡the ¡same ¡thing ¡regardless ¡of ¡which ¡ sofware ¡generated ¡it. ¡

NANOG61 ¡-­‑ ¡DNS ¡Track ¡

slide-10
SLIDE 10

Con6nued ¡Outreach ¡

  • Speaking ¡with ¡varying ¡DNS ¡vendors ¡to ¡gauge ¡

recep6veness ¡to ¡integrate ¡dnstap ¡support ¡into ¡ their ¡sofware ¡

  • Ini6al ¡proof ¡of ¡concept ¡with ¡Unbound ¡
  • CZ.NIC ¡has ¡already ¡implemented ¡dnstap ¡

support ¡in ¡the ¡knot ¡development ¡tree ¡

– hVps://gitlab.labs.nic.cz/labs/knot ¡

NANOG61 ¡-­‑ ¡DNS ¡Track ¡

slide-11
SLIDE 11

Feedback ¡Wanted ¡

  • DNS ¡operators ¡interested ¡in ¡running ¡their ¡DNS ¡

servers ¡with ¡dnstap ¡features ¡enabled ¡

  • DNS ¡implementors ¡interested ¡in ¡adding ¡

dnstap ¡features ¡to ¡their ¡implementa6ons ¡

  • DNS ¡researchers ¡interested ¡in ¡consuming ¡

dnstap-­‑formaVed ¡data ¡

  • All ¡feedback ¡will ¡be ¡used ¡to ¡help ¡set ¡

development ¡priori6es….. ¡

NANOG61 ¡-­‑ ¡DNS ¡Track ¡

slide-12
SLIDE 12

Addi6onal ¡Informa6on ¡

  • hVp://dnstap.info ¡[defini6ve ¡source] ¡

– dnstap.info/slides/dnstap_nanog60.pdf ¡ – dnstap.info/slides/dnstap_oarc2014_warsaw.pdf ¡

  • Robert ¡Edmonds ¡(edmonds@fsi.io) ¡

NANOG61 ¡-­‑ ¡DNS ¡Track ¡