Ancestors

Toot

Written by ComradeMiao@lemmy.dbzer0.com on 2024-12-20 at 19:38

Solution: How to get local SSL and use your public domain for local internal subdomains?

https://lemmy.dbzer0.com/post/33785346

=> More informations about this toot | More toots from ComradeMiao@lemmy.dbzer0.com

Descendants

Written by ArbiterXero@lemmy.world on 2024-12-20 at 20:06

Or you can do the dns challenge for letsencrypt

=> More informations about this toot | More toots from ArbiterXero@lemmy.world

Written by ComradeMiao@lemmy.dbzer0.com on 2024-12-20 at 20:30

I am using letsencrypt on NPM. You mean only locally?

=> More informations about this toot | More toots from ComradeMiao@lemmy.dbzer0.com

Written by theit8514@lemmy.world on 2024-12-20 at 22:14

The DNS-01 challenge can be used to generate a wildcard by creating the requested dns record in your public dns zone, then you can use that cert for internal servers/dns. With certain dns providers it can even be automated.

eff-certbot.readthedocs.io/en/stable/using.html#t…

=> More informations about this toot | More toots from theit8514@lemmy.world

Written by solrize@lemmy.world on 2024-12-20 at 20:23

Proxy host out on the public internet? Usually I just use a local private CA for this, and install the CA root in my browser.

=> More informations about this toot | More toots from solrize@lemmy.world

Written by ComradeMiao@lemmy.dbzer0.com on 2024-12-20 at 20:31

Cloudflare is only providing the letsencrypt cert.

Could you explain/link your method? :)

=> More informations about this toot | More toots from ComradeMiao@lemmy.dbzer0.com

Written by solrize@lemmy.world on 2024-12-20 at 20:36

I don’t bother with a proxy host or with LetsEncrypt, though I guess you could use LetsEncrypt perfectly well. Back when I was doing this, LetsEncrypt didn’t exist and you had to actually pay for public certificates, so using locally generated free ones saved money. It also had a minor(?) security advantage in that if the private server key somehow leaked, it wouldn’t let people impersonate our internet domain.

For the private CA I simply used the crappy CA.pl script that comes with OpenSSL or did at the time. There are much better ways to do it, especially at any kind of scale, but CA.pl sufficed dealing with a few development machines.

=> More informations about this toot | More toots from solrize@lemmy.world

Written by 2xsaiko on 2024-12-20 at 20:55

This seems super overcomplicated. What I would do is put all the subdomains on the public DNS, let HTTP(S) through the firewall for the respective hosts, deny everything from outside of your local network on the http server that isn’t under the DNS challenge path and then run the DNS challenge as you would for a public site.

Then you can get certs, everyone outside trying to access will get 403, and inside the network you can access as normal.

Of course you’ll have to trust your http server’s ACL for that, but I’m just going to assume servers like nginx (which I use) have a reliable implementation.

=> More informations about this toot | More toots from 2xsaiko@discuss.tchncs.de

Written by Tinkerer@lemmy.ca on 2024-12-20 at 22:38

I’m running cloudflare and NPM, I did a DNS challenge to get my wildcard cert, then put in access lists so for my internal hosts only private IP address subnet can access them. I have my OPNsense firewall also redirect any of those internal hosts request back to my NPM host. I have everything internal with a valid https cert.

=> More informations about this toot | More toots from Tinkerer@lemmy.ca

Written by ComradeMiao@lemmy.dbzer0.com on 2024-12-20 at 23:26

Sounds like the same thing except for access list. I was unsuccessful those working oreviously

=> More informations about this toot | More toots from ComradeMiao@lemmy.dbzer0.com

Written by Tinkerer@lemmy.ca on 2024-12-21 at 00:11

Ah yeah I’m trying to move to podman for NPM and the access lists don’t work for some reason. On docker though it works very well

=> More informations about this toot | More toots from Tinkerer@lemmy.ca

Written by emax_gomax@lemmy.world on 2024-12-21 at 00:08

I would recommend just using caddy. It removes the complicated part of ssl management. For a local network it’ll setup a local self signed certificate authority and you can just install those certificates to any devices on your LAN that you want to have access. For a public setup it’ll use letsencrypt. You will still need to setup dns if you want wildcard routing.

=> More informations about this toot | More toots from emax_gomax@lemmy.world

Written by vividspecter@lemm.ee on 2024-12-21 at 09:09

If you want to use DNS challenge with Caddy it’s kind of annoying though (need to download/compile a separate version with the DNS plugin you need).

Which is probably a good idea if you don’t plan to expose the services publicly but want a real certificate to avoid self-signed cert warnings.

=> More informations about this toot | More toots from vividspecter@lemm.ee

Written by emax_gomax@lemmy.world on 2024-12-21 at 10:32

I’ve never had this issue but I run basically everything through docker and presumably it bundles this by default.

=> More informations about this toot | More toots from emax_gomax@lemmy.world

Proxy Information
Original URL
gemini://mastogem.picasoft.net/thread/113686841575202316
Status Code
Success (20)
Meta
text/gemini
Capsule Response Time
351.637051 milliseconds
Gemini-to-HTML Time
3.995942 milliseconds

This content has been proxied by September (3851b).