linux isnt immune to viruses even though its not as bad as windows

what should i do to be safe if i have a safe browser, vm, but pirate and download risky things? i know its a vm but i still dont want to have to delete everything in the vm if something happens. also the malware doesnt go to the router and spread rigt???

  • Lettuce eat lettuce@lemmy.ml
    link
    fedilink
    arrow-up
    2
    ·
    18 hours ago

    Idk what software you’re using, but most VM software has an easy way to take a snapshot of the VM state. If you’re about to download something risky, take a quick VM snapshot, so if it ends up being some kind of malware, you can just roll the VM back to its earlier state without issue, takes like 2 minutes.

    If you’re worried about malware spreading through your network, you need to isolate your devices. The most common way to do this is with VLANs, but I don’t know what your home network looks like, and if you just have a typical home setup with your ISP’s modem/router and all your devices plugged into it or on the default wireless network, you won’t be able to do that.

    You could also use something like UFW on Linux to only allow internet traffic and block any traffic inbound or outbound to your LAN network, isolating your PC from all other devices on your LAN. This isn’t great, because if your host is compromised, then your host-based firewall could also be compromised and the malware could then get out to the rest of your network.

    You could invert this and have all your other devices on LAN set to block all traffic from your specific PC, which would be more secure, but also a pain to configure, plus it assumes all the other devices are able to be configured in that way on your LAN.

    There are a bunch of other solutions, but it depends on your setup, your technical skill level, and your threat profile. If you’re just torrenting cracked games and random software, that’s somewhat risky, but not really that crazy if you are running it in a VM with rollback snapshots.

      • Lettuce eat lettuce@lemmy.ml
        link
        fedilink
        arrow-up
        2
        ·
        16 hours ago

        Let’s step back actually.

        • What is your current PC running for an OS?
        • What VM software are you using?
        • What is your level of technical experience? (1 through 10)
        • What are you the most worried about happening to your computer and home network?
          • Lettuce eat lettuce@lemmy.ml
            link
            fedilink
            arrow-up
            2
            ·
            13 hours ago

            If you’ve already got Qubes and Xen Hypervisor running, your technical level is high enough for sure. And honestly, your security is already probably good enough.

            Qubes has very secure defaults, I don’t think you need to do anything else, honestly what you have already might be overkill, but idk your use case.

            Make sure you can’t see your torrent/download machine VM from any other devices on your network. Use Nmap as long as it’s your network. Don’t use it on a corporate or university network, it will likely get your device totally locked out and you in big trouble.