# This configuration sets up DNS traffic monitoring through DNStap on port 6000;
# and duplicate the flow to two dnstap receiver
#
# As prerequisites, we assume you have
# - a DNS server which supports DNSTap (unbound, bind, powerdns, etc) for more informations about dnstap,
#   read the following page: https://dmachard.github.io/posts/0001-dnstap-testing/

# If turned on, debug messages are printed in the standard output
global:
  trace:
    verbose: true

pipelines:
  # Listen on tcp/6000 for incoming DNSTap protobuf messages from dns servers
  - name: relay-in
    dnstap-relay:
      listen-ip: 0.0.0.0
      listen-port: 6000
    routing-policy:
      forward: [ relay-out1, relay-out2 ]

  # Redirect DNSTap to two destinations
  - name: relay-out1
    dnstapclient:
      remote-address: 127.0.0.1
      remote-port: 6001

  - name: relay-out2
    dnstapclient:
      remote-address: 127.0.0.1
      remote-port: 6002
