LetsEncrypt PHP API with BIND server DNS-01 challenge

If you wanted an easy to use PHP api to verify DNS-01 challenges then this guide is for you. An acme.sh plugin to interact with the PHP script. Also supports manually verifying and adding TXT records.

https://example.com/acme.php?password=y6piHUklqGhZn6BhULmYraNhEfZKlSep&hostname=_acme-challenge.example.com&txt=acmetxtrecordtoverify

Add and remove as many servers to verify in just one PHP file.

Blog Post LetsEncrypt PHP API BIND DNS and ACME DNS-01 server setup

The last line of that blog post is:
"Let me know if you have any comments or if there is any bug or error in this guide."

But I fail to easily find how anyone can do that.

link in the bottom footer.

That's one click.
Where I find:
image
But it then requires a second, and a third click, to find a real way to contact you [contact me page]:

I'm suggesting to make it easier [than three clicks].

Like making the text a hyperlink to your contact page:
"Let me know if you have any comments or if there is any bug or error in this guide."
AND
adding a "Click anywhere here to" preceding that text.

Click anywhere here to let me know if you have any comments or if there is any bug or error in this guide.

Doesn't acme.sh have its own BIND DNS plugin? :interrobang: Looks like a very convoluted method this to be honest.

Edit:
Ah yes, it's the dns_nsupdate.sh script. Sorry to say, but there's absolutely no reason to add an extra PHP layer I'd say :slight_smile: It's documented at dnsapi · acmesh-official/acme.sh Wiki · GitHub.

Also, for in the future, please use one of the "Documentation" IP ranges as documented by IANA IPv6 Special-Purpose Address Registry and IANA IPv4 Special-Purpose Address Registry for usage in documentation instead of an IP range owned by Zhejiang Telecom (IPv4) or 6to4 address for an IPv4 address owned by Vodafone Czech Republic (IPv6).

Yes, I saw the dns_nsupdate.sh plugin and used it too but it was a hassle managing tsig keys and logging into ssh and restarting bind. This is why I made a PHP script with hostnames and passwords for easy management of domains. Just edit the login section to add remove hostnames.

$user_info=[
'_acme-challenge.example.com'=>'y6piHUklqGhZn6BhULmYraNhEfZKlSep',
'_acme-challenge.www.example.com'=>'y6piHUklqGhZn6BhULmYraNhEfZKlSep',
'_acme-challenge.homeserver.example.com'=>'lSOd73rMh1P9j8kpow24bbBDDWzkekwh',
'_acme-challenge.fileserver.example.com'=>'KM2gy8nS5W1P0OrbqbtmqvBlvtZfKn0F',
'_acme-challenge.gameserver.example.com'=>'DVhaFA3QoIDeg02edTEHAwtyzEPByXM1',
'_acme-challenge.plexserver.example.com'=>'6D1RKde1zlh0vYL47Df1x3UjuoCfyqMJ'
];

Some one can also use SQL database to store hostnames and passwords and create a management page to add / remove hostnames.