I’ve run a bunch of self-hosted services for quite some time now. Mostly, the usual media and file storage suspects.

Last week, I switched my network over to Firewalla boxes for routing, network monitoring, and mesh wifi. I went with them instead of a self-hosted solution because of the push alerts you get on mobile, plus setting up vLAN and vqLANs to separate family, IOT, work, and guest networks.

Slowly started moving over different devices. Within 5 minutes of putting the server on the network segment, started getting warning alerts that the server was contacting potential malware sites. In Japan, Africa, then Pakistan! The mobile app let me block this outbound traffic, but it kept changing. Russia, South America, Canada, etc. Definitely a botnet, and the volume of outbound data kept going up.

After a few minutes of this, I just went over and pulled the power plug. This server is mainly running media hosting stack via Docker on top of Ubuntu. Pretty stock, with no manually installed plugins or anything. I’m likely going to nuke the whole thing and manually install only the bits that I need.

Anyway, as a PSA, recommend everyone set up an active network monitoring system, ideally separate from the host itself. I thought I was pretty careful with my ports, regular virus scans, and firewall rules. Have learned my lesson.

No affiliation with any vendor. Just passing it forward.

  • joeschmoe@lemmy.world
    link
    fedilink
    English
    arrow-up
    2
    ·
    6 hours ago

    I use Netdata (w/o account, just put basic auth in front) on my dedicated root server.

    No firewall, btw. Anything that is allowed to be accessed is secured, everything else is only bound to localhost.

    • MuttMutt@lemmy.world
      link
      fedilink
      English
      arrow-up
      3
      ·
      1 day ago

      Even if there is you will likely find any converted router to be too underpowered to deal with it along with routing duties.

      • GameGod@lemmy.ca
        link
        fedilink
        English
        arrow-up
        4
        ·
        1 day ago

        I’m not running it on a converted router. 🫠 But writing some code to do this performantly sounds like a fun challenge!

  • MuttMutt@lemmy.world
    link
    fedilink
    English
    arrow-up
    16
    ·
    1 day ago

    The first upgrade on the self hosting journey IMHO is switching from a craptastic hardware router to a firewall. I’ve used OpnSense for a long time and switching was one of the best decisions I made.

    • filcuk@feddit.uk
      link
      fedilink
      English
      arrow-up
      3
      ·
      2 hours ago

      I’ve moved to opnsense from pfsense and it’s been great! Pfsense would sometimes just fail to boot and I’d have to jack in with serial and restore image. anecdotal, but i don’t need that kind of trouble with a firewall of all things.

    • hexagonwin@lemmy.today
      link
      fedilink
      English
      arrow-up
      1
      ·
      18 hours ago

      is it easy to do such in/outbound analytics in opnsense? i’ve never used opnsense. it would be nice if it works from a pretty webui since i’m not a network guru.

    • trilobite@lemmy.ml
      link
      fedilink
      English
      arrow-up
      5
      ·
      1 day ago

      I second this although i’m using pfsense with the ambition to one day move to oprnsense

    • fubarx@lemmy.worldOP
      link
      fedilink
      English
      arrow-up
      19
      ·
      2 days ago

      I’ll try to diagnose it once I’ve put it on its own isolated network. My guess is something embedded in one of the servers. Maybe a supply-chain attack let someone sneak something in. Firewalla marked each destination host as potential malware.

      • Fmstrat@lemmy.world
        link
        fedilink
        English
        arrow-up
        6
        ·
        19 hours ago

        Would love to follow this, but unfortunately on Lemmy I can’t subscribe to a post. Would you mind commenting here after diagnosis?

        • fubarx@lemmy.worldOP
          link
          fedilink
          English
          arrow-up
          4
          ·
          15 hours ago

          TBH, I was just going to zap the whole server and start all over. But the router lets me create an isolated segment. I’ll see if I can track down the guilty process.

  • Onsotumenh@discuss.tchncs.de
    link
    fedilink
    English
    arrow-up
    20
    ·
    1 day ago

    Do you have Flaresolvarr in your stack by chance?
    Had some weird CPU spikes on my NAS for a while and then noticed suspicious blocked DNS requests. After diagnostics I could single out my ARR stack and after some further research found out that my Flaresolvarr container was running a crypto miner and trying to download more malware.
    After eradicating the container and some extensive scans (which came out negative) everything was back to normal.

    • MouldyCat@feddit.uk
      link
      fedilink
      English
      arrow-up
      10
      ·
      1 day ago

      How do you think it happened? Had the docker file been tampered with or did the container become infected via a vulnerability or something?

      • Onsotumenh@discuss.tchncs.de
        link
        fedilink
        English
        arrow-up
        14
        ·
        1 day ago

        I suspect it was a vulnerability in the integrated browser that caught the malware. And I strongly suspect it explicitly targeted Flaresolvarr as the malware knew how to phone home through containerization. I’ve checked the repository and the issues/discussions and didn’t really find any complaints there.

    • fubarx@lemmy.worldOP
      link
      fedilink
      English
      arrow-up
      3
      ·
      1 day ago

      I don’t, but thank you for the idea that it might be a cryptominer. I just assumed it was a botnet, but a miner would also fit the profile.

      • Onsotumenh@discuss.tchncs.de
        link
        fedilink
        English
        arrow-up
        2
        ·
        13 hours ago

        I was quite a bit panicky till I saw that it was a miner and that Technitium had blocked all attempts of the malware downloader.

  • MalReynolds@piefed.social
    link
    fedilink
    English
    arrow-up
    27
    arrow-down
    1
    ·
    2 days ago

    It’s good advice, but not a selfhosted solution. Other than the usual suspects (crowdsec, fail2ban, pihole, Technitium, and their logs) anyone got any good solutions? In the current environment of LLM assisted cyberattacks it sure would be nice to step up our game.

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

      If you’re only using it for yourself then you should only be exposed via a VLAN accessible via VPN. Done.

    • fubarx@lemmy.worldOP
      link
      fedilink
      English
      arrow-up
      13
      ·
      2 days ago

      I did look into self-hosting alternatives like Portmaster, OPNSense, IPFire, NethSecurity, and Zabbix.

      I ultimately landed on a standalone device instead of a sidecar process. Main reason I posted the cautionary tale here was that it quickly let me discover malicious traffic on a selfhosted network that I was certain was safe and secure.

      • MalReynolds@piefed.social
        link
        fedilink
        English
        arrow-up
        8
        ·
        2 days ago

        Fair enough, there’s some value in an independent device (or more usefully, for more people, but more difficult, a VM or container) for this usecase. Minimal dependencies is important with the supply chain rampancy as an issue (even more than it always was). Thanks for raising it, no criticism implied, and it needs focus, just trying to raise the tide for all boats.

    • MonkderVierte@lemmy.zip
      link
      fedilink
      English
      arrow-up
      7
      ·
      edit-2
      2 days ago

      Defensive first and always have a second door. SSH only over VPN and no direct login to root, run services rootless and in a container and acl-restricted, stuff like that. Group them by usecase and how exposed they need to be. Exposed to the net means exposed to the enemy.

    • zarathustrad@lemmy.world
      link
      fedilink
      English
      arrow-up
      1
      ·
      1 day ago

      With only 2 users, I don’t expose anything to the net, use only tailscale (for now, netbird is on the horizon) to connect remotely for each device/service.

      Even so, my next big push is setting up more hardening, monitoring and general security stuff. (I already run a few proxmox hosts on mini PCs. One of those mini PCs is the physical router with VMs for Opnscence , monitoring, adblock. (VMs over containers for this host, I don’t want some container causing kernel issues on the rounter). As you know, this solution is no longer cheap (salvaged the 2015-20 era PCs from the corporate trash heap, and bought extra ram in '25. Good luck now lol).

      Unfortunately the weapon vs hostile LLMs is likely going to be smaller local read only LLMs to help monitor everything, recognize patterns and a kill switch to lock it all down until us slow humans can respond later. Of course that comes with other risks that have to be mitigated… Like knowing how to run local LLMs securely, offline, and locked down to only know and do very specific things.

      • MalReynolds@piefed.social
        link
        fedilink
        English
        arrow-up
        2
        ·
        24 hours ago

        Yeah, same. VMs are likely more hardenable (but rootless podman is likely better than docker, and perhaps VMs given SELinux) with what I have. If WireGuard gets broken we’re all fucked (for a brief while). And yeah, it’ll likely be Spy Vs Spy (LLM on LLM) as per Mad magazine for a while, but we’ll likely come out the other side with much more robust systems. The meantime will likely be rough.

          • MalReynolds@piefed.social
            link
            fedilink
            English
            arrow-up
            1
            ·
            22 hours ago

            Nice to be known, but buckle up buttercup, best surface is none, next couple of years all the technical debt is coming home to roost. TBF I like the new games better.

      • MalReynolds@piefed.social
        link
        fedilink
        English
        arrow-up
        4
        ·
        2 days ago

        Interesting, personally sort of waiting for a compelling (and cheap, sigh) piece of hardware for the router before implementing opnsense or equivalent. Still, seems like where it belongs, sure would be nice if there was a simple container solution instead though.

  • esc@piefed.social
    link
    fedilink
    English
    arrow-up
    13
    ·
    1 day ago

    Convenience of ready made services packaged and ready to go by anonymous people sometimes have downsides. 🙃

    • fubarx@lemmy.worldOP
      link
      fedilink
      English
      arrow-up
      12
      ·
      2 days ago

      I guess I don’t. The alerts came fast and heavy, each pointing at different sites in different countries, all tagged as ‘potential malware.’ I panicked and yanked the plug.

      I was really surprised my carefully put-together network was dialing out like this. I mainly thought any issue would be from external port-scanners, but I was wrong.

      Anyone running a self-hosted network may want to put in a live observation mechanism at the router level to make sure both incoming and outgoing traffic are monitored.

      • Archer@lemmy.world
        link
        fedilink
        English
        arrow-up
        8
        ·
        2 days ago

        I just don’t run anything open to the Internet except WireGuard over UDP. No one knows anything is even there unless they have access

  • Reannlegge@lemmy.ca
    link
    fedilink
    English
    arrow-up
    6
    arrow-down
    3
    ·
    1 day ago

    Tl;Dr: do not use port 22 for anything, unless you are running crowdsec. Passwordless login with SSH keys is a good idea but use a different port than 22 for the love of Glob. VLANS, and multiple APs. HA blocking IoT things from the WAN. Pihole, unbound, and DoT. Always look for more security.

    When I first started to try home labbing I had pihole and CUPS. Like an idiot I wanted to be able to ssh into my things away from home, in hopes of being able to use things when away from home, so I opened port 22 on my ISPs joke of a firewall. Before I really had an oppertunity to try ssh with DuckDNS my network became very slow, I did not think much about it but after a failed attempt with ssh and DuckDNS I decided to call my ISP and see what was up. That is when I found out if you want your ISP to update the software on the modem all you need to do is open port 22 and call and ask why your internet is slow. After realizing what I had done I went through all of my computers and things seeing what needed to be reformated and what not.

    This put me off of home labbing for several years and something happened in 2020, can’t remember what it could have possibly been? /s

    This time it was going to be different I was still using pihole and CUPS but I wanted to do so much more so I stayed behind my ISPs firewall opening other ports that are not 22, I did not get knowingly attacked so I was fine. The more and more services I added the more and more ports got opened, because I am an idiot who followed guides without thinking about my lab as a whole, internet got slow again so ISP flashed the firewall and I spent some time learning about internet security. I was sure it was not SSH because I had not opened port 22 so I wrote down everything I was using and flashed the pi SD cards (at this point all I had were SBC’s my iPad and iPhone) and started again. First things I did was change the SSH port, turn passwordless login on, and create keys. Than I went back into homelabbing when I got back into adding more of services back other than CUPS and pihole I thought about which ports where being used and started tip toeing into docker. Come to this year and half of my place flooded so having nothing better to do I jumped into the deep end of home labbing but I was going to be more secure so I got a Flint 2 firewall so I could flash it with a vanilla install of OpenWRT, set up rules and vLANs, made sure all of my IoT thingies where on their own vLAN and talked to HA rather than the WAN, created multiple APs, being very scared I kept port 22 open on my firewall but forwarded it to a pi running crowdsec, and swore I would continue looking for more security things. I came across someone talking about DoH probably in a community on Lemmy so I went searching if pihole and unbound could do DoH, saddly it cannot however it can do DoT so I jumped on that forcing all the DNS through 853 so if whatever gets on my system cannot do 853 for DNS it cannot get out.

  • irotsoma@piefed.blahaj.zone
    link
    fedilink
    English
    arrow-up
    21
    arrow-down
    7
    ·
    2 days ago

    That’s standard these days. Whether LLM training, vulnerability exploitation scanning, or an actually compromised system, there is a lot of automated traffic to any open endpoint on the internet. All you can do is run systems to mitigate it like crowdsec, fail2ban, Anubis, etc. Just monitoring isn’t going to do much, but monitoring is also important.

        • keisatsu@infosec.pub
          link
          fedilink
          English
          arrow-up
          14
          ·
          2 days ago

          If the traffic is initiated from the inside you typically consider any responses as belonging to the session as also “outbound” for firewall policy purposes. If we’re talking packet routing then a response to a http request originating from the inside is inbound traffic.

        • pdl@social.tchncs.de
          link
          fedilink
          arrow-up
          2
          ·
          2 days ago

          @Zwuzelmaus Not really. The session is inbound. If you are seeing answers from inside to outside, you should see inbound sessions, initiated from outside to inside.

      • irotsoma@piefed.blahaj.zone
        link
        fedilink
        English
        arrow-up
        2
        arrow-down
        6
        ·
        2 days ago

        So you’re saying there was 0 inbound traffic the whole time and only outbound? I mean, unless you’re saying you think someone got in via wardriving or something that got into your LAN directly, or someone on your LAN opened some malware, they had to have started the process over the internet. First wave is discovery of vulnerabilities and if you don’t have protection, then yeah they might have found something and exploited it. But simple monitoring and manually reacting still likely wouldn’t have stopped this. It’s very common to attack all valid IPs. That’s why LLM data centers need so much processing power to be constantly scanning for any opening and the requesting all available data for training the LLMs or whatever.

        Anyway, it always starts with inbound unless you’re compromised from internal users activities.

        • JohnnyCanuck@lemmy.ca
          link
          fedilink
          English
          arrow-up
          3
          ·
          1 day ago

          They’re talking about this specific post, and OP specifically said his server was contacting outside malware sites.

          • irotsoma@piefed.blahaj.zone
            link
            fedilink
            English
            arrow-up
            2
            arrow-down
            1
            ·
            1 day ago

            Yeah, but what triggered that. Likely an inbound connection that installed the malware. Again, unless they installed something locally or their poorly secured WiFi or other non internet service allowed access. Or they could be just seeding torrents which tend to access lots of less left sites. Blocking the inbound before connecting to the internet stops a lot of malware from getting installed in the first place. Of you’re monitoring is showing unexpected traffic, it’s too late.

            • Encrypt-Keeper@lemmy.world
              link
              fedilink
              English
              arrow-up
              1
              ·
              5 hours ago

              Monitoring the outbound connections is what’s relevant to identify if you’ve been compromised and in some cases prevent it. A flaw in software exposed to the internet might allow remote code execution but what that code does most of the time is connect outbound to a C&C server on the Internet to download malware. If that’s detected and blocked, you avoid the malware download in the first place.

              You can also sometimes be a victim of a supply chain attack which would render all of your preventative measures like VPN only access, Anubis, WAFs moot.

              • irotsoma@piefed.blahaj.zone
                link
                fedilink
                English
                arrow-up
                1
                arrow-down
                1
                ·
                2 hours ago

                Point is outbound monitoring find the issue after it’s too late and it’s also hard to determine what’s malicious be expected (for example if they use tormenting it might not be malicious).

                The threat is from inbound unless you are internally compromised. So paying attention and blocking the extremely common inbound threats before even connecting to the internet is more important and should be standard practice. Simple unused port blocking firewalls aren’t enough anymore which is what OP said they were relying on. There are very few exploits that target unused ports (assuming you’re using a reasonably secure operating system). You need adaptive response to inbound traffic on purposely open ports. These have become easier and easier to implement over time.

                Again, monitoring is important to determine I’d you’re already compromised, but won’t help much to prevent compromise and most of that is from inbound requests. Plus most outbound traffic is actually responses to inbound requests assuming you’re using a decently secure and simple OS.

                • Encrypt-Keeper@lemmy.world
                  link
                  fedilink
                  English
                  arrow-up
                  1
                  ·
                  2 hours ago

                  Point is outbound monitoring find the issue after it’s too late

                  It’s never too late. If you get compromised it’s kinda important that you become aware of that and take steps to remediate that. Otherwise what you’re suggesting is that once one thing on your network is exploited in some way, who cares. Let them have it all. It’s not 1999 anymore and defense in depth has been the name of the game for 20 years.

                  The threat is from inbound unless you are internally compromised.

                  This is like saying “The threat is from inbound except for when it’s not”. You cannot guarantee that you will never be vulnerable to an exploit at your edge or a supply chain attack. And in both cases, monitoring and remediating outbound traffic can mean the difference between a minor remediation job and a catastrophe.

                  Plus most outbound traffic is actually responses to inbound requests assuming you’re using a decently secure and simple OS.

                  Outbound in this context means outbound sessions. Responses to inbound requests are inbound. What matters is the initiating direction, not the flow of individual packets.

    • fonix232@fedia.io
      link
      fedilink
      arrow-up
      19
      arrow-down
      4
      ·
      2 days ago

      Also, an excellent use of LLMs is diagnosing such traffic and the software you use.

      LLMs excel at ingesting information and analysing it, especially in fixed formats like logs, or open source software. They can track down exactly which line of code is resulting in the suspicious looking network calls, why that happens (what configuration combination + code makes it do that call), and analyse if it’s normal traffic or if your stack has been somehow exploited.

    • curbstickle_lw@lemmy.worldM
      link
      fedilink
      English
      arrow-up
      4
      ·
      1 day ago

      All you can do is run systems to mitigate it like crowdsec, fail2ban, Anubis, etc.

      Which should be the first things brought up after the router/firewall would be my recommendation.

      I’m also doing DPI at the firewall, and have alerts set to trigger for odd activity, which I prefer over actively watching anything.

    • fubarx@lemmy.worldOP
      link
      fedilink
      English
      arrow-up
      2
      ·
      2 days ago

      One reason I invested in this system was because of all the stories of LLMs now able to explore vulnerabilities. Figured I’d better know more about the traffic than a plain consumer router.

      But the other was having a lot of third-party devices with full access to a flat network. With OTA updates, it’s possible for malicious material to get downloaded after that first install. Just being able to segment the network and limit the blast radius will let me sleep better. Once the dust settles, I’m going to try to do some traffic capturing on each vLAN and run them through AI models to see if there are any patterns.

  • Decronym@lemmy.decronym.xyzB
    link
    fedilink
    English
    arrow-up
    5
    arrow-down
    1
    ·
    edit-2
    13 minutes ago

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

    Fewer Letters More Letters
    AP WiFi Access Point
    DNS Domain Name Service/System
    ISP Internet Service Provider
    IoT Internet of Things for device controllers
    NAS Network-Attached Storage
    SBC Single-Board Computer
    SSH Secure Shell for remote terminal access
    UDP User Datagram Protocol, for real-time communications
    VPN Virtual Private Network

    9 acronyms in this thread; the most compressed thread commented on today has 21 acronyms.

    [Thread #195 for this comm, first seen 30th Nov 2026, 11:00] [FAQ] [Full list] [Contact] [Source code]

    • fubarx@lemmy.worldOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      2 days ago

      From individual clients and mobile out, and from the homeserver only when downloading. The homeserver only gets accessed from inside my network.