A set of scripts that generate zone files in order to replay queries against a recursive server in LDplayer.
Beta release (1.0)
This is a set of scripts that generate zone files in order to replay queries against a recursive server in LDplayer.
dns-zone-constructor can generate zone files and DNS server configurations using network traces captured at a recursive server.
As of 2018-10-07, dns-zone-constructor does not support generating zone files using network traces captured at an authoritative server.
Replaying queries to an authoritative server requires obtaining the zone files of the authoritative server from its operator.
generate_zone_files.sh: the main script to generate zone files
settings.sh: settings for generate_zone_files.sh
zone: a set of python scripts that generate zone files from the output of dnsanon
named.root: root hint file
Prerequisite: you must have the following software installed:
BIND: In Fedora, BIND
can be installed via
sudo dnf install bind.
dig and tcpdump: they are installed by default in most of the Linux distributions.
After installing the required software:
Configure BIND in recursive mode and make sure name server control works:
sudo rndc flush sudo rndc reload
You might want to get an up-to-date version of the root hint file from here. The one included in this package is probably the same as up-to-date version since root hint data rarely changes.
Create a file that lists the queries as the input data for zone construction. Each line in the file contains two data elements (query name and query type) delimited by a single space, like "google.com A".
You need to change the settings (
settings.sh) accordingly based on
your operating system. More details are included in
Make sudo password timeout longer, as long as possible only during the zone construction, since you need to run tcpdump for each query. Some instructions about changing sudo timeout are here.
After changing settings, run ./generate_zone_files.sh. You may
check log file in
The output directory is set in
settings.sh. By default, the
generated zone files are at
sample_data/zone_output/zones and the
configure file for split-horizon authoritative server is at
When you run split-horizon authoritative server later in LDplayer, you
might need to manually change
directory "/var/cache/bind" in this
generated BIND configure file based on your own usage.