-
-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add tests for pipeline mode * add examples
- Loading branch information
Showing
29 changed files
with
611 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# This configuration sets up DNS traffic monitoring through DNStap on port 6000 | ||
# and logging in both text and pcap formats. | ||
|
||
global: | ||
trace: | ||
verbose: true | ||
|
||
pipelines: | ||
- name: tap | ||
dnstap: | ||
listen-ip: 0.0.0.0 | ||
listen-port: 6000 | ||
routing-policy: | ||
default: [ text, pcap ] | ||
|
||
- name: text | ||
logfile: | ||
file-path: "/tmp/dnstap.log" | ||
max-size: 100 | ||
max-files: 10 | ||
mode: text | ||
|
||
- name: pcap | ||
logfile: | ||
file-path: "/tmp/dns.pcap" | ||
mode: pcap |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# This configuration sets up DNS traffic monitoring through DNStap on port 6000; | ||
# and applies tranformation to reduce qname to lowercase | ||
|
||
global: | ||
trace: | ||
verbose: true | ||
|
||
pipelines: | ||
- name: tap | ||
dnstap: | ||
listen-ip: 0.0.0.0 | ||
listen-port: 6000 | ||
routing-policy: | ||
default: [ console ] | ||
|
||
- name: console | ||
stdout: | ||
mode: text | ||
transforms: | ||
normalize: | ||
qname-lowercase: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# This configuration sets up DNS traffic monitoring through DNStap on port 6000; | ||
# and add geographical metadata with GeoIP database | ||
|
||
global: | ||
trace: | ||
verbose: true | ||
|
||
pipelines: | ||
- name: tap | ||
dnstap: | ||
listen-ip: 0.0.0.0 | ||
listen-port: 6000 | ||
transforms: | ||
geoip: | ||
mmdb-country-file: "./testsdata/GeoLite2-Country.mmdb" | ||
routing-policy: | ||
default: [ console ] | ||
|
||
- name: console | ||
stdout: | ||
mode: text | ||
text-format: "localtime identity queryip qname qtype geoip-country rcode" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# This configuration sets up DNS traffic monitoring through DNStap on port 6000; | ||
# and duplicate the flow to two dnstap receiver | ||
|
||
global: | ||
trace: | ||
verbose: true | ||
|
||
pipelines: | ||
- name: relay-in | ||
dnstap-relay: | ||
listen-ip: 0.0.0.0 | ||
listen-port: 6000 | ||
routing-policy: | ||
default: [ relay-out1, relay-out2 ] | ||
|
||
- 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# This configuration sets up DNS traffic monitoring through DNStap on port 6000; | ||
# and save to a file as DNStap | ||
|
||
global: | ||
trace: | ||
verbose: true | ||
|
||
pipelines: | ||
- name: tap | ||
dnstap: | ||
listen-ip: 0.0.0.0 | ||
listen-port: 6000 | ||
routing-policy: | ||
default: [ dnstap ] | ||
|
||
- name: dnstap | ||
logfile: | ||
file-path: /tmp/dnstap.fstrm | ||
flush-interval: 10 | ||
mode: dnstap |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# This configuration sets up watch and read DNStap files; | ||
# and logging to the console in text format. | ||
|
||
global: | ||
trace: | ||
verbose: true | ||
|
||
pipelines: | ||
- name: tap | ||
dnstap: | ||
listen-ip: 0.0.0.0 | ||
listen-port: 6000 | ||
routing-policy: | ||
default: [ out-dnstap ] | ||
|
||
- name: out-dnstap | ||
logfile: | ||
file-path: /tmp/dnstap.fstrm | ||
flush-interval: 1 | ||
mode: dnstap | ||
|
||
- name: file-dnstap | ||
file-ingestor: | ||
watch-dir: /tmp | ||
watch-mode: dnstap | ||
routing-policy: | ||
default: [ console ] | ||
|
||
- name: console | ||
stdout: | ||
mode: text |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# This configuration sets up watch and read PCAP files; | ||
# and logging to the console in JSON format. | ||
|
||
global: | ||
trace: | ||
verbose: true | ||
|
||
pipelines: | ||
- name: pcap | ||
file-ingestor: | ||
watch-dir: /tmp/ | ||
watch-mode: pcap | ||
transforms: | ||
normalize: | ||
qname-lowercase: true | ||
routing-policy: | ||
default: [ console ] | ||
|
||
- name: console | ||
stdout: | ||
mode: json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# This configuration sets up DNS traffic monitoring through PowerDNS protobuf on port 6001; | ||
# and transforms it to DNStap on port 6002. | ||
|
||
global: | ||
trace: | ||
verbose: true | ||
|
||
pipelines: | ||
- name: pdns | ||
powerdns: | ||
listen-ip: 0.0.0.0 | ||
listen-port: 6001 | ||
routing-policy: | ||
default: [ tap ] | ||
|
||
- name: tap | ||
dnstapclient: | ||
remote-address: 127.0.0.1 | ||
remote-port: 6002 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# This configuration sets up DNS traffic monitoring through TZSP protocol on port 1000; | ||
# and logging to the console in JSON format. | ||
|
||
global: | ||
trace: | ||
verbose: true | ||
|
||
pipelines: | ||
- name: tzsp | ||
tzsp: | ||
enable: true | ||
listen-ip: "0.0.0.0" | ||
listen-port: 10000 | ||
routing-policy: | ||
default: [ console ] | ||
|
||
- name: console | ||
stdout: | ||
mode: json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# This configuration sets up DNS traffic monitoring through DNStap on port 6000; | ||
# applies tranformations on it and send to the console and prometheus | ||
|
||
global: | ||
trace: | ||
verbose: true | ||
|
||
pipelines: | ||
- name: tap | ||
dnstap: | ||
listen-ip: 0.0.0.0 | ||
listen-port: 6000 | ||
transforms: | ||
latency: | ||
measure-latency: false | ||
unanswered-queries: true | ||
queries-timeout: 2 | ||
routing-policy: | ||
default: [ console, prom ] | ||
|
||
- name: console | ||
stdout: | ||
mode: text | ||
|
||
- name: prom | ||
prometheus: | ||
listen-ip: 0.0.0.0 | ||
listen-port: 8080 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# This configuration sets up DNS traffic monitoring through DNStap on port 6000; | ||
# applies tranformations on dnstap collector and the console logger | ||
|
||
global: | ||
trace: | ||
verbose: true | ||
|
||
pipelines: | ||
- name: tap | ||
dnstap: | ||
listen-ip: 0.0.0.0 | ||
listen-port: 6000 | ||
transforms: | ||
normalize: | ||
qname-lowercase: true | ||
latency: | ||
measure-latency: true | ||
queries-timeout: 2 | ||
routing-policy: | ||
default: [ console ] | ||
|
||
- name: console | ||
stdout: | ||
mode: text | ||
text-format: timestamp-rfc3339ns identity operation rcode qname qtype latency suspicious-score | ||
transforms: | ||
filtering: | ||
log-queries : false | ||
suspicious: | ||
threshold-qname-len: 4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# This configuration sets up DNS traffic monitoring through DNStap on port 6000, | ||
# and computes Prometheus metrics for analysis. | ||
|
||
global: | ||
trace: | ||
verbose: true | ||
|
||
pipelines: | ||
- name: tap | ||
dnstap: | ||
listen-ip: 0.0.0.0 | ||
listen-port: 6000 | ||
routing-policy: | ||
default: [ prom ] | ||
|
||
- name: prom | ||
prometheus: | ||
listen-ip: 0.0.0.0 | ||
listen-port: 8080 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# This configuration sets up DNS traffic monitoring through DNStap on port 6000; | ||
# removes duplicate traffic and log to the console | ||
|
||
global: | ||
trace: | ||
verbose: true | ||
|
||
pipelines: | ||
- name: tap | ||
dnstap: | ||
listen-ip: 0.0.0.0 | ||
listen-port: 6000 | ||
transforms: | ||
reducer: | ||
repetitive-traffic-detector: true | ||
qname-plus-one: false | ||
watch-interval: 5 | ||
routing-policy: | ||
default: [ console ] | ||
|
||
- name: console | ||
stdout: | ||
mode: text | ||
text-format: "timestamp-rfc3339ns identity operation rcode queryip qname qtype reducer-occurrences reducer-cumulative-length" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# This configuration sets up DNS traffic monitoring through DNStap on port 6000; | ||
# and log the console as PCAP format | ||
|
||
global: | ||
trace: | ||
verbose: true | ||
|
||
pipelines: | ||
- name: tap | ||
dnstap: | ||
listen-ip: 0.0.0.0 | ||
listen-port: 6000 | ||
routing-policy: | ||
default: [ console ] | ||
|
||
- name: console | ||
stdout: | ||
mode: pcap |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# This configuration sets up DNS traffic monitoring through DNStap on port 6000; | ||
# applies machine learning transformation on it | ||
|
||
global: | ||
trace: | ||
verbose: true | ||
|
||
pipelines: | ||
- name: tap | ||
dnstap: | ||
listen-ip: 0.0.0.0 | ||
listen-port: 6000 | ||
transforms: | ||
machine-learning: | ||
add-features: true | ||
routing-policy: | ||
default: [ console ] | ||
|
||
- name: console | ||
stdout: | ||
mode: text | ||
text-format: ml-size ml-entropy ml-length ml-digits ml-lowers ml-uppers | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.