LetsEncrypt – Issuing Valid HTTPS Certificates for Intranet Subdomains

domain-name-systemhttpsinternal-dnslets-encryptssl-certificate

I'm trying to provide secure services on my home intranet. Up to now I've used self-signed certificates with a made-up domain example.foo, with a subdomain for my separate systems (e.g. srv1.example.foo). These domains are defined on my local DNS server.

Now I've bought the domain example.com, but have no plans on providing any public services. I also have a VPS with static IPs to point example.com to.

I hope to create a wildcard letsencrypt certificate for *.example.com to use for my intranet systems. To separate local systems from anything public, I'd define a subdomain on my local DNS, which should not be resolved on public DNS servers (e.g. *.local.example.com). Thus have local intranet systems use names like srv1.local.example.com.

Is this setup feasible?

Can I create such a certificate on my VPS for *.example.com and secure intranet services with the generated certificate. Have my local DNS server resolve domains like srv1.local.example.com to private IPs and not expose any private IPs or domains to the public?

Best Answer

Can I create such a certificate on my VPS for *.example.com and secure intranet services with the generated certificate.

Yes, but it's a strange way of doing it. It doesn't make automation easy.

I would run certbot (or whatever tool you use) on the actual system that needs the certificate, or some server inside your network where the system that needs it can grab it.

Use dns challenge authentication to validate control over the domain. This requires an external DNS provider that has API, e.g., Route53, Cloudflare, Azure, or a multitude of others.

You don't need any pbulic dns records except the txt records used for validating ownership.

Related Topic