• 0 Posts
  • 5 Comments
Joined 3 years ago
cake
Cake day: June 15th, 2023

help-circle

  • lemmyvore@feddit.nltoSelfhosted@lemmy.world•Custom domains and Tailscale
    link
    fedilink
    English
    arrow-up
    10
    arrow-down
    1
    ·
    edit-2
    6 days ago

    Can I just buy a personal domain, and have all my services be coolname.com:####

    It’s actually better. If you get a domain and install a reverse proxy on the server (Nginx Proxy Manager is easy to use) it will help you get free SSL certificates and make subdomain “aliases” so you’ll be able to use https://service.coolname.com/ links. And they’ll have the little shield in browsers and everything.

    To get the SSL certificates you’ll need an SSL service with an API and access tokens. Most domain registrars are not this fancy unfortunately, but you can delegate your nameservers to a (free) service that can do that. DeSEC.io is a good choice.

    You only need this DNS provider to verify the ownership of coolname.com. You do NOT need to put any IP in there.

    for both local and Tailscale access? Is that as simple a process as I want it to be?

    The Tailscale access is a bit more involved. Here’s the general steps:

    • Get Tailscale running on the server with all the services and the reverse proxy. Tailscale will create a network interface with a 100.64.x.x IP address.
    • Have the reverse proxy listen on all server interfaces including that 100.64 IP. Generally this should happen automatically. You should be able to see the reverse proxy admin page at http://100.64.x.x:8081 (or whatever the admin port is) as well as at http://[lan ip of the server]:8081.
    • In order to reach the reverse proxy over the LAN when you type service.coolname.com you will need to tell your LAN DNS server to resolve *.coolname.com to the LAN IP of your server.
    • Next you need to install a small DNS server but this one has to listen only on the Tailscale IP. Dnsmasq is a tiny server you can use for this. You want to configure it to resolve *.coolname.com to the Tailscale IP (100.64.x.x).
    • Then you go to the Tailscale admin page under the “DNS” section, click on “Add nameserver”, choose “Custom nameserver”, put in that Tailscale IP, check the “Restrict to domain” box and put “coolname.com” in there.

    After that, when you’re at home but NOT connected to Tailscale you will have coolname.com pointing at the reverse proxy via the LAN IP, and when you ARE connected to Tailscale (whether at home or not) it will be pointing to the Tailscale IP and go through the Tailscale VPN. So you’ll be able to use https://service.coolname.com/ all the time everywhere.


  • The downside to the .ts.net approach is that you need to install multiple TS clients if you want multiple subdomains. Typically one per service.

    There are projects like TSD-Proxy that help with that. It makes it so you only use one Docker container instead of having to make a sidecar container for every service.

    Then you also have to resolve *.tailnet.ts.net on your LAN’s DNS and that’s it. Unless you ever want to use something other than Tailscale, that is.


  • It doesn’t “circumvent firewalls”, it’s helping you. You’re asking it to forward a port from the container’s internal interface, through the bridge to the host, and expose it on all interfaces on the host.

    There’s a small set of people who apparently like to do that by hand(?) but the vast majority prefer Docker to write and maintain all those rules… especially since it also takes them up and down as needed when the container starts and stops, and also updates them with the correct IPs from its internal networks, which can be allocated semi-randomly.

    (Fair warning, gonna be ranting and shaking my fist for the rest of this comment.)

    I’ve never understood what the problem is, I mean why ask it to expose on all interfaces and then complain it’s actually reachable. And how do these people orchestrate their rules anyway? My bet is they write a manual rule opening port 3000 on one IP then leave it up and forget about it. Meanwhile the port is bleeding into all the host interfaces and ends up being exposed to tunnels and all kinds of things it shouldn’t be. But somehow that’s more secure?

    As a rule of thumb, people really shouldn’t be using network rules unless they’re prepared to describe ALL the device’s networking in every detail. The rules should always start with DENY across the board and open things up explicitly.

    Calling them “firewall” has done a great deal of damage and encouraged people to think it’s somehow secure and ok to have ALLOW on everything then slap DENY on one particular public IP and open some ports on it. If you don’t want to expose a service then the first step would be to not run that service, and the second is to only bind it to the interfaces it really needs to be on. Not opening it up to everything then slapping a “firewall” on top.


  • Just give up and let megacorps own all of our mail?

    But there’s no shortage of email providers who aren’t megacorps.

    As long as you own the domain and have an archive of all your mail past and present in your own storage, does it really matter whose server you currently use to send and receive the email?

    I see email as a carrier service, like the broadband line or the mobile service. They move the messages through, it doesn’t matter who they are (privacy withstanding, as with any carrier).