Banish OEM self-signed certs forever and roll your own private LetsEncrypt
arstechnica.com
arstechnica.com
If you're going through all the effort to instrument everything with certbot, why not just use LE and get a real cert?
I think the last time I issued non-wildcard SSL certs for my domains was when I was still making the mistake of self-hosting email and the entire setup was a rickety mess.
Personally, the way I'd solve the problem in the situation where it'd be a problem is to not put auth on the same domain; auth would go to auth.secondexample.com. That's generally speaking the better choice to begin with due to browser weirdness regarding domain isolation (which is also why you often see software with CDNs use completely different domain names; reddit images being hosted on redd.it for example but also YouTube thumbnails being on ytimg. If they didn't, a maliciously formed file could read out browser storage for different subdomains).
Nope: one can setup ACLs so that the script that can update the records for printer.lan… cannot also do foo.lan… or any *.lan….
Poor security practice to use a wildcard. I completely agree there. But I can understand how wildcard certs work well for the average Joe who just wants internal stuff to be served over TLS without having to think about it too hard.
I work in security, so in my view, having the most secure internal network possible (think ZTA) is certainly up there.
Although I have come up with an alternative approach to achieve this.
This will allow internal-only services to get LE/ACME certs, but those cert will still show up in the CT logs and be visible to the entire world.
Some folks do not want that visibility, and that's what an internal-only CA gets you.
I went back and forth between self-signed CA vs LetsEncrypt.
I liked the self-signed CA root because you can create end-entity certificates for internal ip addresses such as 192.168.1.13 instead of domain names. (No domain name purchase and no public DNS records pointing to 192.168.1.13 required.) The public SSL services like Let'sEncrypt and ZeroSSL can't issue certs for RFC1918 ip addresses -- for obvious reasons.
On the other hand, I didn't want to import my custom CA root certificate into all 8+ devices around the house. (desktops+laptops+phones+tablets+etc.) So, Let'sEncrypt won in my case on that basis.
The Vault initialization and configuration is more or less manual (just a bunch of commands, I have them in my notes). From there I am using an ansible role based on the hasi_vault module [1] which is run by a Jenkins job every night, logging into each target system, renewing certs if needed and reloading services.
Has been working very well for about a year now. Of course, there's a little more technical context needed - my CA needs to be present on all systems interacting with it, and my CI needs to be able to log into each target system (SSH keypair + sudo user). This ties into the rest of my infrastructure, which is managed by Terraform and Ansible.
I might write up a small blog post about this if I find the time.
[1] https://docs.ansible.com/ansible/latest/collections/communit...
Best practice is to use name constraints to prevent the trust root from impersonating, for example, google.com if your LAN only uses .corp or similar.
If you have dozens (or more) of locations that need a cert, then on a yearly basis you have to run around updating things.
Then there are systems on which installing certificates is hard, like your niece's iPhone. Oh, just use Overseerr to request that movie. What you you mean? Certificate error? Oh, let me fix it.
I get a wildcard from ZeroSSL (after they bought acme.sh) and a couple of non-wildcard ones.
One thing to remember that a wildcard for .domain.com doesn't work for .foo.domain.com. You have to get a second-level *.foo.domain.com wildcard.
https://developer.mozilla.org/en-US/docs/Web/Security/Secure...
SSL https is definitely a hassle which seems like overkill with private home networks but there can be reasons for it.
For example, self-hosted Bitwarden/Vaultwarden password manager doesn't work without https:// SSL.
The client UI for managing passwords running in web browsers depend on the Chrome/Firefox cryptography APIs and those don't work for non-encrypted http:// :
>Access to the WebCrypto API is restricted to secure origins (which is to say https:// pages). -- from https://www.chromium.org/blink/webcrypto/#:~:text=Access%20t....
If you don't want to expose network details, use something like Tailscale to get unique internal IPs and map those. (Don't use Tailscale's own MagicDNS, that one logs individual certificates for machines into CT rather than giving you a wildcard cert for your tailnet).
No, I think it's far easier to just not do it.
Sure, it's far easier not to do it. It's also far easier to have no root password.
In practice, most domain registrars have certbot plugins - you just grab your API key from their customer portal and put it in a file, then run certbot in DNS-01 mode and instruct them to use that. Certbot places a temporary TXT record, which gets verified and the certificate is issued. Then certbot removes the TXT record and that's that. If there's no plugin, you do that by hand, which works but is a bit more involved.
You don't need a firewall for that or a DDNS client. Also if you have a weird registrar that only offers you to set NS records, most VPS providers have free DNS services.