As the title says ive started running webmin. And i wanna know if its safe for me to reverse proxy (with 2fa) or should i just use tailscale or ssh to access it.

  • fancy_pants@reddthat.com
    link
    fedilink
    English
    arrow-up
    1
    ·
    55 minutes ago

    I had it exposed for maybe ten years (mostly so that users could manage their accounts), nothing bass happened, but i have shut down that server about a year before the ai security disaster, so ymmv

  • LewdLemon@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    8
    arrow-down
    1
    ·
    13 hours ago

    Why would you want to expose it to the web in the first place? In a homelab scenario, you’re the only one who needs access, so putting it behind a VPN comes at zero convenience or monetary cost.

    • ITGuyLevi@programming.dev
      link
      fedilink
      English
      arrow-up
      2
      arrow-down
      1
      ·
      11 hours ago

      My homelab stuff I like to be able to access from places that take all my free time (like work), making things accessible is a bit of a requirement for me.

      • LewdLemon@sh.itjust.works
        link
        fedilink
        English
        arrow-up
        4
        ·
        edit-2
        9 hours ago

        That’s fair, but I still can’t see how a VPN connection makes your stuff less accessible - at least to you.

        • ITGuyLevi@programming.dev
          link
          fedilink
          English
          arrow-up
          1
          arrow-down
          1
          ·
          7 hours ago

          Just by making it so I can’t access from a system I don’t control. Like say I need to retrieve a document from my house, but I’m in a SCIF, or a waiting room, or anywhere else I wouldn’t have my personal device, it’s super useful to just connect to something like Nextcloud and pull it down.

          • LewdLemon@sh.itjust.works
            link
            fedilink
            English
            arrow-up
            3
            ·
            5 hours ago

            I didn’t say you should put your Nextcloud instance behind a VPN. Mine is public too.

            I’m saying you should put your administrative access behind a VPN. SSH, reverse proxy admin panel, you name it. You need not do administrative stuff from work.

            • ITGuyLevi@programming.dev
              link
              fedilink
              English
              arrow-up
              1
              arrow-down
              1
              ·
              edit-2
              4 hours ago

              Oh yeah, I 100% agree with that, honestly two VPNs are better given you wouldn’t want your normal VPN to terminate into your management vlan (nor should you want your management vlan to have access to the internet). I thought we were just discussing normal homelab stuff, all administrative stuff should really be oob.

        • ITGuyLevi@programming.dev
          link
          fedilink
          English
          arrow-up
          1
          ·
          7 hours ago

          Hmm… Where I work setting up a VPN on my work machine would not only break my workflow, it would probably cost me my job. Plus I’m not a big fan of giving computers I don’t control access to the internals of my network. Reverse proxies were invented for a reason, no reason not to use one.

  • Adrian Lee@lemmy.world
    link
    fedilink
    English
    arrow-up
    9
    ·
    17 hours ago

    I would never do something like that. It’s actually a sad story: I had a server that had to be exposed to the public, and not long ago, it was compromised by the latest PHP vulnerability. Fortunately, the damage wasn’t too severe. Since then, my policy has been to only expose services to the public that must be accessible to strangers, and I never expose administrative access points to the public internet. SSH access is restricted to key-based authentication, and the admin panel is accessible only from the internal network or via VPN. Two-factor authentication protects against password guessing, but it cannot prevent vulnerabilities that can be exploited before the login process even begins.

    • pcouy@lemmy.pierre-couy.fr
      link
      fedilink
      English
      arrow-up
      3
      ·
      12 hours ago

      If you actually got pwned by the latest PHP vuln, you need to talk to the security researchers who are running all these honeypots and only managed to capture unsuccessful exploitation attempts.

      An actual working exploit in the wild is real news

  • corsicanguppy@lemmy.ca
    link
    fedilink
    English
    arrow-up
    3
    ·
    14 hours ago

    Jamie is a cool guy. He’s also super smart. But he’s not infallible, and so I must secure this and only run it from the internal admin network. Because that’s best-practice.

  • slazer2au@lemmy.world
    link
    fedilink
    English
    arrow-up
    40
    arrow-down
    1
    ·
    1 day ago

    It is almost always a bad idea to place a management interface on the internet. No level of strong password and multifactor auth will protect against an unauthenticated RCE which every language will get, including Perl.
    Absolutely stick it behind tailscale.

    • Lka1988@lemmy.dbzer0.com
      link
      fedilink
      English
      arrow-up
      8
      ·
      edit-2
      23 hours ago

      Yes, and it’s very useful. Cockpit, too.

      I would never expose either of them to the internet.

      • moonpiedumplings@programming.dev
        link
        fedilink
        English
        arrow-up
        5
        ·
        edit-2
        22 hours ago

        I use cockpit, but via the client. They have a flatpak client that gives you cockpit’s features, connects over ssh (and reuses your ssh config), and doesn’t require anything to be installed on the host/server you are managing (besides ssh ofc).

        • moonpiedumplings@programming.dev
          link
          fedilink
          English
          arrow-up
          3
          ·
          22 hours ago

          ssh is probably fine for 99% of things. I use ssh exclusively mostly

          The features I load cockpit up for is:

          • easier viewing of systemd/journalctl logs. You can click on services and see logs, search them, and so on.
          • Partitioning a disk. Nothing too crazy, but I can format a disk, wipe them, via the GUI
          • Networking configuration. If you are using networkmanager, cockpit will test the changes, attempt to connect, and then revert the changes if the connection fails (in like 15-30 seconds). This is legitimately insanely useful, I can change the ip address or something, connect via cockpit again, and only have the change stick if it’s actually good. (See also, netplan try from the netplan configuration framework.)

          Cockpit also offers a GUI for managing virtual machines (via libvirt) or podman contaniers. So someone else might want that, although I don’t really use that. (virtual machines can be managed remotely via virt-manager over ssh by connecting to qemu+ssh://user@remote-host/system, I manage podman via the terminal).

    • epyon22@sh.itjust.works
      link
      fedilink
      English
      arrow-up
      5
      ·
      23 hours ago

      Tailscale and wire guard, it’s underlying vpn application, have a big stake in being secure. Webmin not as much more focused on providing features and being secure. There is much more surface areas for a web application over a simple vpn service. And self hosted you probably aren’t implementing intrusion monitoring as serious as tailscale web services would.

    • Creat@discuss.tchncs.de
      link
      fedilink
      English
      arrow-up
      6
      arrow-down
      2
      ·
      edit-2
      23 hours ago

      Yes, it inherently is. Authentication/encryption happens as the very first thing at the network level, before anything resembling a service becomes accessible. This is fundamentally different than for example a web interface, which needs to present “the Web page” to allow the user to log in, which might involve multiple individual parts that can already have a 0-day.

      As a more direct comparison: look into historic vulnerabilities between ipsec VPN and SSL VPN. The former is the older technology, the second is more “web like”. The number of serious CVEs for the latter over just some manufacturers (Cisco, fortinet, …) in one year probably beats the number for ipsec in is entire life time.

      Going back to Tailscale (or netbird, …): it is one very secure layer which then secures everything. You can have 1 service or 20, same security. If you expose individual services, c you also expose every possible vulnerability of all of them, so all 20 services if that’s what you run.

      • nibbler@discuss.tchncs.de
        link
        fedilink
        English
        arrow-up
        1
        ·
        12 hours ago

        I disagree.

        Yes, it inherently is. Authentication/encryption happens as the very first thing at the network level, before anything resembling a service becomes accessible.

        VPN service is… a service. Of course it is. Tailscale has been around for a few years, Apache was there since shortly after the dinosaurs roamed earth. It survived a bunch more battles than any VPN. The only authentication happening at the network level would be 802.1x or such, but this connects to radius (clearly a classic service) and other components. Auth in VPNs is just the same.

        So no, a properly secured reverse proxy is all the same. I recommend mtls for ease of use and brute-force resistance. Chose a proper private key :p

      • crandall@lemmy.today
        link
        fedilink
        English
        arrow-up
        1
        ·
        22 hours ago

        Makes sense. Its unfortunate though that it presents a hurdle for end users. My users need to hit a webpage and acesss stuff, asking them to connect to a VPN client is too much.

        • Creat@discuss.tchncs.de
          link
          fedilink
          English
          arrow-up
          5
          ·
          22 hours ago

          It’s all a matter of what you consider reasonable risk. I also run some specific services exposed where it makes sense (they are designed to do this, think things like home assistant or next cloud or jellyfin), but would never put anything that is used to do server administration public facing (Webmin, Termix, proxmox, that sort of thing). If the purpose of the tool is to perform or allow elevated actions, I run it behind a VPN (yes for me that includes ssh).

          There’s also a difference between being randomly port scanned and/or probed, or being actively and personally targeted for some reason. If the second is ever a reasonable threat, that changes what is acceptable dramatically as well.

    • Drunk & Root@sh.itjust.worksOP
      link
      fedilink
      English
      arrow-up
      2
      ·
      24 hours ago

      Ive been looking at headscale dont know if its better as im not well versed in vpn or tailscale or any of it but it seems better

    • frongt@lemmy.zip
      link
      fedilink
      English
      arrow-up
      3
      arrow-down
      1
      ·
      1 day ago

      Not necessarily. But it’s one service, compared to multiple, which could each have their own vulnerabilities. It’s about reduction of risk.