mirror of
https://github.com/dehydrated-io/dehydrated.git
synced 2026-01-13 15:13:33 +01:00
dynamic subzone for DNS 2136 update #580
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @nemihome on GitHub (Sep 14, 2022).
I have a setup with a dynamic subdomain zone where bind can create a text entry and this text is referenced by an alias in the main zone. The main zone is static and not changeable dynamically. The idea of it is that this should be more safe.
Dynamic Zone wich can be edited by dehydrated auto.mydomain.de
Static Zone mydomain.de
Alias in static zone _acme-challenge.mydomain.de for _acme-challenge.auto.mydomain.de
Text record which is set by dehydrated hook script in bind DNS
_acme-challenge.auto.mydomain.de.
Text record which is checked by dehydrated for validation: _acme-challenge.mydomain.de. - this is not existing but due to alias it looks like it is existing.
Due to changes of letsencrypt (they claim that this setup should never has worked and was never supported but it did work with dehydrated and with certbot) I had to change the auto.mydomain.de subzone to _acme-challenge.mydomain.de subzone. As a result I had to remove the alias entry because subzone and alias could not exist both with identical names.
After that change certbot is working again but dehydrated does not. I adapted my hook file and basically the log is looking good exept the result. All parts of the hookfile seem to work. The text entry is set and text entry is verified in the hook file but the dehydrated script does not seem to check the text entry in the subzone but in the mainzone which does not exist and due to missing alias is not found.
Is there a way to get this running?
Logging:
I think the relevant part is this one: "No TXT record found at _acme-challenge.mydomain.de","status":403
Threre can't be any text record because that's the subzone byself and this is needed for certbot otherwise it is not working anymore. So basically only the subzone has to be added for the check.
Old hook file:
New hook File:
@nemihome commented on GitHub (Sep 14, 2022):
Found a solution which was way easier than I thought. So basically it's creating the text entries without a name directly in the subzone.
NEW:
host -t txt ${SUBPRE}.${DOMAIN} 8.8.8.8 | grep -- ${TOKEN_VALUE} >/dev/null 2>&1SAME for the other two hosts
OLD:
host -t txt _acme-challenge.${SUBPRE}.${DOMAIN} 8.8.8.8 | grep -- ${TOKEN_VALUE} >/dev/null 2>&1SAME for the other two hosts