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
Apress
committed
Oct 16, 2016
0 parents
commit d3c2301
Showing
254 changed files
with
4,813 additions
and
0 deletions.
There are no files selected for viewing
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,27 @@ | ||
Freeware License, some rights reserved | ||
|
||
Copyright (c) 2011 Ron Aitchison | ||
|
||
Permission is hereby granted, free of charge, to anyone obtaining a copy | ||
of this software and associated documentation files (the "Software"), | ||
to work with the Software within the limits of freeware distribution and fair use. | ||
This includes the rights to use, copy, and modify the Software for personal use. | ||
Users are also allowed and encouraged to submit corrections and modifications | ||
to the Software for the benefit of other users. | ||
|
||
It is not allowed to reuse, modify, or redistribute the Software for | ||
commercial use in any way, or for a user�s educational materials such as books | ||
or blog articles without prior permission from the copyright holder. | ||
|
||
The above copyright notice and this permission notice need to be included | ||
in all copies or substantial portions of the software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS OR APRESS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. | ||
|
||
|
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,15 @@ | ||
#Apress Source Code | ||
|
||
This repository accompanies [*Pro DNS and BIND 10*](http://www.apress.com/9781430230489) by Ron Aitchison (Apress, 2011). | ||
|
||
![Cover image](9781430230489.jpg) | ||
|
||
Download the files as a zip using the green button, or clone the repository to your machine using Git. | ||
|
||
##Releases | ||
|
||
Release v1.0 corresponds to the code in the published book, without corrections or updates. | ||
|
||
##Contributions | ||
|
||
See the file Contributing.md for more information on how you can contribute to this repository. |
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 @@ | ||
; IPv4 zone file for example.com | ||
$TTL 2d ; default TTL for zone | ||
$ORIGIN example.com. | ||
; Start of Authority record defining the key characteristics of the zone (domain) | ||
@ IN SOA ns1.example.com. hostmaster.example.com. ( | ||
2010080800 ; sn = serial number | ||
12h ; refresh | ||
15m ; retry = refresh retry | ||
3w ; expiry | ||
2h ; nx = nxdomain ttl | ||
) | ||
; name servers Resource Records for the domain | ||
IN NS ns1.example.com. | ||
; the second name servers is | ||
; external to this zone (domain). | ||
IN NS ns2.example.net. | ||
; mail server Resource Records for the zone (domain) | ||
3w IN MX 10 mail.example.com. | ||
; the second mail servers is | ||
; external to the zone (domain) | ||
IN MX 20 mail.example.net. | ||
; domain hosts includes NS and MX records defined above | ||
; plus any others required | ||
ns1 IN A 192.168.254.2 | ||
mail IN A 192.168.254.4 | ||
joe IN A 192.168.254.6 | ||
www IN A 192.168.254.7 | ||
|
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,33 @@ | ||
; IPv4 zone file for example.com | ||
$TTL 2d ; default TTL for zone | ||
$ORIGIN example.com. ; base domain-name | ||
; Start of Authority record RR defining the key characteristics | ||
; of the zone (domain) | ||
@ IN SOA ns1.example.com. hostmaster.example.com. ( | ||
2003080800 ; se = serial number | ||
12h ; retry = refresh retry | ||
15m ; ret = update retry | ||
3w ; ex = expiry | ||
3h ; nx = nxdomain ttl | ||
) | ||
; name servers RRs for the domain | ||
IN NS ns1.example.com. | ||
; the second name server is | ||
; external to this zone (domain). | ||
IN NS ns2.example.net. | ||
; mail server RRs for the zone (domain) | ||
; value 10 in this case denotes it is the most preferred | ||
3w IN MX 10 mail.example.com. | ||
; the second mail server has lower preference (20) and is | ||
; external to the zone (domain) | ||
IN MX 20 mail.example.net. | ||
; domain hosts includes NS and MX records RRs defined previously | ||
; plus any others required | ||
ns1 IN A 192.168.254.2 | ||
mail IN A 192.168.254.4 | ||
; web and publically visible host called joe | ||
joe IN A 192.168.254.6 | ||
www IN A 192.168.254.7 | ||
; aliases ftp (ftp server) to an external location | ||
ftp IN CNAME ftp.example.net. | ||
|
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,8 @@ | ||
@ IN SOA ns1.example.com. hostmaster.example.com. ( | ||
2003080800 ; sn = serial number | ||
3h ; refresh time | ||
15m ; retry = refresh retry | ||
3w ; expiry | ||
3h ; nx = nxdomain ttl | ||
) | ||
|
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,12 @@ | ||
; fragment from example - does not use substitution | ||
$TTL 2d ; default TTL for zone | ||
$ORIGIN example.com. | ||
; Start of Authority RR defining the key characteristics of the zone (domain) | ||
@ IN SOA ns1.example.com. hostmaster.example.com. ( | ||
2003080800 ; se = serial number | ||
12h ; ret = refresh retry | ||
15m ; ret = update retry | ||
3w ; ex = expiry | ||
2h ; nx = nxdomain ttl | ||
) | ||
|
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,12 @@ | ||
; fragment rewritten to use $ORIGIN substitution | ||
$TTL 2d ; default TTL for zone | ||
$ORIGIN example.com. | ||
; Start of Authority RR defining the key characteristics of the zone (domain) | ||
@ IN SOA ns1 hostmaster ( | ||
2003080800 ; se = serial number | ||
12h ; ref = refresh | ||
15m ; ret = refresh retry | ||
3w ; ex = expiry | ||
2h ; nx = nxdomain ttl | ||
) | ||
|
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,6 @@ | ||
; name servers RR for the domain | ||
IN NS ns1.example.com. | ||
; the second name server is | ||
; external to this zone (domain). | ||
IN NS ns2.example.net. | ||
|
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,6 @@ | ||
; mail server RRs for the zone (domain) | ||
3w IN MX 10 mail.example.com. | ||
; the second mail server is | ||
; external to the zone (domain) | ||
IN MX 20 mail.example.net. | ||
|
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,5 @@ | ||
ns1 IN A 192.168.254.2 | ||
mail IN A 192.168.254.4 | ||
joe IN A 192.168.254.6 | ||
www IN A 192.168.254.7 | ||
|
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,6 @@ | ||
ns1 IN A 192.168.254.2 | ||
mail IN A 192.168.254.4 | ||
joe IN A 192.168.254.6 | ||
; this A RR has the same IPv4 address as ns1 above | ||
www IN A 192.168.254.2 | ||
|
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,4 @@ | ||
www IN A 192.168.254.2 | ||
IN A 192.168.254.7 | ||
IN A 192.168.254.8 | ||
|
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,4 @@ | ||
ftp IN CNAME bill | ||
www IN CNAME bill | ||
bill IN 192.168.254.21 | ||
|
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,5 @@ | ||
ns1 IN A 192.168.254.2 | ||
mail IN A 192.168.254.3 | ||
joe IN CNAME www.example.com. | ||
www IN CNAME mail.example.com. | ||
|
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,4 @@ | ||
IN MX mail.example.com. | ||
mail IN CNAME www.example.com. | ||
www IN A 192.168.254.7 | ||
|
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,4 @@ | ||
IN MX mail.example.com. | ||
mail IN A 192.168.254.7 | ||
www IN CNAME mail.example.com. | ||
|
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,5 @@ | ||
; define an IP that resolves to example.com | ||
IN A 192.168.254.7 | ||
; alias www.example.com to example.com | ||
www IN CNAME example.com. | ||
|
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 @@ | ||
; simple reverse mapping zone file for example.com | ||
$TTL 2d ; default TTL for zone | ||
$ORIGIN 254.168.192.IN-ADDR.ARPA. | ||
; Start of Authority (SOA) record defining the key characteristics of the zone (domain) | ||
@ IN SOA ns1.example.com. hostmaster.example.com. ( | ||
2003080800 ; sn = serial number | ||
12h ; refresh | ||
15m ; retry | ||
3w ; expiry | ||
2h ; nxdomain ttl | ||
) | ||
; name servers Resource Records for the domain | ||
IN NS ns1.example.com. | ||
; the second name servers is | ||
; external to this zone (domain). | ||
IN NS ns2.anotherdomain.com. | ||
; PTR RR maps an IPv4 address to a host name | ||
2 IN PTR ns1.example.com. | ||
..... | ||
4 IN PTR mail.example.com. | ||
..... | ||
16 IN PTR joe.example.com. | ||
17 IN PTR www.example.com. | ||
.... | ||
|
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,6 @@ | ||
2 IN PTR ns1.example.com. | ||
..... | ||
4 IN PTR mail.example.com. | ||
..... | ||
16 IN PTR joe.example.com. | ||
17 IN PTR www.example.com. |
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,3 @@ | ||
ns1 IN A 192.168.254.2 | ||
; this A RR has the same IPv4 address as ns1 above | ||
www IN A 192.168.254.2 |
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,2 @@ | ||
ns1 IN A 192.168.254.2 | ||
www IN CNAME ns1.example.com. |
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,3 @@ | ||
mail IN A 192.168.254.4 | ||
; this A RR has the same IPv4 address as mail above | ||
www IN A 192.168.254.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,2 @@ | ||
mail IN A 192.168.254.4 | ||
www IN CNAME mail.example.com. |
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,2 @@ | ||
; the IN-ADDR.ARPA zone file defines mail not www | ||
4 IN PTR mail.example.com. |
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,2 @@ | ||
www IN A 192.168.254.4 | ||
ftp IN CNAME mail.example.com. |
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,7 @@ | ||
@ IN SOA ns1.example.com. hostmaster.example.com. ( | ||
2005080803 ; sn = serial number | ||
3h ; refresh time | ||
15m ; retry = refresh retry | ||
3w ; expiry | ||
3h ; nx = nxdomain ttl | ||
) |
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,7 @@ | ||
@ IN SOA ns1.example.com. hostmaster.example.com. ( | ||
2003090700 ; sn = serial number | ||
3h ; refresh time | ||
15m ; retry = refresh retry | ||
3w ; expiry | ||
3h ; nx = nxdomain ttl | ||
) |
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,6 @@ | ||
// example.com fragment from named.conf | ||
// defines this server as a zone master for example.com | ||
zone "example.com" in{ | ||
type master; | ||
file "master.example.com"; | ||
}; |
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,8 @@ | ||
// example.com fragment from named.conf | ||
// defines this server as a zone slave | ||
zone "example.com" in{ | ||
type slave; | ||
file "slave.example.com"; | ||
masters {192.168.23.17;}; | ||
}; | ||
|
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,15 @@ | ||
// options clause fragment of named.conf | ||
// recursion yes is the default and may be omitted | ||
options { | ||
recursion yes; | ||
allow-recursion {10.2/16;192.168.2/24;}; // limits (closes) recursion | ||
}; | ||
// zone sectionclause | ||
.... | ||
// the DOT indicates the root domain = all domains | ||
zone "." IN { | ||
type hint; | ||
file "root.servers"; | ||
}; | ||
|
||
|
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,11 @@ | ||
// options clause fragment of named.conf | ||
// forwarders can have multiple choices | ||
options { | ||
forwarders {10.0.0.1; 10.0.0.2;}; | ||
forward only; | ||
}; | ||
// zone file sectionsclauses | ||
.... | ||
|
||
|
||
|
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,10 @@ | ||
// zone clause fragment of named.conf | ||
zone "example.com" IN { | ||
type forward; | ||
forwarders {10.0.0.1; 10.0.0.2;}; | ||
forward only; | ||
}; | ||
|
||
|
||
|
||
|
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 @@ | ||
; public zone master file | ||
; provides minimal public visibility of external services | ||
example.com. IN SOA ns1.example.com. hostmaster.example.com. ( | ||
2003080800 ; se = serial number | ||
12h ; ref = refresh | ||
15m ; ret = update retry | ||
3w ; ex = expiry | ||
3h ; min = minimum | ||
) | ||
IN NS ns1.example.com. | ||
IN NS ns2.example.com. | ||
IN MX 10 mail.example.com. | ||
IN MX 20 mail.example.net. | ||
ns1 IN A 192.168.254.1 | ||
ns1 IN A 192.168.254.2 | ||
mail IN A 192.168.254.3 | ||
www IN A 192.168.254.4 | ||
ftp IN A 192.168.254.5 |
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 @@ | ||
; private zone master file used by stealth server(s) | ||
; provides public and private services and hosts | ||
example.com. IN SOA ns3.example.com. hostmaster.example.com. ( | ||
2010121500 ; sn = serial number | ||
12h ; ref = refresh | ||
15m ; retry = refresh retry | ||
3w ; ex = expiry | ||
3h ; nx = nxdomain ttl | ||
) | ||
IN NS ns3.example.com. | ||
IN NS ns4.example.com. | ||
IN NS 10 mail.example.com. | ||
IN MX 20 mail.anotherdomain.com. | ||
; public hosts | ||
mail IN A 192.168.254.3 | ||
www IN A 192.168.254.4 | ||
ftp IN A 192.168.254.5 | ||
; private hosts | ||
joe IN A 192.168.254.6 | ||
bill IN A 192.168.254.7 | ||
fred IN A 192.168.254.8 | ||
ns3 IN A 192.168.254.9 | ||
ns4 IN A 192.168.254.10 | ||
accounting IN A 192.168.254.28 | ||
payroll IN A 192.168.254.29 | ||
|
||
|
||
|
||
|
||
|
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,7 @@ | ||
// options section clause fragment of named.conf | ||
// recursion no = effectively inhibits caching | ||
options { | ||
recursion no; | ||
}; | ||
// zone file sectionsclauses | ||
.... |
Oops, something went wrong.