Most active commenters
  • vegardx(3)
  • ranger_danger(3)

←back to thread

246 points nh2 | 16 comments | | HN request time: 0.827s | source | bottom
Show context
ndsipa_pomu ◴[] No.41912342[source]
I prefer to assign an external name to an internal device and grab a free SSL cert from LetsEncrypt, but using DNS challenge instead as internal IP addresses aren't reachable by their servers.
replies(9): >>41912368 #>>41912827 #>>41913126 #>>41913387 #>>41913720 #>>41913826 #>>41916306 #>>41917079 #>>41917804 #
1. lolinder ◴[] No.41913720[source]
Yep. I tried the custom-root-CA approach for a long time, but there were just too many problems with it:

* Loading it into every device was more work than it sounds. We have Android, iOS, Mac, Windows, and Linux, all of which have their own rules.

* Even once loaded, some applications come with their own set of root CAs. Some of those have a custom way of adding a new one (Firefox), others you just had to accept the invalid cert each time, and still others just refused to work.

* I deploy my self-hosted stuff with Docker, which means that not only does each device need to have the root CA added to it but every Docker image that talks to the internal network needs to have it as well. This ends up being a mix of the previous two problems, as I now have to figure out how to mount the CA on an eclectic bunch of distros and I often then have to figure out why the dockerized application isn't using the CA.

In the end I settled on a DNS-challenge wildcard SSL cert loaded into Caddy, with Caddy terminating TLS for everything that's on my home server. It's way simpler to configure the single server (or even 2-3 servers) than every single client.

replies(5): >>41913737 #>>41914971 #>>41915668 #>>41916018 #>>41918994 #
2. from-nibly ◴[] No.41913737[source]
Don't forget chromecast, roku, fire stick, smart TV, and all the other bs.
3. poincaredisk ◴[] No.41914971[source]
Historically, before wildcard certificates were suddenly available for free, this leaked all internal domains to the internet, but now it's mostly a solved problem.
replies(3): >>41915477 #>>41918875 #>>41920096 #
4. vegardx ◴[] No.41915477[source]
I don't understand why that is such a huge problem. The alternatives have much more severe problems, all from reusing a wildcard in many places to running your own PKI.
replies(1): >>41915630 #
5. NovemberWhiskey ◴[] No.41915630{3}[source]
It depends on your risk profile, but there are definitely people who'd rather run their own PKI than permit threat actor reconnaissance by publishing internal hostnames to CT logs.
replies(1): >>41918151 #
6. tbhb ◴[] No.41915668[source]
These are exactly the challenges and toil I ran into over time with my self-hosted/homelab setup. I use regular domains now as well with DNS challenges for Let's Encrypt. I've been experimenting lately with CloudFlare Tunnel + Zero Trust Access as well for exposing only the endpoints I need from an application for local development like webhooks, with the rest of the site locked behind Access.
replies(1): >>41916455 #
7. gh02t ◴[] No.41916018[source]
> I deploy my self-hosted stuff with Docker, which means that not only does each device need to have the root CA added to it but every Docker image that talks to the internal network needs to have it as well. This ends up being a mix of the previous two problems, as I now have to figure out how to mount the CA on an eclectic bunch of distros and I often then have to figure out why the dockerized application isn't using the CA.

FWIW, I solve this problem with wildcards + a central reverse proxy for containerized apps. I host most services on a subdomain of the machine that hosts containers, like "xxx.container.internal", "xxx2.container.internal", etc. Instead of each container doing it's own SSL I have one central reverse proxy container that binds to 443 and each app container gets put on an internal Docker network with the reverse proxy. Reverse proxy has a wildcard certificate for the host system domain name "*.container.internal" and you can just add an endpoint for each service SNI. I'm using Zoraxy, which makes it very easy to just add a new endpoint if I install a new app with a couple clicks, but this works with lots of other reverse proxies like Caddy, Nginx, etc. If containers need to talk to each other over the external endpoint for some reason and thus need the root CA you can mount the host system's certificate store into the container, which seems to work pretty well the one or two times I needed to do it.

I haven't really solved the annoyance of deploying my root CA to all the devices that need it, which truly is a clusterfuck, but I only have to do it once a year so it isn't that bad. Very open to suggestions if people have good ways to automate this, especially in a general way that can cover Windows/Mac/iOS/Android/various Linuxes uniformly since I have a lot of devices. I've experimented with Ansible, but that doesn't cover mobile devices, which are the ones that make it most difficult.

8. 0x457 ◴[] No.41916455[source]
I used to run wildcard cert with DNS challenge from LE with CloudFlare Tunnel to expose internal server to interwebs.

I have since then switched to ubiquiti products, and now I just run wireguard server for my road-warrior devices. Would use CloudFlare Tunnel if I ever need to expose anything publically.

9. vegardx ◴[] No.41918151{4}[source]
When this information is useful you've either got fundamental security related issues that needs to be addressed long before this, or you're dealing with threat actors with significant capabilities. In the latter case you've probably already taking this into account when you're creating your stuff, or you have the capability and technical understanding to know how to properly roll out your own PKI.

The overlap of people that suggest that you either run your own PKI or just distribute a wildcard certificate and have the technical understanding on how to do this in a secure way is minuscule. The rest of those people are probably better off using something like Lets Encrypt.

replies(1): >>41920091 #
10. peanut-walrus ◴[] No.41918875[source]
So what? Do you keep secrets in your domain names?
11. DidYaWipe ◴[] No.41918994[source]
I've used this method for development successfully (generating CAs and certs on Mac with mkcert), but Apple has broken certificates in iOS 18. Root CAs are not showing up in the trust UI on iPhones after you install them. It's a big issue for developers, and has broken some people's E-mail setups as well. Also some internal software deployments.

Apple is aware of it, but it's still not fixed in iOS 18.1.

12. ranger_danger ◴[] No.41920091{5}[source]
I still think it's a good idea not to expose more information than necessary, mostly for the reasons we can't think of.

Also I wouldn't be surprised if Let's Encrypt/ZeroSSL were compromised.

replies(1): >>41922276 #
13. ranger_danger ◴[] No.41920096[source]
> suddenly available for free

I have to wonder if there is some hidden ulterior motive behind that.

replies(1): >>41920267 #
14. 8organicbits ◴[] No.41920267{3}[source]
Let's Encrypt is a well funded non-profit project. What ulterior motive do you imagine?

https://letsencrypt.org/sponsors/

replies(1): >>41921472 #
15. ranger_danger ◴[] No.41921472{4}[source]
I think the obvious is a world government that wants to spy on everyone.
16. vegardx ◴[] No.41922276{6}[source]
It would surprise me if it was, because of features like certificate transparency logs.