Elvith Ma'for

Former Reddfugee, found a new home on feddit.de. Server errors made me switch to discuss.tchncs.de. Now finally @ home on feddit.org.

Likes music, tech, programming, board games and video games. Oh… and coffee, lots of coffee!

I � Unicode!

  • 0 Posts
  • 43 Comments
Joined 2 years ago
cake
Cake day: June 21st, 2024

help-circle
  • My current setup for this:

    I own a domain - say homelab.com - and use it exclusively in my internal network.

    The public DNS records do only resolve to 127.0.0.1 (as my domain holster doesn’t want me to have no A record).

    In my home network I have a pihole running that resolves this domain and it’s subdomains locally (say pihole.homelab.com, proxmox.homelab.com and so on).

    For HTTPs: As this server is not publicly reachable, I use the DNS API of my domain host to get a let’s encrypt certificate with the DNS-01 challenge. That way, the internal systems do not need to be exposed to the internet.

    Edit: Caddy can do DNS-01, but you usually have to compile it yourself to include the plugin for your provider. To circumvent that, I’m just using plain old certbot and told Caddy to use the certs that are already on the machine


  • What about this? This basically forbids you to fork the software if you want to - e.g. because they’re maybe going closed source in a few years?

    You may not use the Software, in whole or in part, to create, distribute, or operate any product, system, or service whose primary function directly overlaps with or replicates the core business purpose of the Product, unless explicitly authorized in writing by fabricators.









  • There are some projects, that do not offer latest or a general tag to pin a major version. So you might need to account for that.

    Also since a few years ago you can specify pull_policy: always in the docker-compose.yaml to always pull the images on start. That should at least auto update the containers on a server reboot after OS/Kernel updates.



  • Other than Friendica, Mastodon, Matrix, PeerTube and PieFed, what’s worth running

    Maybe Nextcloud (not only for storage, but also calendar, video conferences, office, when combined with Collabora,…)? Also Immich (basically Google Photos) comes to mind. Your own instance of SearXNG.

    Any kind of ToDo-list, Kanban board, …?

    A ticketing system?

    A Wiki to host your documentation? Note, that you may want to access it if the server fails, so…

    Some stack of components around Grafana or such to visualize some data? Since you mentioned Hetzner, I’m guessing you’re from Germany. You could build a small container, ingest the gas prices that the gas station are required to publish and build a dashboard for the gas prices in your area? (Hint, here’s an API licensed under Creative Commons - https://creativecommons.tankerkoenig.de/ )


  • My journey:

    Had some form of Linux for a long time. Either in a VM (Oracle Virtual Box, then switched to S HyperV for compatibility reasons as I had Windows Pro anyways) or sometimes as dual boot.

    Then came WSL which eased some things and complicated others. What this makes really easy is to start and play around with docker containers on your PC.

    Then I experimented with Linux in a VM and put docker and other software there to practice.

    Up until here, there were no costs involved (besides having Windows Pro, but depending on where you get your windows key, there’s not a real difference between pro and home anyways…).

    After that I got my own VPS. As much as I don’t like AWS, Google Cloud (GCP), Azure and such, they usually offer a very small VPS for free and these can be a good point to start. If you want to really go and host things, it can be beneficial to look for a hoster that isn’t one of the big 3 cloud providers and pay for a VPS there.

    For hosting at home: You could start with a raspberry pi, but looking at current prices, you usually get more flexibility and bang for the buck by buying a refurbished mini PC or repurposing an old notebook/PC. You can just put Yunohost or Proxmox on it and get going.


  • And don’t listen to the promises of big companies with billion-funds, they cook with water like the rest of us.

    Oh, yeah, I remember when one of our super important core systems was migrated to SaaS. My system was interfacing with it, so I got notified about the migration to make a plan. I basically told them: “We’re using $API to connect to your system. Tell me the new hostnames and IP ranges and ports and I will configure the firewall on our end. Also, our connector for your migrated system will be deployed in $IP-range so please allow these inbound connections in your firewall.”

    Half a year later I got a message: “Yeah, we just found out, that $SaaS-provider never configured the firewall after our tickets and everything is reachable from the public internet. We’re forcing them to lock down the system now. Can you please tell us again from where you connect to us?”


  • If you put any data anywhere, assume it will be contained in a breach in the future. Blue teaming is hard. You have to be perfect every time. Red teaming is easy. You just have to wait till the blue team makes a simple mistake…

    Mails sent to a company? Their or your mail account will be breached one day.

    Account details on a webpage? Their user database will be leaked.

    Your cloud drive, ect.

    Even your data on your NAS at home or on your PC could get accessed in one way or another, you’re just a zero day and an unfortunate click away from disaster.

    On the upside, as long as you do not have a target on your back, patch your stuff in a timely manner and keep some hygiene in configs, secops … You should be fine, as most automated attacks aren’t that high level and target the low hanging fruits. But that doesn’t make you completely safe.



  • I get the idea, and in general I love it - especially since they eliminate phishing in theory. BUT making my device my “password” now shifts the single point of failure from me forgetting my password to me protecting my devices from any kind of error/damage/data loss/… Collecting all passkeys in your Google Account is probably also not the best idea, considering how little chance you have to get your account back if it ever gets locked by a random event you may or may not have participated in.

    Having them device independent (e.g. in a password safe) is nice, though. But then, if I use my password safe right, I should already be somewhat protected from phishing, as my auto fill won’t trigger on a random phishing site.


  • Mine didn’t want to migrate and I had to build them a new PC with Win11 (their old one was barely able to run win 10 and had already some hardware problems, so a new one was on my bucket list for a while) - but… yeah the most time was spent tracking down all these passwords and accounts they were constantly using without knowing which email address and which password was used for the account…


  • No, that’s just another hypothetical app that you’re using a reverse proxy for. I just included it to show how you can also set settings for a single subdomain/reverse proxy entry that isn’t used globally on all domains that get served. I used a hypothetical REST API that needs a CORS Header that other apps don’t need (or maybe serve themselves).

    admin off disables Caddy’s admin interface (which shouldn’t be public and if you’re using config files this usually isn’t needed. So just a bit of gardening)

    servers sets some general server options.

    and then I just inserted several blocks that each define a reverse proxy to a different app / backend to show that you can just dump them all in a single Caddyfile. And the last example to show that you can set specific settings only for a specific subdomain instead of globally. As I set headers mostly used by REST APIs, I just called that api.example.com instead of app3.example.com.


  • If you like, I can send you an example of the Caddyfiles, that I’m using (I used the import directive to split every service into its own Caddyfiles, you could just copy and paste everything in the same file). It will take a few hours until I get home, though.

    But basically you can just put every subdomain and it’s target in a separate block and the add some things globally (e.g. passing the original IP, switching off the admin API of Caddy,…)

    Something like this should work:

    
    admin off 
    
    servers {
    		client_ip_headers X-Forwarded-For X-Real-IP
    }
    
    app.example.com {
        reverse_proxy 127.0.0.1:8080
    }
    
    app2.example.com {
        reverse_proxy 127.0.0.1:8081
    }
    
    api.example.com {
        reverse_proxy 127.0.0.1:8082
        header {
            Access-Control-Allow-Methods "GET, OPTIONS"
            Access-Control-Allow-Origin "*"
        }
    }