Skip to content

Commit 7cda345

Browse files
T12537: Migrate to BIND
Companion for miraheze/puppet#3914. Do not merge one without the other!!
1 parent a562763 commit 7cda345

File tree

5 files changed

+57
-124
lines changed

5 files changed

+57
-124
lines changed

admin_state

-8
This file was deleted.

config

-116
This file was deleted.

named.conf

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
// This is the primary configuration file for the BIND DNS server named.
2+
//
3+
// Please read /usr/share/doc/bind9/README.Debian for information on the
4+
// structure of BIND configuration files in Debian, *BEFORE* you customize
5+
// this configuration file.
6+
//
7+
// If you are just adding zones, please do that in zones.rfc1918
8+
9+
include "/etc/bind/named.conf.local";

named.conf.local

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
//
2+
// Do any local configuration here
3+
//
4+
5+
// Use the zones.rfc1918 file for adding zones
6+
include "/etc/bind/zones.rfc1918";
7+
8+
// this options block and the following logging block are based on the ones at https://bind9.readthedocs.io/en/latest/chapter3.html#primary-authoritative-name-server
9+
options {
10+
// all relative paths use this directory as a base
11+
directory "/var";
12+
// version statement for security to avoid hacking known weaknesses
13+
// if the real version number is revealed
14+
version "not currently available";
15+
// This is the default - allows user queries from any IP
16+
allow-query { any; };
17+
// normal server operations may place items in the cache
18+
// this prevents any user query from accessing these items
19+
// only authoritative zone data will be returned
20+
allow-query-cache { none; };
21+
// Do not provide recursive service to user queries
22+
recursion no;
23+
};
24+
25+
// logging clause
26+
// log to /var/log/named/example.log all events from info UP in severity (no debug)
27+
// uses 3 files in rotation swaps files when size reaches 250K
28+
// failure messages that occur before logging is established are
29+
// in syslog (/var/log/messages)
30+
//
31+
logging {
32+
channel default_log {
33+
file "/var/log/named/example.log" versions 3 size 250k;
34+
// only log info and up messages - all others discarded
35+
severity info;
36+
};
37+
category default {
38+
default_log;
39+
};
40+
};

zones.rfc1918

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
/*
2+
* How to add new zones:
3+
* 1. Create a zonefile for it with all the records you want in `/zones/`.
4+
* 2. Add a zone block for it here, like so:
5+
* zone "miraheze.org" { type master; file "/etc/bind/zones/miraheze.org"; };
6+
* 3. Commit and push.
7+
* We don't use zone transfers because Puppet will already download the zone file to all nameservers; they can both think they're masters, no problem.
8+
*/

0 commit comments

Comments
 (0)