diff options
author | Qian Lei <qianl.fnst@cn.fujitsu.com> | 2014-12-17 14:31:34 +0800 |
---|---|---|
committer | Martin Jansa <Martin.Jansa@gmail.com> | 2014-12-19 20:10:58 +0100 |
commit | 935eb8fa8dc9172965ed01eaf001548b1d510fc0 (patch) | |
tree | 18a21edfbd2c43fd3d7aa1789ed4917012f7ff4d | |
parent | a30ee70d8dbbec811a580f65af1adbaf1f1276af (diff) | |
download | meta-openembedded-935eb8fa8dc9172965ed01eaf001548b1d510fc0.tar.gz |
dnssec-conf: Add new recipe
DNSSEC configuration and priming tool. Dnssec-conf includes a commandline
configuration client for Bind and Unbound, known DNSSEC keys, URL's to
official publication pages of keys, and harvested keys, as well a script
to harvest DNSKEY's from DNS.
Signed-off-by: Qian Lei <qianl.fnst@cn.fujitsu.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
3 files changed, 336 insertions, 0 deletions
diff --git a/meta-networking/recipes-support/dnssec-conf/dnssec-conf/dnskey-pull.1 b/meta-networking/recipes-support/dnssec-conf/dnssec-conf/dnskey-pull.1 new file mode 100644 index 000000000..554c68687 --- /dev/null +++ b/meta-networking/recipes-support/dnssec-conf/dnssec-conf/dnskey-pull.1 | |||
@@ -0,0 +1,118 @@ | |||
1 | '\" t | ||
2 | .\" Title: DNSKEY-PULL | ||
3 | .\" Author: [see the "AUTHOR" section] | ||
4 | .\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/> | ||
5 | .\" Date: 7 November 2008 | ||
6 | .\" Manual: User\*(Aqs Manual | ||
7 | .\" Source: User's Manual | ||
8 | .\" Language: English | ||
9 | .\" | ||
10 | .TH "DNSKEY\-PULL" "1" "7 November 2008" "User's Manual" "User\*(Aqs Manual" | ||
11 | .\" ----------------------------------------------------------------- | ||
12 | .\" * Define some portability stuff | ||
13 | .\" ----------------------------------------------------------------- | ||
14 | .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
15 | .\" http://bugs.debian.org/507673 | ||
16 | .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html | ||
17 | .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
18 | .ie \n(.g .ds Aq \(aq | ||
19 | .el .ds Aq ' | ||
20 | .\" ----------------------------------------------------------------- | ||
21 | .\" * set default formatting | ||
22 | .\" ----------------------------------------------------------------- | ||
23 | .\" disable hyphenation | ||
24 | .nh | ||
25 | .\" disable justification (adjust text to left margin only) | ||
26 | .ad l | ||
27 | .\" ----------------------------------------------------------------- | ||
28 | .\" * MAIN CONTENT STARTS HERE * | ||
29 | .\" ----------------------------------------------------------------- | ||
30 | .SH "NAME" | ||
31 | dnskey-pull \- fetch DNSKEY records from a zone, from all sub\-zones or from a webpage | ||
32 | .SH "SYNOPSIS" | ||
33 | .HP \w'\fBdnskey\-pull\fR\ 'u | ||
34 | \fBdnskey\-pull\fR [\-a] [\-t] [\-o\ \fI<output>\fR] [\-s\ \fI<ns>\fR] \fIzone\fR \fI[\&.\&.]\fR | ||
35 | .HP \w'\fBdnskey\-pull\fR\ 'u | ||
36 | \fBdnskey\-pull\fR [\-o\ \fI<output>\fR] \fIurl\fR \fI[\&.\&.]\fR | ||
37 | .SH "DESCRIPTION" | ||
38 | .PP | ||
39 | \fBdnskey\-pull\fR | ||
40 | obtains Key\-Signing\-Key (KSK) DNSKEY records for use as | ||
41 | \fItrust\-anchor\fR | ||
42 | with recursing nameserver that are setup to use | ||
43 | \fBDNSSEC\&.\fR | ||
44 | .PP | ||
45 | dnskey\-pull itself performs no DNSSEC validation\&. dnskey\-pull pulls KSK DNSKEY records for a single zone but can also be told, if it has | ||
46 | \fIzone\-transfer\fR | ||
47 | (AXFR) permission, to lookup KSK DNSKEY records for all NS records found in a zone\&. This latter feature can be used to find new DNSKEY\*(Aqs in TLD\*(Aqs\&. | ||
48 | .PP | ||
49 | The output of this command can be directly included in the configuration files for the | ||
50 | \fBBind\fR | ||
51 | and | ||
52 | \fBUnbound\fR | ||
53 | recursing nameservers as DNSSEC trust anchor\&. | ||
54 | .PP | ||
55 | dnskey\-pull ignores the system\*(Aqs | ||
56 | /etc/resolv\&.conf | ||
57 | setting for domain appending, and treats all zone arguments as FQDN\&. It does use the system\*(Aqs resolver settings for recursive lookups\&. | ||
58 | .SH "OPTIONS" | ||
59 | .PP | ||
60 | \fB\-a\fR | ||
61 | .RS 4 | ||
62 | Use a zone\-transfer (AXFR) to find all NS records in a zone and return any DNSKEY records found for these NS records in | ||
63 | \fItrusted\-key\fR | ||
64 | format\&. Note that AXFR is often blocked on nameservers\&. | ||
65 | .RE | ||
66 | .PP | ||
67 | \fB\-s\ \&<\fR\fInameserver>\fR | ||
68 | .RS 4 | ||
69 | Use the specified nameserver to perform the zone\-transfer (AXFR)\&. | ||
70 | .RE | ||
71 | .PP | ||
72 | \fB\-t\fR | ||
73 | .RS 4 | ||
74 | Return the resulting DNSKEY\*(Aqs within a | ||
75 | \fItrusted\-key { };\fR | ||
76 | statement, compatible for including with a | ||
77 | \fIbind\fR | ||
78 | or | ||
79 | \fIunbound\fR | ||
80 | nameserver configuration\&. | ||
81 | .RE | ||
82 | .SH "EXAMPLES" | ||
83 | .PP | ||
84 | Get all DNSKEY records for Top Level Domains (TLD\*(Aqs) in the Root ("\&.") zone, using the F root\-server that allows zone\-transfers: | ||
85 | .PP | ||
86 | \fB% dnskey\-pull \-t \-a \-s f\&.root\-servers\&.net \&.\fR | ||
87 | .PP | ||
88 | Get a trusted\-key statement for the xelerance\&.com zone: | ||
89 | .PP | ||
90 | \fB% dnskey\-pull \-t xelerance\&.com\fR | ||
91 | .PP | ||
92 | Get the trusted keys for the TLD\*(Aqs of Sweden, Brasil and Bulgaria: | ||
93 | .PP | ||
94 | \fB% dnskey\-pull se\&. br\&. bg\&.\fR | ||
95 | .PP | ||
96 | Find all secured | ||
97 | \fIENUM\fR | ||
98 | zones: | ||
99 | .PP | ||
100 | \fB% dnskey\-pull \-a \-s ns\-pri\&.ripe\&.net\&. e164\&.arpa\&.\fR | ||
101 | .PP | ||
102 | Find the keys on the webpage of the Brasil NIC: | ||
103 | .PP | ||
104 | \fB% dnskey\-pull https://registro\&.br/ksk/index\&.html\fR | ||
105 | .SH "EXIT STATUS" | ||
106 | .PP | ||
107 | dnskey\-pull returns 0 when it found one or more DNSKEY records, and non\-zero upon finding no DNSKEY records\&. | ||
108 | .SH "SEE ALSO" | ||
109 | .PP | ||
110 | \fBdnssec-configure\fR(1), | ||
111 | \fBsystem-config-dnssec\fR(1), | ||
112 | \fBnamed.conf\fR(8), | ||
113 | \fBunbound.conf\fR(8), | ||
114 | \fBautotrust\fR(8), | ||
115 | \fBunbound-host\fR(8)\&. | ||
116 | .SH "AUTHOR" | ||
117 | .PP | ||
118 | Paul Wouters <paul@xelerance\&.com> | ||
diff --git a/meta-networking/recipes-support/dnssec-conf/dnssec-conf/dnssec-configure.8 b/meta-networking/recipes-support/dnssec-conf/dnssec-conf/dnssec-configure.8 new file mode 100644 index 000000000..48291cb67 --- /dev/null +++ b/meta-networking/recipes-support/dnssec-conf/dnssec-conf/dnssec-configure.8 | |||
@@ -0,0 +1,179 @@ | |||
1 | '\" t | ||
2 | .\" Title: DNSSEC-CONFIGURE | ||
3 | .\" Author: [see the "AUTHOR" section] | ||
4 | .\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/> | ||
5 | .\" Date: 10 December 2008 | ||
6 | .\" Manual: User\(aas Manual | ||
7 | .\" Source: User\*(Aqs Manual | ||
8 | .\" Language: English | ||
9 | .\" | ||
10 | .TH "DNSSEC\-CONFIGURE" "8" "10 December 2008" "User\*(Aqs Manual" "User\(aas Manual" | ||
11 | .\" ----------------------------------------------------------------- | ||
12 | .\" * Define some portability stuff | ||
13 | .\" ----------------------------------------------------------------- | ||
14 | .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
15 | .\" http://bugs.debian.org/507673 | ||
16 | .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html | ||
17 | .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
18 | .ie \n(.g .ds Aq \(aq | ||
19 | .el .ds Aq ' | ||
20 | .\" ----------------------------------------------------------------- | ||
21 | .\" * set default formatting | ||
22 | .\" ----------------------------------------------------------------- | ||
23 | .\" disable hyphenation | ||
24 | .nh | ||
25 | .\" disable justification (adjust text to left margin only) | ||
26 | .ad l | ||
27 | .\" ----------------------------------------------------------------- | ||
28 | .\" * MAIN CONTENT STARTS HERE * | ||
29 | .\" ----------------------------------------------------------------- | ||
30 | .SH "NAME" | ||
31 | dnssec-configure \- update recursive nameserver configuration options and keys for \fIDNSSEC\fR and \fIDLV\fR\&. Currently Bind (named) and Unbound are supported\&. | ||
32 | .SH "SYNOPSIS" | ||
33 | .HP \w'\fBdnssec\-configure\fR\ 'u | ||
34 | \fBdnssec\-configure\fR [\-u] [\-b] \-\-dnssec=\fIon\fR | \fIoff\fR \-\-dlv=\fIon\fR | \fIoff\fR | \fI<dlvzone>\fR [\-\-basedir=\fI<dir>\fR] [\-\-norestart] [\-\-nocheck] [\-\-production] [\-\-testing] [\-\-harvest] [\-\-root] | ||
35 | .HP \w'\fBdnssec\-configure\fR\ 'u | ||
36 | \fBdnssec\-configure\fR \-\-show [\-u] [\-b] | ||
37 | .HP \w'\fBdnssec\-configure\fR\ 'u | ||
38 | \fBdnssec\-configure\fR \-u | \-b \-\-set=\fIsecion:optname:optval\fR | ||
39 | .HP \w'\fBdnssec\-configure\fR\ 'u | ||
40 | \fBdnssec\-configure\fR \-u | \-b \-\-query=\fIsecion:optname:optval\fR | ||
41 | .SH "DESCRIPTION" | ||
42 | .PP | ||
43 | dnssec\-configure shows or rewrites the configuration files of the | ||
44 | \fIBind (named)\fR | ||
45 | and/or the | ||
46 | \fIUnbound\fR | ||
47 | nameservers\&. It verifies the configuration before rewriting it, and restarts the nameserver(s) if neccessary\&. | ||
48 | .SH "OPTIONS" | ||
49 | .PP | ||
50 | \fB\-b (\-n)\fR | ||
51 | .RS 4 | ||
52 | Update the | ||
53 | \fIBind (named)\fR | ||
54 | nameserver configuration\&. | ||
55 | .RE | ||
56 | .PP | ||
57 | \fB\-u\fR | ||
58 | .RS 4 | ||
59 | Update the | ||
60 | \fIUnbound\fR | ||
61 | nameserver configuration\&. | ||
62 | .RE | ||
63 | .PP | ||
64 | If neither options are specified, | ||
65 | \fI\-b \-u\fR | ||
66 | is assumed\&. | ||
67 | .PP | ||
68 | \fB\-\-show\fR | ||
69 | .RS 4 | ||
70 | Show the current configuration(s) and do not rewrite any configuration files\&. All other options below are ignored\&. | ||
71 | .RE | ||
72 | .PP | ||
73 | \fB\-\-set=\fR<section:optname:optvalue> | ||
74 | .RS 4 | ||
75 | Set the options optname to value in the specified section of the configuration file\&. This option cannot be used with \-\-dnssec, \-\-dlv, \-\-query or \-\-show\&. This option can be specified multiple times to set more then one option at once\&. | ||
76 | .RE | ||
77 | .PP | ||
78 | \fB\-\-set=\fR<section:optname:optvalue> | ||
79 | .RS 4 | ||
80 | Query the setting optname in the specified section of the configuration file\&. This option cannot be used with \-\-dnssec, \-\-dlv, \-\-set or \-\-show\&. This option can be specified multiple times to query more then one option at once\&. | ||
81 | .RE | ||
82 | .PP | ||
83 | \fB\-\-dnssec=\fR<on|off> | ||
84 | .RS 4 | ||
85 | This option will enable or disable all | ||
86 | \fIDNSSEC\fR | ||
87 | processing by the nameserver\&. When enabled, detected spoofed or otherwise verifiably false DNS answers will not be returned\&. Instead, a | ||
88 | \fISERVFAIL\fR | ||
89 | is returned\&. The application is responsible for further investigation\&. When disabled, classic DNS services run without any advanced protection\&. | ||
90 | .RE | ||
91 | .PP | ||
92 | \fB\-\-dlv=\fR<on|off|\fIdlvzone\fR> | ||
93 | .RS 4 | ||
94 | This option will enable or disable | ||
95 | \fIDLV\fR, or "DNSSEC Lookaside Verification" (RFC 5074)\&. This is a method for using DNSSEC in TLD\*(Aqs that themselves do not support DNSSEC\&. It works by offloading DNS queries for all TLD\*(Aqs for which no DNSSEC keys are loaded to a DLV Registry\&. The Trusted Key for the DLV Registry must be available\&. The default DLV Registry (when using the value | ||
96 | \fIon\fR, is the | ||
97 | \fBISC DLV\fR | ||
98 | (http://dlv\&.isc\&.org/)i\&. The ISC DLV Key is pre\-installed with this software\&. You can specify your own DLV Registry, but you must make sure the | ||
99 | \fIdlvzone\fR\*(Aqs key is installed in | ||
100 | \fI/etc/pki/dnssec/dlv/dlvzone\&.key\fR\&. | ||
101 | .RE | ||
102 | .PP | ||
103 | \fB\-\-basedir\fR\fI<dir>\fR | ||
104 | .RS 4 | ||
105 | The basedir for Trusted Key files\&. The default is | ||
106 | \fI/etc/pki/dnssec\-keys/\fR\&. NOT YET IMPLEMENTED | ||
107 | .RE | ||
108 | .PP | ||
109 | \fB\-\-norestart\fR | ||
110 | .RS 4 | ||
111 | Do not attempt to restart any running DNS resolving nameservers\&. This is for use within initscripts, where dnssec\-configure is called to update the settings from within a DNS server initscript\&. Otherwise this would cause a loop\&. | ||
112 | .RE | ||
113 | .PP | ||
114 | \fB\-\-nocheck\fR | ||
115 | .RS 4 | ||
116 | Do not attempt to run unbound\-checkconf or bind\-checkconf\&. This is required for calls within package managers such as RPM where at least for unbound, we are still missing keys/certs and unbound\-checkconf would return an error\&. We cannot generate keys before running unbound\-checkconf, as we might not have enough entropy resulting in a stalled partial install\&. | ||
117 | .RE | ||
118 | .PP | ||
119 | The following options determine which Trusted Keys to preload with the nameserver software\&. Without Trusted Keys, no DNSSEC verification is possible\&. At some point, when the Root is signed, only one key would need to be preloaded\&. This is not yet the case\&. | ||
120 | .PP | ||
121 | \fB\-\-production\fR | ||
122 | .RS 4 | ||
123 | Include Trusted Keys that are in full production\&. These keys have been analysed by people in the DNS community or have been publicly announced by their TLD to be production ready\&. If no Trusted Keys options are specified, only this setting will be enabled\&. These keys can be found in | ||
124 | \fI/etc/pki/dnssec\-keys/production\&.conf\fR\&. | ||
125 | .RE | ||
126 | .PP | ||
127 | \fB\-\-testing\fR | ||
128 | .RS 4 | ||
129 | Include Trusted Keys that are in testing mode\&. These keys tend to be reasonably stable, or have been found and verified but not officially announced by its TLD\&. These are not included per default\&. These keys can be found in | ||
130 | \fI/etc/pki/dnssec\-keys/testing\&.conf\fR\&. | ||
131 | .RE | ||
132 | .PP | ||
133 | \fB\-\-harvest\fR | ||
134 | .RS 4 | ||
135 | Include Trusted Keys that are harvested and/or added by the local system administrator themselves\&. These keys can be found in | ||
136 | \fI/etc/pki/dnssec\-keys/harvest\&.conf\fR\&. | ||
137 | .RE | ||
138 | .PP | ||
139 | \fB\-\-root\fR | ||
140 | .RS 4 | ||
141 | Include the Trusted Keys for the Root Zone\&. Currently the root is not signed, and there is no root key available\&. A test Root key is available from IANA, but this requires using a separate resolver at IANA\*(Aqs\&. Do not use this option\&. | ||
142 | .RE | ||
143 | .SH "EXAMPLES" | ||
144 | .PP | ||
145 | Enable DNSSEC with production keys and ISC\*(Aqs DLV Registry for all nameserver software found on the machine | ||
146 | .PP | ||
147 | \fB# dnssec\-configure \-\-dnssec=on \-\-dlv=on\fR | ||
148 | .PP | ||
149 | For the Unbound nameserver, enable DNSSEC with production and testing keys, and use dlv\&.xelerance\&.com as the DLV Registry | ||
150 | .PP | ||
151 | \fB# dnssec\-configure \-u \-\-dnssec=on \-\-dlv=dlv\&.xelerance\&.com \-\-production \-\-testing\fR | ||
152 | .PP | ||
153 | For the Bind nameserver, disable dnssec | ||
154 | .PP | ||
155 | \fB# dnssec\-configure \-b \-\-dnssec=off\fR | ||
156 | .SH "REQUIREMENTS" | ||
157 | .PP | ||
158 | One or both of the known DNSSEC capable nameservers, Bind and Unbound, is required\&. To support | ||
159 | \fIRFC 5011\fR | ||
160 | style automatic key updates, the | ||
161 | \fIautotrust\fR | ||
162 | software is needed along with a cron daemon\&. | ||
163 | .SH "TRUSTED KEYS" | ||
164 | .PP | ||
165 | The format of the key files is carefully chosen to be compatible with both Bind and Unbound\&. Key files are stored in individual files so that they can be easilly verified and updated by autotrust\&. The keys are grouped in their respective categories production, testing and harvest\&. If you have local DNSSEC keys you wish to preload, you can add these to one of these three directories and re\-run dnssec\-configure to rebuild the production\&.conf, testing\&.conf and harvest\&.conf files based which are based on the contents of the | ||
166 | \fI/etc/pki/dnssec\-keys/{production,testing,harvest}\fR | ||
167 | directories\&. If you wish to use another DLV, add the key for the DLV zone to | ||
168 | \fI/etc/pki/dnssec\-keys/dlv/dlvzone\&.domain\&.key\fR\&. | ||
169 | .SH "SEE ALSO" | ||
170 | .PP | ||
171 | \fIdnskey\-pull\fR(1), | ||
172 | \fIunbound\-host\fR(1), | ||
173 | \fIsystem\-config\-dnssec\fR(8), | ||
174 | \fIautotrust\fR(8), | ||
175 | \fInamed\&.conf\fR(8), | ||
176 | \fIunbound\&.conf\fR(8)\&. | ||
177 | .SH "AUTHOR" | ||
178 | .PP | ||
179 | Paul Wouters <paul@xelerance\&.com> | ||
diff --git a/meta-networking/recipes-support/dnssec-conf/dnssec-conf_2.02.bb b/meta-networking/recipes-support/dnssec-conf/dnssec-conf_2.02.bb new file mode 100644 index 000000000..d915e0825 --- /dev/null +++ b/meta-networking/recipes-support/dnssec-conf/dnssec-conf_2.02.bb | |||
@@ -0,0 +1,39 @@ | |||
1 | SUMMARY = "DNSSEC and DLV configuration and priming tool" | ||
2 | DESCRIPTION = "\ | ||
3 | DNSSEC configuration and priming tool. Keys are required until the root \ | ||
4 | is signed, as well as for local unpublished DNSSEC keys to be preloaded \ | ||
5 | into the recursive nameserver. These DNSSEC configuration files can be \ | ||
6 | directly included in the bind or unbound nameserver configuration files. \ | ||
7 | dnssec-conf includes a commandline configuration client for Bind and \ | ||
8 | Unbound, known DNSSEC keys, URL's to official publication pages of keys, \ | ||
9 | and harvested keys, as well a script to harvest DNSKEY's from DNS. \ | ||
10 | See also: system-config-dnssec" | ||
11 | HOMEPAGE = "https://github.com/xelerance/dnssec-conf" | ||
12 | SECTION = "System Environment/Daemons" | ||
13 | LICENSE = "GPLv2+" | ||
14 | LIC_FILES_CHKSUM = "file://LICENSE;md5=0636e73ff0215e8d672dc4c32c317bb3" | ||
15 | |||
16 | SRC_URI = "git://github.com/xelerance/dnssec-conf.git \ | ||
17 | file://dnskey-pull.1 \ | ||
18 | file://dnssec-configure.8" | ||
19 | SRCREV = "8e799683736b4a7b5e5e78f98fba0a6f48393537" | ||
20 | |||
21 | S = "${WORKDIR}/git" | ||
22 | |||
23 | do_configure () { | ||
24 | sed -i '/^\sxmlto man/s=^=#=' Makefile | ||
25 | } | ||
26 | do_install () { | ||
27 | rm -rf ${D} | ||
28 | mv ${WORKDIR}/dnskey-pull.1 ${WORKDIR}/dnssec-configure.8 ${S} | ||
29 | make PREFIX=${prefix} DESTDIR=${D} ETCDIR=${D}${sysconfdir} install | ||
30 | # We no longer ship trust anchors. Most of these are in the DLV Registry now. | ||
31 | # and it prevents the problem of shipping outdated trust anchors. | ||
32 | # For DLV, we ship the ISC DLV Registry key | ||
33 | rm -rf ${D}${sysconfdir}/pki/dnssec-keys/harvest/* | ||
34 | rm -rf ${D}${sysconfdir}/pki/dnssec-keys/production/reverse/* | ||
35 | install -d -m 0755 ${D}${sysconfdir}/sysconfig | ||
36 | install -m 0644 packaging/fedora/dnssec.sysconfig ${D}${sysconfdir}/sysconfig/dnssec | ||
37 | } | ||
38 | |||
39 | RDEPENDS_${PN} = "python" | ||