this post was submitted on 03 Oct 2023
19 points (91.3% liked)

Selfhosted

40183 readers
688 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

  1. Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don't duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 1 year ago
MODERATORS
19
submitted 1 year ago* (last edited 1 year ago) by Fjor@lemm.ee to c/selfhosted@lemmy.world
 

What's the easiest way to get https while still using my given tailnet as domain for accessing stuff? The tailscale documentation suggest to download certs to the server and point each service to those certs, but that seems like more work than it should..?

Is a reverse proxy the best option? Or what do people who use tailscale as vpn for their devices use?

I need to point certain services out and accessible to family members, will do this through funnel feature in tailscale, but want https set up before pointing anything out.

Appriciate any suggestions ✨

you are viewing a single comment's thread
view the rest of the comments
[–] Fjor@lemm.ee 2 points 1 year ago (1 children)

Yeah I also don’t want my folks to have to “ignore” the warnings either. So will defo have the https set up before giving them access.

[–] Snowplow8861@lemmus.org 1 points 1 year ago (1 children)

Not possible without a domain, even just "something.xyz".

The way it works is this:

  • Your operating system has some trusted certificate root authorities root certificates installed from installation of the OS. All OS have this, Linux, Windows, iOS, macos, Android, BSD.
  • when your browser goes to a Web url and it is a https encrypted site it reads the certificate.
  • the certificate has a certificate subject name on it. It also may optionally have some alternative names.
  • the browser then checks if the subject name matches the Web url address. If it does, that's check one.
  • next it checks the certificate validity: it looks at the certificate chain of trust to see if it was signed by a intermediary and then the intermediary was signed by a root certificate authority. Then it can check if any certificate has been revoked along the way.
  • if that's all good, then you'll open without a single warning, and you browse Web sites all day long without any issue.

Now, to get that experience you need to meet those conditions. The machine trying to browse to your website needs to trust the certificate that's presented. So you have a few ways as I previously described.

Note there's no reverse proxy here. But it's also not a toggle on a Web server.

So you don't need a reverse proxy. Reverse proxies allow some cool things but here's two things they solve that you may need solving:

  • when you only own one public IP but you have two Web servers (both listening to 443/80), you need something that looks at incoming requests and identifies based on the http request from the client connecting in 'oh you're after website a' and 'you're after website b".
  • when you have two Web servers running on a single server, you have to have each Web server listening on different ports so you might choose 444/81 for the second Web server. You don't want to offer those non standard ports to public so instead you route traffic via a reverse proxy inbound and it listens for both Web servers on 80/443 and translates it back to the server.

But in this case you don't really need to if you have lots of ips since you're not offering publicly you're offering over tailscale and both Web servers can be accessed directly.

[–] Fjor@lemm.ee 1 points 1 year ago

Thanks for the detailed answer, I was able to solve my problem just with what /u/mara said suggested above :)