Skip to content

Testing the `dnstap` source

Stephen Wakely edited this page Oct 17, 2023 · 2 revisions

Setup coredns

Download coredns from here.

Extract the executable somewhere.

In the same folder as the executable create a file called Corefile with the following:

. {
  dnstap unix:////tmp/dnstap.sock full
  forward . 1.1.1.1
}

Configure Vector

Use a config like:

sources:
  dnstap:
    type: dnstap
    socket_path: "/tmp/dnstap.sock"
    socket_file_mode: 511
    
sinks:
  console:
    type: console
    target: stdout
    encoding:
      codec: json
    inputs:
      - dnstap

Run coredns

> ./coredns -dns.port=1053
.:1053
CoreDNS-1.10.0
linux/amd64, go1.19.1, 596a9f9

Send dns queries to coredns

> dig @localhost -p 1053 whoami.example.org