@@ -148,10 +148,10 @@ To check if the plugin is installed correctly and detected properly by certbot,
148
148
certbot plugins
149
149
```
150
150
151
- ---
152
-
153
151
Below are some examples of how to use the plugin:
154
152
153
+ ---
154
+
155
155
Generate a certificate for a DNS-01 challenge of the domain "example.duckdns.org":
156
156
157
157
``` commandline
@@ -166,6 +166,8 @@ certbot certonly \
166
166
-d "example.duckdns.org"
167
167
```
168
168
169
+ ---
170
+
169
171
Generate a certificate for a DNS-01 challenge of the subdomain "cloud.example.duckdns.org":
170
172
171
173
``` commandline
@@ -180,6 +182,8 @@ certbot certonly \
180
182
-d "cloud.example.duckdns.org"
181
183
```
182
184
185
+ ---
186
+
183
187
Generate a wildcard certificate for a DNS-01 challenge of all subdomains "* .example.duckdns.org":
184
188
185
189
``` commandline
@@ -194,6 +198,8 @@ certbot certonly \
194
198
-d "*.example.duckdns.org"
195
199
```
196
200
201
+ ---
202
+
197
203
Generate a certificate for a DNS-01 challenge of the domain "example.duckdns.org" using a credentials file:
198
204
199
205
``` commandline
@@ -208,6 +214,8 @@ certbot certonly \
208
214
-d "example.duckdns.org"
209
215
```
210
216
217
+ ---
218
+
211
219
Generate a certificate for a DNS-01 challenge of the domain "example.duckdns.org" without an account (i.e. without an
212
220
email address):
213
221
@@ -223,6 +231,8 @@ certbot certonly \
223
231
-d "example.duckdns.org"
224
232
```
225
233
234
+ ---
235
+
226
236
Generate a staging certificate (i.e. temporary testing certificate) for a DNS-01 challenge of the domain "
227
237
example.duckdns.org":
228
238
@@ -239,12 +249,67 @@ certbot certonly \
239
249
--staging
240
250
```
241
251
252
+ ---
253
+
254
+ DNS-01 Challenges allow using CNAME records or NS records to delegate the challenge response to other DNS zones.
255
+ For example, this allows you to resolve the DNS challenge for another provider's domain using a duckdns domain.
256
+ For example, we have ` abc.duckdns.org ` as duckdns domain and ` example.com ` as our other domain.
257
+ We might have an existing DNS configuration which look like this:
258
+ ``` commandline
259
+ one.example.com. 600 IN CNAME two.example.com.
260
+ two.example.com. 600 IN CNAME abc.duckdns.org.
261
+ ```
262
+ It chains ` one.example.com ` to ` two.example.com ` and finally to ` abc.duckdns.org ` .
263
+
264
+ Now we want to issue a DNS-01 challenge for the subdomain "test.example.com".
265
+ So we create a CNAME record for "_ acme-challenge.test.example.com" pointing to "one.example.com".
266
+ The DNS records now look like this:
267
+ ``` commandline
268
+ _acme-challenge.test.example.com. 600 IN CNAME one.example.com.
269
+ one.example.com. 600 IN CNAME two.example.com.
270
+ two.example.com. 600 IN CNAME abc.duckdns.org.
271
+ ```
272
+
273
+ Now we use certbot to generate a certificate for the domain ` test.example.com ` with the DNS challenge:
274
+
275
+ ``` commandline
276
+ certbot certonly \
277
+ --non-interactive \
278
+ --agree-tos \
279
+ --email <your-email> \
280
+ --preferred-challenges dns \
281
+ --authenticator dns-duckdns \
282
+ --dns-duckdns-token <your-duckdns-token> \
283
+ --dns-duckdns-propagation-seconds 60 \
284
+ -d "test.example.com" \
285
+ ```
286
+
287
+ What happens in the background can be seen very well in the DNS records:
288
+ ``` commandline
289
+ _acme-challenge.test.example.com. 600 IN CNAME one.example.com.
290
+ one.example.com. 600 IN CNAME two.example.com.
291
+ two.example.com. 600 IN CNAME abc.duckdns.org.
292
+ abc.duckdns.org. 60 TXT "asduh9asudhßa97sdhap9sudaisudoi"
293
+ ```
294
+
295
+ When validating the DNS challenge value, all CNAME records are now traversed.
296
+ It starts with ` _acme-challenge.test.example.com ` and goes to ` one.example.com ` , then to ` two.example.com ` and finally
297
+ to ` abc.duckdns.org ` . Here is the validation token stored as TXT record.
298
+
299
+ The example could also be shortened by directly creating a CNAME entry from ` _acme-challenge.test.example.com ` to
300
+ ` abc.duckdns.org ` . So we skip all other CNAME records in between. To make it clear that any CNAME records are traversed
301
+ during validation, the intermediate parts are added in the previous example.
302
+
303
+ ---
304
+
242
305
Try to update all currently generated certificates:
243
306
244
307
``` commandline
245
308
certbot renew
246
309
```
247
310
311
+ ---
312
+
248
313
You can find al list of all available certbot cli options in
249
314
the [ official documentation] ( https://certbot.eff.org/docs/using.html#certbot-command-line-options ) of * certbot* .
250
315
0 commit comments