I love my homelab, and the more I tune things the more satisfaction I have. I tolerated the “Your connection is not private” for my self-signed SSL certs on my services for way too long.

I just setup NGINX Proxy Manager as a LXC on my Proxmox Server and pointed a subdomain I own to the server. Now I have custom domains for each service along with valid SSL Certificates. It’s all local without exposing anything to the outside world. It’s very satisfying. I tried explaining what I was doing to my GF but she could care less ¯\_(ツ)_/¯

Followed this video from Wolfgang’s Channel YouTube (great channel btw), the first minute does a better job explaining the setup. I always thought I would have to setup a local CA which is more work than I was interested in, but this approach was much simpler (and free!).

  • Tamazin_@alien.topB
    link
    fedilink
    English
    arrow-up
    2
    ·
    1 year ago

    One day i will take my lazy ass and fix this too. Not today though, but some day!

  • light2089@alien.topB
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    Congrats! Good job!

    I have had local SSL and in house DNS servers for many years now, and I feel you because my wife couldn’t care less.

    She does find it annoying and confusing when we are traveling and the bedroom light doesn’t switch off by itself 🤷 - our home is fully automated as well

  • Signal_Inside3436@alien.topB
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    I did this too, strange how satisfying seeing those lock symbols and custom domains are! Also use NPM, love the ease of use!

  • hadrabap@alien.topB
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    Welcome to the TLS family! I personally run my own CA, but the end result is the same. 🙂 Welcome and enjoy! 😛

      • hadrabap@alien.topB
        link
        fedilink
        English
        arrow-up
        1
        ·
        1 year ago

        No, it is not so difficult. But you need a bit of planning.

        First of all, you need a way to distribute your ROOT certificate to your clients. That’s more a question of automation.

        Second, you need to prepare the topology with certain rules. Things like dedicated certificates for people (identity), services (server certificates for dedicated subdomains), machine clients (for mTLS and zero-trust), infrastructure stuff like BMC/IPMI, UPS, routers…

        Basically, the rules are:

        1. Self signed ROOT certificate
        2. Intermediate CA (signing certificate)
        3. (Optional) signing certificate

        In case of multiple (dedicated) certificates, you want to make the split at the intermediate/signing level. The chain will help you enforce the rules.

        You should decide which algorithm to use (RSA vs. ECC).

        Finally, you need a piece of software that will create and sign the certificates for you. This software must authenticate you and check your request if it comforms to the rules above.

        I’m using multiple instances of step-ca. Most of the famous certificate management solutions (the service side asking your authority for a certificate, including rekeying/renewal) support it. Which is good. Standard protocols are always better than in-house solutions workarounds.

        To start building your CA:

        1. Learn about PKI (good start is RFC-5280
        2. Learn OpenSSL, how to deal with openssl.conf, sections, ASN.1
        3. If you need additional information on the certificate, register for your own Private Enterprise Number. Do not abuse existing attributes!
        4. Prepare HTTP (plain HTTP, no TLS) server to serve your intermediate/signing certificates (for AIA protocol) and CRL (for validation)
        5. Put your intermediate/signing key/certificate to step-ca as a ROOT and you’re good to go.

        You can also incorporate HSM if you have one. Just configure its pkcs11 module in the OpenSSL and in the step-ca.

        As it is quite a complex topic, feel free to drop additional questions. 👍

        • steezy280@alien.topB
          link
          fedilink
          English
          arrow-up
          1
          ·
          1 year ago

          Thank you, I’m actually currently building my CA. Planning for an offline root. Question, what free or not enterprise prices software options are there? I have entrust at work, looking for something I can use at home.

          • EODdoUbleU@alien.topB
            link
            fedilink
            English
            arrow-up
            1
            ·
            1 year ago

            For my Root I use OpenSSL with the pkcs11 module to keep the keys on a Yubikey, then I use Step CA as an intermediate/issuing.

            • Simon-RedditAccount@alien.topB
              link
              fedilink
              English
              arrow-up
              1
              ·
              1 year ago

              Planning to use Yubikey for one of my subCAs. Do you know a good writeup on OpenSSL+Yubikeys?

              Also, which Yubikey slot do you use for storing the cert/pkey?

              • EODdoUbleU@alien.topB
                link
                fedilink
                English
                arrow-up
                1
                ·
                1 year ago

                How are you handling RootCA secrets? Right now, I’m using a (couple) USB drive with a two Luks partitions, one for CA key backup and Yubikey management and PUK keys, then one that only contains the PIN which is fetched by OpenSSL using -passin file:xxx.

                I’ve been a little concerned about being able to properly back all that up, so I was thinking about using KeepassXC and the CLI tool to replace the partitions.

        • LogosLine@alien.topB
          link
          fedilink
          English
          arrow-up
          1
          ·
          1 year ago

          “not so difficult”

          Well thanks, I feel like a complete moron, because that’s a level of complexity way beyond what I could do/manage.

          • lestrenched@alien.topB
            link
            fedilink
            English
            arrow-up
            1
            ·
            1 year ago

            It’s a bunch of terms I don’t know about, but I don’t think it’s very hard after you learn a bit more and understand the reasoning behind the steps.

            I’d personally not want to host a personal CA without HA though, so I suppose I’m sticking with EFF for this one

        • EODdoUbleU@alien.topB
          link
          fedilink
          English
          arrow-up
          1
          ·
          1 year ago

          Prepare HTTP (plain HTTP, no TLS) server to serve your intermediate/signing certificates (for AIA protocol) and CRL (for validation)

          Or create a repository on Github, point ca.yourdomain.com to Github Pages and publish there. Doing this solves the PKI chicken-and-egg problem for a homelab and doesn’t tie up any resources to serve them.

  • Developer_Akash@alien.topB
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    Recently I put nginx in front of all the services in my homelab so I can have subdomains associated with each server but did not bother to setup ssl because it’s all in my local network.

    Guess what I’ll be doing this weekend now 😬

  • PossibleDrive6747@alien.topB
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    Sometimes my wife will ask me to explain technology things in great detail when she’s having trouble falling asleep.

    • notdoreen@alien.topB
      link
      fedilink
      English
      arrow-up
      1
      ·
      1 year ago

      If anyone wants to explain Nginx, reverse proxies and Cloudflare tunnels I’m here for it.

      • hodak2@alien.topB
        link
        fedilink
        English
        arrow-up
        1
        ·
        1 year ago

        Think of a reverse proxy as a middle man.

        Internet comes in to your internet connection and immediately asks “cool story bro…where do I find XYZ service?”

        A reverse proxy works by your modem or router saying “ffs bro I have no idea, all I know is you need to go talk to Apache”

        So the internet traffic walks over and says “the modem told me to talk to you about getting to XYZ service?”

        Apache goes ahead and responds “dude I got you…that service. It lives over here at 192.168.0.12:1234. In fact let me go get it for you so that you don’t have to go anywhere else. Here’s what you are looking for, you can just go through me and I’ll get you the things you want.”

        So the internet traffic continuously goes through Apache, Nginx proxy, traefik etc to get the things it wants and Apache Nginx etc just work as a middle man.

        I have a lot of not very good YouTube videos explaining how to reverse proxy from Apache to a bunch of services…unifi proxmox esxi and others. As well as videos explaining how to get star certs setup and things like that.

        But in a nutshell. That’s what’s going on.

        • agentdickgill@alien.topB
          link
          fedilink
          English
          arrow-up
          1
          ·
          1 year ago

          I’m gonna get yelled at but… why? What does this do for the network? Does it make it faster? Safer? Just feels like another thing that could break and then the wife breaks me with “it’s not working.”

    • ElaborateCantaloupe@alien.topB
      link
      fedilink
      English
      arrow-up
      1
      ·
      1 year ago

      My husband is the same way.

      Him: what are you doing?

      Me: Do you really want me to explain?

      Him: yes.

      Me: I’m moving data from …

      Him: never mind. I don’t care.

      • AuthenticImposter@alien.topB
        link
        fedilink
        English
        arrow-up
        1
        ·
        1 year ago

        I’m at the point of being exasperated whenever she asks, since I know three words into my response she’ll lose focus

        Hosting a Plex server is the one thing my lab does that shows value to her, as long as that’s up no complaints

  • bionor@alien.topB
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    I have the same! Really cool :) Only trouble I have is getting clients to connect properly to some of the services through a forwarded port. Think they only use the port for initial connection and then something fails with connection tracking

    • -my_reddit_username-@alien.topOPB
      link
      fedilink
      English
      arrow-up
      1
      ·
      1 year ago

      Make sure you enable websockets, I had to do that for a few services like HomeAssistant. Also some things like Proxmox required custom NGINX config for shell consoles to work

      proxy_buffers 8 16k;
      proxy_buffer_size 32k;
      
      # Make sure not to redirect traffic to a port 4443
      port_in_redirect off;
      
      location / {
          proxy_pass          $forward_scheme://$server:$port;
          proxy_set_header X-Real-IP $remote_addr;
          proxy_set_header X-Forwarded-Proto $scheme;
          proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
          proxy_set_header Upgrade $http_upgrade;
          proxy_set_header Connection "upgrade";
          proxy_http_version 1.1;
      }
      
  • broxamson@alien.topB
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    Hey babe love how our http communications are secure locally now. Blow job and a back rub?

  • jaredearle@alien.topB
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    I use HAProxy on pfSense with wildcard LetsEncrypt certs and a firewall rule only to allow connections from the WAN IP Address.

    It’s really easy and requires no certificates on the target servers.

    • CodeTheStars@alien.topB
      link
      fedilink
      English
      arrow-up
      1
      ·
      1 year ago

      My setups are similar. HAProxy as an SSL terminator for all domains. Unencrypted proxy to the services after that. Nginx can use v2 proxy which is nice.

      I have a bunch of scripts that collect all the domains and then generate / renew the certs with acme.sh . HAProxy can reload certs with no downtime as well.

  • praetorthesysadmin@alien.topB
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    Wolfgang’s Channel is pretty good, i also recommend it.

    And congrats OP, i know lots of big enterprises who still use their own vCenters with self signed certs (and other internal apps as well) and it’s a real pain in the ass to type hacks just to bypass HSTS everytime it’s necessary to access them. Talking about billion dollars companies, yeah.

  • B4Djinn@alien.topB
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    Wolfgang’s channel is indeed a great one! You are doing great, keep it up!