Thank you for replying, but it worked - via the manual method
I honestly do not know what I did any differently but go slow - I put an entry like this manually in the xxxxxxxx.com zone file and restarted BIND after putting in the “xxxxxxxxxx” that certbot sent - it did not work so many times that after 8 hours of this - this was my last attempt before getting ready to quit - and it worked
It should be noted I got some strange reports from the command
host -t txt _acme-challenge.xxxxxxxx.com
At first it was saying _acme-challenge.xxxxxxxx.com was an alias of xxxxxxxx.com, now it is reporting the correct manual txt file entries I put in. This MUST have been a DNS proprogation issue
_acme-challenge.xxxxxxxx.com. 86400 IN TXT “xxxx” as an entry in the zone file worked - manually.
where the TXT in the " xxxx" is the TXT the certbot returns to be requested in the entry - after restarting BIND - it asks for a second different one - which I put in and restart BIND again and then WAS failing with this in the log (date and times removed)
When I waited quite a while between entries and restarting BIND - while scratching my head . . . and checking everything I could to make sure the entries were actually showing via the host command above . . . it worked . . . otherwise I was getting errors like this below
968:INFO:certbot.auth_handler:Performing the following challenges:
968:INFO:certbot.auth_handler:dns-01 challenge for xxxxxxxx.com
968:INFO:certbot.auth_handler:dns-01 challenge for xxxxxxxx.com
888:DEBUG:certbot.error_handler:Encountered exception:
Traceback (most recent call last):
File “/usr/lib/python2.7/site-packages/certbot/auth_handler.py”, line 75, in handle_authorizations
resp = self._solve_challenges(aauthzrs)
That is done by running certbot manually with
certbot certonly --manual -i apache -d “*.xxxxxxxx.com” -d xxxxxxxx.com --agree-tos --no-bootstrap --manual-public-ip-logging-ok --preferred-challenges dns-01 --server https://acme-v02.api.letsencrypt.org/directory
and it resulted in this in the terminal window
Domain: xxxxxxxx.com
Type: unauthorized
Detail: Incorrect TXT record
“st1N5t_i5LMJ1atBOk7IFpFf1UQ9KTLFSwmJ8cpwMJw” found at
_acme-challenge.xxxxxxxx.com
Domain: xxxxxxxx.com
Type: unauthorized
Detail: Incorrect TXT record
“st1N5t_i5LMJ1atBOk7IFpFf1UQ9KTLFSwmJ8cpwMJw” found at
_acme-challenge.xxxxxxxx.com
IF I RAN the dns-rfc2136 method - which I believe is supposed to be able to directly write the challenges to the zone file . . .
certbot certonly --dns-rfc2136 --dns-rfc2136-credentials /credentials.ini -i apache -d “*.xxxxxxxx.com” -d xxxxxxxx.com --server https://acme-v02.api.letsencrypt.org/directory
I got a SERVFAIL and this in the log
377:DEBUG:certbot_dns_rfc2136.dns_rfc2136:No authoritative SOA record found for _acme-challenge.xxxxxxxx.com
380:DEBUG:certbot_dns_rfc2136.dns_rfc2136:Received authoritative SOA response for xxxxxxxx.com
I was getting an authoritative response from xxxxxxxx.com but it appears to saying it was looking for the same thing from the _acme-challenge.xxxxxxxx.com
But I could not restart BIND with the _acme-challenge.xxxxxxxx.com zone enabled in named.conf, and this is the zone file below
_acme-challenge.xxxxxxxx.com. 86400 IN SOA ns1.yyyyyyy.com. no-reply.main.yyyyyyyy.com. (
2016122000 ;Serial Number
3600 ;refresh
7200 ;retry
2419200 ;expire
86400 ;minimum
)
_acme-challenge.xxxxxxxx.com. 86400 IN TXT “r-2_LNtcFxp59czkubzPWvSnIklxC7kbRsLaiMEXcyo”
_acme-challenge.xxxxxxxx.com. 86400 IN TXT “shxSAJw1EsyGXSZljTq-30-guYP3lpDs0JsRmQNj–E”
_acme-challenge.xxxxxxxx.com. 86400 IN TXT “jpNLi1Vtw5QWL4KKv-6xRu7FG8cErsdy4TF6QY2Q2KE”
_acme-challenge.xxxxxxxx.com. 86400 IN NS ns1.yyyyyyy.com.
_acme-challenge.xxxxxxxx.com. 86400 IN NS ns2.yyyyyyy.com.
_acme-challenge.xxxxxxxx.com. 14400 IN A 104.251.217.147
localhost 14400 IN A 127.0.0.1
All I was getting this in the named log as
391 general: error: zone xxxxxxxx.com/IN/internal: loading from master file /var/named/xxxxxxxx.com.db failed: permission denied . . .
If I tried to restart BIND with _acme-challenge.xxxxxxxx.com in the named.conf file as a zone, and I would not guess this is what the certbot challenge intends - to put a fake domain zone in named
My understanding is if using the dns-rfc2136 plugin - certbot is supposed to be able to write the challenge, but I have to change
zone “xxxxxxxx.com.” IN {
to
zone “xxxxxxxx.com.” {
from the instructions or BIND will not restart
It seems to still work and gets tokens etc . . .
A page at https://www.netgate.com/docs/pfsense/dns/rfc2136-dynamic-dns.html states . . .
“Then [zone command in named.conf] creates the initial zone file. Be aware that BIND will rewrite this zone file, which is why a subdomain is used in the example. BIND will also need read/write access to this file and the directory in which it resides so that it may rewrite the zone and its journal.”
Which concerned me as the zone file is full of subdomain entries already and I would not want them deleted.
The JNL files with the current date ARE being written to /var/named/dynamic, and the command above DID NOT have an “IN” command either as I had to remove to get it restart BIND
Since BIND will not restart - it does not create the initial zone file - and i tried it will a variant of zone file name not in the var/named directory already
The last thing is my zone files are of the format xxxxxxxx.com.db
I will still have to face getting the dns-rfc2136 plugin working so the cron jobs can keep this wildcard cert current - as I have the other domains working
The _acme-challenge.xxxxxxxx.com zone just “DISAPPEARED” by itself from the zone views, and after I got the cert to come down - I disabled the zone file for it.