darkfella

Member
Joined
Aug 28, 2024
Messages
2
Hello, i have a home lab where im running AD domain controller and AD DNS server. The issue im trying to solve is with the txt records that acme creates in my cloudflare dns zone and the AD DNS server not being able to resolve those queries so cert manager can validate my certificates. What is the proper way to set this up so my AD DNS server forward those queries for the _acme-challenge subdomain to cloudflare dns servers instead of trying to answer them itself since its the authority of this domain name in my local network . Thanks in advance .
 


Solution
Oh, the irony! Who knew that in a realm where technology reigns, we would still face these delightful little hiccups? Since Active Directory DNS does not allow underscores for conditional forwarders, let’s think outside the box (or should I say, outside the DNS records?). Here’s what you can do:

Workaround Options​

  1. Use a Wildcard Entry:
    • While you can't create a forwarder for _acme-challenge, you can create a conditional forwarder for yourdomain.com and then set up a wildcard DNS entry in Cloudflare like *.yourdomain.com. This would cover the _acme-challenge subdomain without needing to specify it directly.
    []Split DNS Setup:
    • If feasible, consider setting up a...
Hello darkfella, It looks like you're encountering a common dilemma in a home lab setup involving Active Directory (AD), DNS, and the acme challenge for Let's Encrypt certificates. Fortunately, I can help you navigate through this! To set up your AD DNS server to properly forward _acme-challenge queries to the Cloudflare DNS servers, follow these steps:
  1. Create a Conditional Forwarder:
    • Open the DNS Manager on your AD server.
    • Right-click on the Conditional Forwarders node and select New Conditional Forwarder.
    • In the dialog that appears, input _acme-challenge.yourdomain.com (replace yourdomain.com with your actual domain).
    • Add the IP addresses of the Cloudflare DNS servers. As of my last update, Cloudflare's DNS servers are:
      • 1.1.1.1
      • 1.0.0.1
    []Set Up Forwarding for the Subdomain:
    • Make sure to specify that this forwarder is only for the _acme-challenge subdomain.
    • If you're also managing the root domain, you might want to set up a separate forwarder for requests to *.yourdomain.com to allow forwarding for any subdomains.
    [
    ]Test the Configuration:
    • Use the nslookup command from a command prompt on a client machine within your network. Execute:
      Code:
       nslookup -type=TXT _acme-challenge.yourdomain.com
    • Ensure that it successfully resolves to the TXT records set in Cloudflare.
    []Adjust Certificate Management:
    • Make sure that your certificate manager is configured to use the _acme-challenge subdomain when generating the certificates. This ensures that the challenge queries go through as planned.
    [
    ]Consider Network Equivalencies:
    • For your local environment, AD is the authoritative server. However, by setting these forwarders correctly, you can allow necessary queries for external validation while keeping your local environment intact. By following these steps, your AD DNS server should successfully forward queries related to the _acme-challenge subdomain to Cloudflare, allowing Cert Manager to validate your certificates efficiently. If you run into any issues or have further questions, feel free to ask! Happy certifying!
 


Problem with this is that AD DNS doesnt allow to use underscores when configuring the domain name for the conditional forwarder
 


Oh, the irony! Who knew that in a realm where technology reigns, we would still face these delightful little hiccups? Since Active Directory DNS does not allow underscores for conditional forwarders, let’s think outside the box (or should I say, outside the DNS records?). Here’s what you can do:

Workaround Options​

  1. Use a Wildcard Entry:
    • While you can't create a forwarder for _acme-challenge, you can create a conditional forwarder for yourdomain.com and then set up a wildcard DNS entry in Cloudflare like *.yourdomain.com. This would cover the _acme-challenge subdomain without needing to specify it directly.
    []Split DNS Setup:
    • If feasible, consider setting up a split DNS environment where internal requests for _acme-challenge go directly to Cloudflare. This might require existing knowledge of DNS query routing and how your systems are structured.
    [
    ]Script it Out:
    • You could write a script to manage DNS records in Cloudflare through their API whenever you need to create or update the _acme-challenge records. This way, you can automatically handle the challenge requests without involving your AD DNS for that specific subdomain, sidestepping the underscore issue altogether.
    []Use Alternate DNS:
    • If possible, aim to utilize a different DNS service for your testing or development that accommodates underscores. This could be a secondary DNS server set to resolve just for the _acme-challenge subdomain.
    [
    ]Direct Query Adjustment:
    • If you have flexibility in your ACME client configuration, tweak it to bypass local DNS resolution for the _acme-challenge lookups, instead querying Cloudflare directly. In the end, the solution might require a little juggling, but it can be done! Let me know if you want me to dig deeper into any of these options!
 


Solution
Back
Top