Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
misc:scripts:letsencrypt-bookmyname-dnschallenge [2020/12/14 15:55] jaxxmisc:scripts:letsencrypt-bookmyname-dnschallenge [2020/12/14 16:30] jaxx
Line 1: Line 1:
 === BookMyName hooks for LE-Certbot === === BookMyName hooks for LE-Certbot ===
  
-The following scripts can be used as hooks to authenticate domains hosted by [[https://www.bookmyname.com|BookMyName]] (super cheap domains) using DNS challenges with this initial command:+The following **crude** scripts can be used as hooks to authenticate domains hosted by [[https://www.bookmyname.com|BookMyName]] (super cheap domains) using DNS challenges with this initial [[https://certbot.eff.org/|certbot]] command:
  
 <code> <code>
-certbot certonly --manual --preferred-challenges=dns --manual-auth-hook /path/to/bmn-AAXXXX-auth.sh --manual-cleanup-hook /path/to/bmn-AAXXXX-cleanup.sh -d yourdomain.com -d *.yourdomain.com+certbot certonly --manual --preferred-challenges=dns --manual-auth-hook /path/to/bmn-JXXXXX-auth.sh --manual-cleanup-hook /path/to/bmn-AAXXXX-cleanup.sh -d yourdomain.com -d *.yourdomain.com
 </code> </code>
  
-BMN has a pseudo API, though it's slow as hell+BMN has a pseudo API, though it's slow as hell to update (~15/20 minutes)
  
-<file bash bmn-ABXXXX-auth.sh>+Obviously: place files where only your certbot runs, lock them down to be read only by whatever user runs your certonly/renew commands, often root, and change the BMN_USER/PASS variables 
 + 
 +Feel free to have the cleanup script loop through a ''dig _acme-challenge.$DOMAIN TXT +short | tr -d "\"" '' and clean each entry, if entries get stranded, the answer would end up to long to validate a cert request 
 + 
 +<file bash bmn-JXXXXX-auth.sh>
 #!/bin/bash #!/bin/bash
  
-BMN_USER="ABXXXX-FREE"+BMN_USER="JXXXXX-FREE"
 BMN_PASS="plikplok" BMN_PASS="plikplok"
  
 DOMAIN=$(expr match "$CERTBOT_DOMAIN" '.*\.\(.*\..*\)') DOMAIN=$(expr match "$CERTBOT_DOMAIN" '.*\.\(.*\..*\)')
  
 +# Bare TLD gets written off
 if [[ $DOMAIN == "" ]] if [[ $DOMAIN == "" ]]
 then then
Line 53: Line 58:
 </file> </file>
  
-<file bash bmn-ABXXXX-cleanup.sh>+<file bash bmn-JXXXXX-cleanup.sh>
 #!/bin/bash #!/bin/bash
  
-BMN_USER="ABXXXX-FREE"+BMN_USER="JXXXXX-FREE"
 BMN_PASS="plikplok" BMN_PASS="plikplok"