We collect and configure the BUNDY DNS server (BIND10). Part 1
Somehow hands quietly reached all the same to touch the BIND10. First, a little history about this product. The first release of BIND10 was presented by the ISC consortium in February 2013. On April 17, 2014, the ISC consortium released the latest release of BIND10 1.2.0, after which it transferred all the achievements to the community of independent developers. This decision was made due to the fact that the consortium does not have the resources to develop two alternative projects. Therefore, they will only develop BIND9, and BIND10 is completely in the hands of the community. To reduce confusion with BIND9, a new project was created on GitHub in which all the achievements of the consortium on BIND10 were transferred and this project was called Bundy. Well, I think you can start the experiment.
Create a new container and connect to it:
$ docker run --name bundy --hostname=bundy -d -i -t sovicua:jessie
$ docker attach bundy
As usual, we update and install the necessary packages for assembly.
# apt-get update
# apt-get upgrade
# apt-get install git-core g++ make pkg-config python3-dev sqlite3 libsqlite3-dev libbotan1.10-dev liblog4cplus-dev libboost-dev python3-setproctitle dnsutils net-tools autoconf autoconf-archive automake libtool
We get the source codes of the project and build:
# git clone https://github.com/bundy-dns/bundy.git
# cd bundy
# autoreconf --install --warnings=none
# ./configure --prefix=/usr --sysconfdir=/etc --without-werror --enable-experimental-resolver
# make
And we get an error when building the resolver ... We
get an error due to the fact that the master branch doesn’t have some files, in particular in the src / lib / xfr folder which is needed to build the resolver. If you build without this option, then everything is going and working. But since I wanted to try everything, I had to download the source code from another branch and collect everything again.
Additionally, we enable database storage in MySQL for the DHCP server. During the installation, we will be asked several questions that I think will not be difficult to answer.
# wget http://dev.mysql.com/get/mysql-apt-config_0.3.6-1debian8_all.deb
# dpkg -i mysql-apt-config_0.3.6-1debian8_all.deb
Choosing the Latest Version (DRM - Developer milestone releases)
Configuring mysql-apt-config
----------------------------
MySQL APT Repo features MySQL Server along with a variety of MySQL components. You may select the appropriate product to choose the version that you wish to receive.
Once you are satisfied with the configuration then select last option 'Apply' to save the configuration. Advanced users can always change the configurations later,
depending on their own needs.
1. Server 2. Connector-Python 3. Utilities 4. Apply
Which MySQL product do you wish to configure? 1
This configuration program will detect the current state of your system, check for any installed MySQL Server packages, and try to select the most appropriate version
of MySQL Server to be installed. If you are not sure which version to choose for yourself, do not change the auto-selected version. Advanced users can always change
the version later, depending on their own needs.
1. mysql-5.6 2. mysql-5.7-dmr 3. none
Which server version do you wish to receive? 2
MySQL APT Repo features MySQL Server along with a variety of MySQL components. You may select the appropriate product to choose the version that you wish to receive.
Once you are satisfied with the configuration then select last option 'Apply' to save the configuration. Advanced users can always change the configurations later,
depending on their own needs.
1. Server 2. Connector-Python 3. Utilities 4. Apply
Which MySQL product do you wish to configure? 4
If you decide to use the stable version, then you need to run the command:
# dpkg-reconfigure mysql-apt-config
... and select the required software version that you want to use.
After that, we update the repository data and install the MySQL server.
# apt-get update
# apt-get install mysql-server libmysqlclient-dev libz-dev
We start the MySQL server
# service mysql start
..
[info] MySQL Community Server 5.7.7-rc is started.
# service mysql status
[info] MySQL Community Server 5.7.7-rc is running.
Now we are ready for reassembly, before that we delete the directory with the old sources.
# git clone --branch bundyfork --single-branch https://github.com/bundy-dns/bundy.git
# cd bundy
# autoreconf --install --warnings=none
# ./configure --prefix=/usr --sysconfdir=/etc --without-werror --with-dhcp-mysql --enable-experimental-resolver
# make
So, we continue our experiments.
After the assembly is completed, we perform the installation:
# make install
Preparing for the first launch.
By default, the DNS and DHCP services do not start, they must be separately activated using the bundyctl utility. Before that, we need to add a user from whom we will manage the service.
# bundy-cmdctl-usermgr add root
It is also worth preparing a database for a DHCP server.
# mysql -u root -p
mysql> CREATE DATABASE bundy;
mysql> CONNECT bundy;
mysql> SOURCE /usr/share/bundy/dhcpdb_create.mysql
mysql> CREATE USER 'bundy'@'localhost' IDENTIFIED BY 'bundy';
mysql> GRANT ALL ON bundy.* TO 'bundy'@'localhost';
mysql> quit
Well, that’s all we are ready to start and see what kind of beast this BUNDY is.
Let's go ...
From the parent system we execute the start command, for the first start you can even add the --verbose key
$ docker exec -i -t bundy /usr/sbin/bundy --verbose
In the container, we connect to the service using the bundyctl utility which allows us to manage and configure all bundy services.
# bundyctl
Username: root
Password:
["login success"]
> help
usage: [param1 = value1 [, param2 = value2]]
Type Tab character to get the hint of module/command/parameters.
Type "help(? h)" for help on bundyctl.
Type " help" for help on the specific module.
Type " help" for help on the specific command.
Available module names:
help Get help for bundyctl.
config Configuration commands.
execute Execute a given set of commands
Stats Stats daemon
tsig_keys The TSIG keyring is stored here
Init Init process
Logging Logging options
data_sources
The sources of authoritative DNS data
Cmdctl Interface for command and control
Msgq The message queue
>
As I said above, by default, the DNS and DHCP services (and others) are not running, for their initialization there is a ready-made script that initializes an authorized DNS server. So, for starters, let's see what processes we have started before initialization begins.
> Init show_processes
[
[
18493,
"Socket creator",
null
],
[
18494,
"msgq",
null
],
[
18496,
"cfgmgr",
"ConfigManager"
],
[
18498,
"bundy-stats",
"Stats"
],
[
18499,
"bundy-cmdctl",
"Cmdctl"
]
]
We execute the initialization script and again look at what we now have with the processes:
> execute init_authoritative_server
adding Authoritative server component
adding Xfrin component
adding Xfrout component
adding Zone Manager component
Components added. Please enter "config commit" to
finalize initial setup and run the components.
> config commit
> Init show_processes
[
[
18493,
"Socket creator",
null
],
[
18494,
"msgq",
null
],
[
18496,
"cfgmgr",
"ConfigManager"
],
[
18498,
"bundy-stats",
"Stats"
],
[
18499,
"bundy-cmdctl",
"Cmdctl"
],
[
18559,
"bundy-xfrout",
"Xfrout"
],
[
18560,
"bundy-xfrin",
"Xfrin"
],
[
18561,
"bundy-zonemgr",
"Zonemgr"
],
[
18562,
"bundy-auth",
"Auth"
]
]
I think that the difference is noticeable :) We have 4 new processes:
- bundy-xfrout
- bundy-xfrin
- bundy-zonemgr
- bundy-auth
Let's check the operation of the DNS server by querying its version.
# dig @127.0.0.1 -c CH -t TXT version.bind
; <<>> DiG 9.9.5-9-Debian <<>> @127.0.0.1 -c CH -t TXT version.bind
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 27337
;; flags: qr aa rd; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 1
;; WARNING: recursion requested but not available
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;version.bind. CH TXT
;; ANSWER SECTION:
version.bind. 0 CH TXT "bundy 1.2.0"
;; AUTHORITY SECTION:
bind. 0 CH NS bind.
;; Query time: 1 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Fri Jul 03 07:39:41 UTC 2015
;; MSG SIZE rcvd: 79
Well, what can we congratulate us - in spite of any obstacles during compilation, we were able to start and initialize an authorized DNS server BUNDY | BIND10. I think that today there are enough letters.
In the next part, we will look a bit at the modules that are included in bundy and who is responsible for what, as well as continue the configuration of DHCP and other modules.