-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
366 additions
and
7 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
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
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,57 @@ | ||
|
||
main -> ( | ||
blank {% id %} | ||
| comment {% id %} | ||
| server {% id %} | ||
| zone {% id %} | ||
| log {% id %} | ||
| acl {% id %} | ||
| key {% id %} | ||
| policy {% id %} | ||
| remote {% id %} | ||
| template {% id %} | ||
):* | ||
|
||
blank -> _ eol {% asNull %} | ||
comment -> _ "#" notEol eol {% asNull %} | ||
|
||
key_val -> __ word ":" __ word eol {% asKeyVal %} | ||
|
||
array_block -> __ "-" __ word ":" __ word _ eol (key_val {% id %}):* eol_ {% asArray %} | ||
|
||
acl -> "acl" ":" eol (array_block {% id %}):* eol_ {% asTopObj %} | ||
key -> "key" ":" eol (array_block {% id %}):* eol_ {% asTopObj %} | ||
policy -> "policy" ":" eol (key_val {% id %}):* eol {% asTopObj %} | ||
remote -> "remote" ":" eol (key_val {% id %}):* eol {% asTopObj %} | ||
server -> "server" ":" eol (key_val {% id %}):* eol {% asTopObj %} | ||
template -> "template" ":" eol (array_block {% id %}):* eol_ {% asTopObj %} | ||
zone -> "zone" ":" eol (array_block {% id %}):* eol_ {% asTopObj %} | ||
log -> "log" ":" eol (array_block {% id %}):* eol_ {% asTopObj %} | ||
|
||
_ -> [ \t]:* | ||
__ -> [ \t]:+ | ||
eol -> [\r\n] {% id %} | ||
eol_ -> [\r\n]:* {% id %} | ||
hex -> [A-Fa-f0-9] {% id %} | ||
notEol -> [^\r\n]:* | ||
word -> [A-Za-z-0-9_.@:/-]:+ {% flatten %} | ||
dqstring -> "\"" dqcharacters "\"" {% d => Array.isArray(d[1]) ? d[1].join("") : d[1] %} | ||
dqcharacters -> dqcharacter {% id %} | ||
| dqcharacter dqcharacters {% d => [d[0], ...d[1]] %} | ||
dqcharacter -> [^\"\\] {% id %} | ||
| "\\" escape {% d => d[1] %} | ||
escape -> ["\\/bfnrt] {% id %} | ||
| "u" hex hex hex hex {% (d) => String.fromCharCode(`0x${d.slice(1,5).join("")}`) %} | ||
|
||
@{% | ||
function asArray (d) { | ||
return Object.assign({ [d[3]]: d[6] }, ...d[9].filter(e => 'object' === typeof e)) | ||
} | ||
function asTopObj (d) { return { [d[0]]: d[3] } } | ||
function asKeyVal (d) { return { [d[1]]: d[4] } } | ||
function asNull (d) { return null; } | ||
function flatten (d) { | ||
if (!d) return '' | ||
return Array.isArray(d) ? d.flat(Infinity).join('') : d | ||
} | ||
%} |
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,69 @@ | ||
// MASTER & CACHING NAME SERVER for EXAMPLE, INC. | ||
// maintained by: me myself alone | ||
// CHANGELOG: | ||
// 1. 9 july 2003 - did something | ||
// 2. 16 july 2003 - did something else | ||
// 3. 23 july 2003 - did something more | ||
// | ||
options { | ||
directory "/var/named"; | ||
// version statement - inhibited for security | ||
// (avoids hacking any known weaknesses) | ||
version "get lost"; | ||
// optional - disables all transfers | ||
// slaves allowed in zone clauses | ||
allow-transfer {"none";}; | ||
// Closed DNS - permits only local IPs to issue recursive queries | ||
// remove if an Open DNS required to support all users | ||
// or add additional ranges | ||
allow-recursion {192.168.3.0/24;}; | ||
}; | ||
// | ||
// log to /var/log/named/example.log all events from | ||
// info UP in severity (no debug) | ||
// defaults to use 3 files in rotation | ||
// BIND 8.x logging MUST COME FIRST in this file | ||
// BIND 9.x parses the whole file before using the log | ||
// failure messages up to this point are in (syslog) | ||
// typically /var/log/messages | ||
// | ||
logging{ | ||
channel example_log{ | ||
file "/var/log/named/example.log" versions 3 size 2m; | ||
severity info; | ||
print-severity yes; | ||
print-time yes; | ||
print-category yes; | ||
}; | ||
category default{ | ||
example_log; | ||
}; | ||
}; | ||
// required zone for recursive queries | ||
zone "." { | ||
type hint; | ||
file "root.servers"; | ||
}; | ||
zone "example.com" in{ | ||
type master; | ||
file "master/master.example.com"; | ||
// enable slaves only | ||
allow-transfer {192.168.23.1;192.168.23.2;}; | ||
}; | ||
// required local host domain | ||
zone "localhost" in{ | ||
type master; | ||
file "master.localhost"; | ||
allow-update{none;}; | ||
}; | ||
// localhost reverse map | ||
zone "0.0.127.in-addr.arpa" in{ | ||
type master; | ||
file "localhost.rev"; | ||
allow-update{none;}; | ||
}; | ||
// reverse map for class C 192.168.0.0 | ||
zone "0.168.192.IN-ADDR.ARPA" in{ | ||
type master; | ||
file "192.168.0.rev"; | ||
}; |
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,25 @@ | ||
server: | ||
listen: 0.0.0.0@53 | ||
listen: ::@53 | ||
|
||
zone: | ||
- domain: example.com | ||
storage: /var/lib/knot/zones/ | ||
file: example.com.zone | ||
- domain: example2.com | ||
file: example2.com.zone | ||
|
||
- domain: example3.com | ||
file: example3.com.zone | ||
|
||
zone: | ||
- domain: example4.com | ||
file: example4.com.zone | ||
- domain: example5.com | ||
file: example5.com.zone | ||
|
||
log: | ||
- target: syslog | ||
any: info | ||
- target: /var/log/knotd.log | ||
any: info |
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,14 @@ | ||
# Example of a very simple Knot DNS configuration. | ||
|
||
server: | ||
listen: 0.0.0.0@53 | ||
listen: ::@53 | ||
|
||
zone: | ||
- domain: example.com | ||
storage: /var/lib/knot/zones/ | ||
file: example.com.zone | ||
|
||
log: | ||
- target: syslog | ||
any: info |
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,14 @@ | ||
# Example of a very simple Knot DNS configuration. | ||
|
||
server: | ||
listen: 0.0.0.0@53 | ||
listen: ::@53 | ||
|
||
zone: | ||
- domain: example.com | ||
storage: /var/lib/knot/zones/ | ||
file: example.com.zone | ||
|
||
log: | ||
- target: syslog | ||
any: info |
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,36 @@ | ||
zone: | ||
- domain: 0.0.127.in-addr.arpa | ||
file: /data/knot/0.0.127.in-addr.arpa | ||
zone: | ||
- domain: 160/27.51.128.66.in-addr.arpa | ||
file: /data/knot/160/27.51.128.66.in-addr.arpa | ||
zone: | ||
- domain: horseshoeing.org | ||
file: /data/knot/horseshoeing.org | ||
zone: | ||
- domain: txalamako.org | ||
file: /data/knot/txalamako.org | ||
zone: | ||
- domain: theartfarm.com | ||
file: /data/knot/theartfarm.com | ||
zone: | ||
- domain: _report._dmarc.theartfarm.com | ||
file: /data/knot/_report._dmarc.theartfarm.com | ||
zone: | ||
- domain: w8ct.net | ||
file: /data/knot/w8ct.net | ||
zone: | ||
- domain: tikismikis.org | ||
file: /data/knot/tikismikis.org | ||
zone: | ||
- domain: lynboyer.com | ||
file: /data/knot/lynboyer.com | ||
zone: | ||
- domain: _tcp.theartfarm.com | ||
file: /data/knot/_tcp.theartfarm.com | ||
zone: | ||
- domain: horsenetwork.com | ||
file: /data/knot/horsenetwork.com | ||
zone: | ||
- domain: ctacllc.com | ||
file: /data/knot/ctacllc.com |
Oops, something went wrong.