@tinfoilmatt
Thanks.
With your
Selecting any 'sleep' time value will disable the local TXT query/'poll' completely.
I dived into acme.sh to understand what it was doing if DNS Sleep is set to zero.
If DNS Sleep is set to zero ... then there will be a 20 seconds delay.
After that, acme.sh does the checking itself.
See _check_dns_entries().
Here is the acme.sh DNS Check Wiki page.
The acme.sh will use DOH** and picks DOH CLOUDFLARE, DOH_GOOGLE, or DOH_ALI.
From here, it starts looping around up until the moment all DNS NS server reproduce the same correct result = a TXT record with the correct name and correct content.
This DNS test run can last for 1200 seconds or 10 minutes max.
As soon as a total match is found : good TXT value and good TXT content, then the process continues : the actual certificate renewal.
Humm.
This is actually a smarter way of doing things
** but : If you've blocked DOH with for example pfBlockerng, or blocked Google and or Cloudflare DNS IPS, then you've reached the typical 'shoot in the foot' situation.
I do block all DOH with pfBLockerng, so that explains for me why :
[image: 1775630503531-5f5f3b1b-cb1d-433e-b1d1-607df0468a4c-image.png]
never worked for me.
The default behavior is to automatically poll public DNS servers for records until ACME finds them, rather than waiting a set amount of time.
The reality :
The default behavior is to automatically poll public DOH DNS servers for records until ACME finds them, rather than waiting a set amount of time.
Furthermore, the public DOH DNS servers, and ordinary DNS servers are known and listed. If pfBlocker blocks these, then DNS Sleep = 0 will probably fail.
Thanks, @tinfoilmatt , I now (better) understand what DNS Sleep '0' does.
edit
Further investigation : we can't set up our own DOH server to be used by acme.sh.
acme.sh has 4 build in (hardcoded) DOH servers, and you have to pick one and if you don't, Cloudflare is used by default.
The "DNS Sleep" setting is "0" by default, and for good reasons it is exposed in the pfSense GUI.
Read for example this acme.sh 'issue', and everything is now clear.
I could activate DOH on my own DNS domain name servers, but that means I have to patch acme.sh. My own DOH wouldn't be blacklisted (DNSBL) by pfBlockerng ^^
I do understand why acmes.sh default to use DOH : the challenge code, created by Letsencrypt, and put in place at the DNS master domain name server by acme.sh, has to be protected 'at all costs'. After all, the one who possesses (intercepts) this challenge code could obtain a certificate for that (your) domain name. That would be a huge disaster.