• Oha@lemmy.pobierz.net
    link
    fedilink
    arrow-up
    3
    ·
    il y a 2 heures

    Every Service is in its own VM and everything thats publicly accessible sits in its own network sepperated from everything else. I do daily backups in case anything goes wrong

  • Decronym@lemmy.decronym.xyzB
    link
    fedilink
    English
    arrow-up
    1
    ·
    edit-2
    il y a 19 minutes

    Acronyms, initialisms, abbreviations, contractions, and other phrases which expand to something larger, that I’ve seen in this thread:

    Fewer Letters More Letters
    Git Popular version control system, primarily for code
    LXC Linux Containers
    SSH Secure Shell for remote terminal access
    VPN Virtual Private Network
    VPS Virtual Private Server (opposed to shared hosting)
    nginx Popular HTTP server

    [Thread #105 for this comm, first seen 16th Sep 2026, 06:30] [FAQ] [Full list] [Contact] [Source code]

  • littleomid@feddit.org
    link
    fedilink
    English
    arrow-up
    1
    ·
    edit-2
    il y a 2 heures

    There are a couple things that are public. Nothing that’s not containerized in an LXC. SSH is only available with VPN. I once locked myself out after not being at home as we had a blackout, I found no way in after two days and had to get there physically. I think I’m fine.

  • Arda@piefed.social
    link
    fedilink
    English
    arrow-up
    3
    ·
    il y a 3 heures

    Thats my post so yeah thats how secure it is right now, I have authelia infront of everything, besides some admin only thing which are only accessible over wireguard. I’d like to look into VLANS but have no hardware for it and it seems expensive

  • jrgd@lemmy.zip
    link
    fedilink
    English
    arrow-up
    13
    arrow-down
    5
    ·
    il y a 5 heures

    I have a few practices, technologies that I leverage across my systems, network for selfhosting.

    First, the principles I follow:

    • Least access — Limit exposure of ports, services to as limited an audience as possible.
    • Don’t put all your eggs in one basket — Spread your service deployments out across different machines, or at least different users on the same machine. Group relevant services together as seen fit, but don’t deploy everything in the same place.
    • Security through obscurity is bad — What I mean is make your process for deploying and maintaining applications easy to read and understand the context. Software versions, customizations, and other tweaks should be easy to find and understand.
    • Mind your secrets — Seriously, don’t engage in practices that may lead to exposed secrets. Keep files that may have them out of your git repos. Read your logs before pasting them or feeding them to another application. If it can be done, automate secret deployments where possible.
    • Understand your tech — Learning stuff in the context of LAN is perfectly fine and I encourage doing so. For anything that you plan to bring to any wider network though, please do the recommended reading about each component you are using. Security mistakes often come from glossing over something that wasn’t apparent, but was important. Yes, this will slow down your work to a crawl if you’re used to just pulling Docker images and deploying at-will. I still recommend to take the hit in speed in order to do things as right as possible the first time.

    Now, onto the actual technologies and practices I use:

    First off, as hinted above, I make heavy use of containerized applications. OCI (commonly referred to as Docker) containers are a convenient way for developers to package their applications, but also offer some affordances in security if you leverage the tools well. I personally use Podman as my tool of choice for many reasons, but one of them being the relatively sane rootless setup that is ready to use out of the box. This means that can be started up at user-level (without root permissions and with user-level restrictions), which is great in case of an exploit to escape the sandbox occurs. Combine this with pairing relevant applications together on different users, and an actual semblance of a security model starts to form in mitigating the potential disaster from a rogue container. If you use multiple users on a system, make sure they are isolated users who should not be able to even read another user’s files; don’t give users free sudoers access. I also utilize multiple different machines for different processes, which works as well.

    Secondly, I utilize Quadlets, a way to write podman container, pod, network definitions as SystemD units, and be able to hook them in with other SystemD units. I love this approach for many reasons, including having declarative definitions of most of my deployment stack. Certainly makes redeployments, migration, and restoration a breeze when tracked with git. More importantly for security, an easy-to-read set of config files makes managing selfhosting significantly more predictable and boring, which is how it should be. Any question I might have about how something is setup I can find within a minute every time. Less guessing, less searching, more informed decisions; which is crucial to making less mistakes that could have security implications. Practically speaking, there are more than just Quadlets: Docker compose, Kubernetes definitions, Helm charts, and others all exist with their various strengths and weaknesses. Pick what works for you.

    With actually exposing stuff to the internet (or at least a broader network), I do limit my machines’ reach where possible. I have the capability to, but do not directly port forward anything from my home router. I rent a small VPS with minimal latency to my location that I use as a forwarding proxy for public services. I have a wireguard tunnel on my home router to the VPS that I let access specific IP ranges that contain my static IP server IPs only, with firewall rules on the router to back the access grant in the tunnel config. From there, I forward traffic to the VPS’s public IP with FirewallD on the edge, or have traffic sit behind a reverse proxy on said VPS.

    With most traffic though (especially with services I don’t completely trust to leave exposed), I restrict who and what may gain access to said services. If the model works for you, Zero Trust Tunneling / Mesh Network solutions like Tailscale, Netbird, or Netmaker are of high recommendation. For many of these, they allow you to connect end-user devices and serving devices together over a dynamic Wireguard tunnel (or similar) to share services that normally wouldn’t be as suitable sitting on the open internet. I personally run a selfhosted instance of Headscale which also sits on the edge VPS, and acts as my Tailscale control server and sole traffic relay for connections that can’t be direct peer to peer. Most of my services sit behind the requirement of being in the virtual network, while some I configure dual-offering. I should note that using Tailscale and others that offer direct peer-to-peer will directly expose your devices’ public IPs to others in the network that can interact.

    Lastly, I can note that while there have been many efforts with various solutions to try and make selfhosting as mindlessly easy as possible, I don’t recommend running many of them for a very specific reason. Much like how I hate people using LLM chatbots in place of their own brains to try and solve problems, having some container management platform take the initial setup out of selfhosted applications and attempt to abstract away as much of finer details as possible can lead to a fast initial deployment, but certainly not a secure one long-term. I do believe there are many practices and details one should learn about their selfhosting setup (such as networking, firewalls, what each app depends on, how best to upgrade them, when to pin application versions, etc.). Having a platform take that away in the beginning will only lead to problems later down the line when those funny little details start to become more important. Only learning about those details when the problems start to occur becomes a much more monumental hurdle to cross than simply learning the details as you set things up for the first time.

    Final Notes

    This comment is quite large, even by my standards. Yet, I am sure I have missed something somewhere. I will be happy to reply to any specifics about either technology or practice if I missed anything.

    • ccryx [he/him]@discuss.tchncs.de
      link
      fedilink
      English
      arrow-up
      2
      ·
      il y a 22 minutes

      You say you run your containers rootless with systemd quadlets. Are you publishing the containerized apps’ ports to the host and reverse proxying your applications like that or have you somehow managed to attach your (presumably also containerized rootless reverse proxy) and your containers to the same network?

      The latter is what I’m struggling with, so currently all my applications are in their own network that the reverse proxy is also connected to. But from what I’ve gathered, that means the proxy and each application need to share a network namespace which apparently isn’t possible in rootless mode unless all applications share the same network namespace.

  • grue@lemmy.world
    link
    fedilink
    English
    arrow-up
    25
    ·
    edit-2
    il y a 7 heures

    My stuff is only accessible from my LAN (because I haven’t figured out how to set up a tunnel or reverse proxy yet).

  • Shimitar@downonthestreet.eu
    link
    fedilink
    English
    arrow-up
    1
    ·
    il y a 3 heures

    I don’t selfhost secure, is this a new service? I selfhost securo instead, great tool!

    Am I missing something here?

  • CameronDev@programming.dev
    link
    fedilink
    English
    arrow-up
    5
    ·
    il y a 8 heures

    User process makes sense, but login shell is probably limited value. If your service gets pwn’d the attacker will spin up a reverse shell, and that isn’t protected by the login shell. You ideally want to use selinux/apparmor to prevent execution, or containers to limit the available execution environment.

  • Lucy :3@feddit.org
    link
    fedilink
    English
    arrow-up
    4
    ·
    il y a 7 heures

    Everything runs through fully hardened/restricted systemd units, as separate user with minimal access rights for everything

    You’d need to escape the software, restrictions and get root to do anything meaningful, while avoiding detection