Hi. I wanted to know if it’s needed to install a firewall on a linux desktop/laptop. Why yes or why no?

  • pathief@lemmy.world
    link
    fedilink
    arrow-up
    47
    ·
    2 years ago

    If your computer is connected to a network, I don’t see any downside of enabling a firewall. It’s a good security layer to have and costs basically no resources to keep running.

  • corey389@lemmy.world
    link
    fedilink
    arrow-up
    18
    arrow-down
    1
    ·
    edit-2
    2 years ago

    Linux comes with a default firewall it’s called IPtables/NFtables, Just make sure that it’s on. Example I Ubuntu Sudo ufw enable.

    • 𝘋𝘪𝘳𝘬@lemmy.ml
      link
      fedilink
      arrow-up
      4
      arrow-down
      9
      ·
      2 years ago

      It’s also comically useless to have a desktop firewall application installed when you’re already behind some sort of firewall solution like a router not forwarding most incoming traffic.

      • Molecular0079@lemmy.world
        link
        fedilink
        English
        arrow-up
        9
        ·
        2 years ago

        It depends. Sure, maybe somewhat redundant for a home desktop that just stays at home on a network you control, but for a laptop it is absolutely essential.

        You may also want a firewall to defend against other devices within your local network. Let’s say you have IoT devices, many of which are poorly secured and maintained by their manufacturers, or you live with family members or guests who don’t practice or even know about proper computing hygiene and are bringing in devices onto your local WiFi.

        • 𝘋𝘪𝘳𝘬@lemmy.ml
          link
          fedilink
          arrow-up
          4
          arrow-down
          1
          ·
          2 years ago

          My IoT devices already have a dedicated network and guest can use my guest WiFi. But yes, you’re right. It depends. And especially for mobile devices some sort of local firewall solution could be relevant. If there are no ports exposed to the LAN you’re pretty save, though.

          • Jagger2097@lemmy.world
            link
            fedilink
            arrow-up
            1
            ·
            2 years ago

            No you aren’t, browser based malware puts the attacker inside your fancy network. A basic firewall will greatly hinder any attack at basically no cost to you.

      • Salix@sh.itjust.works
        link
        fedilink
        arrow-up
        3
        ·
        2 years ago

        Some people like hosting some servers on their desktop as well, and doesn’t want others on their local network to access them. With firewalls, you can allow specific IP address to reach those servers.

      • wmassingham@lemmy.world
        link
        fedilink
        arrow-up
        3
        arrow-down
        1
        ·
        2 years ago

        That’s fine right up until something on your network, even the ISP modem-firewall-router-switch itself, gets compromised.

      • BrianTheeBiscuiteer@lemmy.world
        link
        fedilink
        arrow-up
        2
        arrow-down
        1
        ·
        2 years ago

        There’s incoming and then there’s outgoing traffic. Software firewalls can forbid processes that may be advertised as “offline only” from reaching out; typically a hardware firewall doesn’t care about this kind of thing.

  • utopiah@lemmy.ml
    link
    fedilink
    arrow-up
    13
    ·
    2 years ago

    Ironically enough if you do not know what a firewall actually does (and saying it “protects” against "stuff is NOT enough) IMHO you do need one. That being said unless you know what you are doing, better leave it to the default one with default settings.

  • flashgnash@lemm.ee
    link
    fedilink
    arrow-up
    12
    ·
    2 years ago

    On a laptop absolutely. My firewall on my laptop doesn’t let me discriminate between networks so I’m always worried someone will try to attack me on public WiFi for the few ports I want open

    On a desktop on a network you trust less important but still no firewall means if another device on your network gets compromised you’re screwed

    • Sir_Simon_Spamalot@lemmy.world
      link
      fedilink
      arrow-up
      2
      ·
      2 years ago

      For laptop, what kind of attack would we be protecting ourselves from? I get the relevance of antivirus, VPN, and device encryption, but what about firewall?

      • flashgnash@lemm.ee
        link
        fedilink
        arrow-up
        2
        ·
        2 years ago

        Any vulnerabilities in any of your software that can talk to a network, ssh, browser, the operating system itsself could be exploited if your firewall is down

        If you’re using username and password and have ssh enabled, for example anyone on your network could attempt to log in to your machine

          • flashgnash@lemm.ee
            link
            fedilink
            arrow-up
            2
            ·
            2 years ago

            At that point why not just have the firewall set to deny everything just to be safe though? There’s always the chance you missed something that’s decided to listen on some random port and if you aren’t using anything that listens on a network why have the firewall open anyway

          • flashgnash@lemm.ee
            link
            fedilink
            arrow-up
            1
            ·
            2 years ago

            My understanding is there can be a vulnerability in absolutely anything

            Browsers are unlikely to but don’t think it’s impossible

            • LufyCZ@lemmy.world
              link
              fedilink
              arrow-up
              1
              ·
              2 years ago

              A firewall protects open ports on your machine. A browser does not have any open ports.

              Of course they have vulnerabilities, but a firewall won’t protect you from them.

      • Paragone@sh.itjust.works
        link
        fedilink
        arrow-up
        0
        arrow-down
        2
        ·
        2 years ago

        If you have the ability to take a look at either SANS website, and see their articles, or have your system show you all the automatic attacks hitting your machine, then maybe you will understand…

        Botnets are coded to hammer-away at all possible internet-addresses, trying to break-in & highjack more machines, to include in the established criminal-machine that the botnet is…

        SANS said, a decade or 2 ago, that it took, on average, something like 6 or 4 minutes for a new MS-Windows machine to be owned by some attack from the internet.

        I’ve had linux machines cracked/owned, and wiped 'em to get 'em clean.

        Having no immune-system is BAD.

        Linux botnets, apple operating-system botnets, they exist.

        I don’t think there is any operating-system that is connected to the internet that doesn’t have attacks coded to crack it.

        I just looked at SANS.org, and they have totally changed, so they are now … more a moneymaking-machine wanting B2B biz?

        Here, though, are some cheat-sheets they made:

        https://www.sans.org/posters/?msc=main-nav

        They used to tell us the top-20 most effective protections for particular threats, identifying how prevalent the threats were, etc…

        No idea who does that nowadays…

  • bushvin@lemmy.world
    link
    fedilink
    arrow-up
    12
    ·
    2 years ago

    Do you need a lock on the door of your place?

    No, but it’s a damn good idea to protect whatever is in it.

  • slazer2au@lemmy.world
    link
    fedilink
    arrow-up
    9
    ·
    2 years ago

    Yes, because while I trust my device, I do not trust the Chromecast or the WAP to not be an asshole and fuck with things.

      • slazer2au@lemmy.world
        link
        fedilink
        arrow-up
        1
        arrow-down
        1
        ·
        2 years ago

        Trust may be the worng word as Windows will be Windows but I know that no one is going to zero day my devices because I am not that high value of a target.

        • Jagger2097@lemmy.world
          link
          fedilink
          arrow-up
          1
          arrow-down
          1
          ·
          2 years ago

          That’s a bad mentally as well. Most stacks these days are about quantity not quality. If you blindly hit 10000 targets it’s more profitable than trying to spear a single one.

          Akin to not wearing a seatbelt because you are unlikely to be killed by a sniper

  • smileyhead@discuss.tchncs.de
    link
    fedilink
    arrow-up
    5
    arrow-down
    1
    ·
    2 years ago

    Yes, because you can forget what services are running and maybe they can be explited.

    An example can be Syncthing which setting are done via web browser at port 8384. If you do not have a firewall, everyone on the same network would be able to change Syncthing settings and then sync your directories to their devices.

    • ReversalHatchery@beehaw.org
      link
      fedilink
      arrow-up
      3
      ·
      2 years ago

      Good point, but syncthing only listens on localhost as others have said too.
      However it still is a network service that can have vulnerabilities, besides many others like KDE Connect (which may be a target as one of its purposes is remote control and monitoring) or a bittorrent client

  • danielfgom@lemmy.world
    link
    fedilink
    English
    arrow-up
    5
    arrow-down
    1
    ·
    2 years ago

    If you are only at home you don’t need it because the router already has a firewall. But if you’re is using public WiFi definitely use it.

    • Quazatron@lemmy.world
      link
      fedilink
      arrow-up
      9
      ·
      2 years ago

      It depends on how much do you trust your router.

      Some home routers have poor security: unfrequent updates, http (not https) web consoles, single factor authentication (password only, without username for instance).

      Enabling your firewall is the bare minimum, costs nothing and it’s a good security practice.

      • pathief@lemmy.world
        link
        fedilink
        arrow-up
        4
        ·
        2 years ago

        It depends on how much do you trust your router

        Your router and every single device connected to your local network.

      • danielfgom@lemmy.world
        link
        fedilink
        English
        arrow-up
        2
        arrow-down
        2
        ·
        2 years ago

        Sure that is true but if you’re getting it from the ISP and it’s that bad, you need to change ISP.

        Plus, ALWAYS get into the router and set a new password. Always. And go over all the settings to be sure. As you say, a shit ISP may have lax security.

        • Molecular0079@lemmy.world
          link
          fedilink
          English
          arrow-up
          1
          ·
          2 years ago

          you need to change ISP.

          You say that like its easy. It usually isn’t.

          It usually isn’t too hard to insert your own router into your network setup. You might have to battle with ISP support a bit though, but a ton support either Bridge Mode or IP Passthrough.

          • danielfgom@lemmy.world
            link
            fedilink
            English
            arrow-up
            1
            ·
            2 years ago

            I’m now sure how is is in your country but where I live we don’t have a contract with the ISP. We just pay monthly and at any time we can cancel. But if you have a contract, then yes you’ll need your own router ideally

            • rambos@lemm.ee
              link
              fedilink
              arrow-up
              1
              ·
              2 years ago

              In my country all ISP routers suck hard. I can change ISP but it doesnt help at all. You have to be lucky to get a working router it seems. We can get service with no contract with extra €, but you still have to use their router that doesnt support bridge mode. Im not even talking about routers security

  • SGG@lemmy.world
    link
    fedilink
    English
    arrow-up
    4
    ·
    2 years ago

    A sane firewall configuration should have no/minimal impact on a desktop focused OS.

    On the other hand, sometimes programs are really badly made and expect stupid things like there being no firewall.

    You should have one yes, but to each their own.

    I manage a bunch of windows computers and regularly make adding firewall rules part of install scripts, good example: Dreamweaver.

  • 👁️👄👁️@lemm.ee
    link
    fedilink
    English
    arrow-up
    3
    ·
    2 years ago

    I still don’t know what a firewall actually does lol. I just install nftables and ufw and hope it somehow improves my security. I just don’t know how.

    • vector_zero@lemmy.world
      link
      fedilink
      arrow-up
      4
      ·
      2 years ago

      Every computer has a bunch of ports (1-65535 if I recall correctly), each of which is a unique entity to which a single service can bind. In layman’s terms, a port is a door that one service is able to answer when someone knocks. By convention, some ports have a specific associated service (80 = HTTP, 443 = HTTPS, 22 = SSH), but there are a lot that you can just use as you deem appropriate.

      If you want a service (e.g. a web server) to be accessible, you have to run a service that binds to a known port (e.g. 80), and a client has to reach out to your server on that same port. A firewall sits between your service(s) and any potential clients, much like those steel security screen doors. If that’s closed, nobody gets through on that port, even if a service is bound to that port and is listening for a connection.

      As a general rule of thumb, you want your firewall to block as much traffic as possible without breaking something (I.e. blocking one of your public-facing services). If you don’t run any services on your computer (web services, media servers, etc.), you can probably get away with blocking all inbound traffic. without any discernable impact.

    • Rekhyt@lemmy.world
      link
      fedilink
      arrow-up
      3
      ·
      2 years ago

      Programs that want to receive or send data across the network do so using a port. A firewall (in the sense of a firewall on your computer) is basically a program that sits between the rest of your programs and your network connection and determines what programs should be allowed out to the network and what incoming connections should be allowed to talk to your programs.

      This is “increasing security” by making sure you don’t let incoming connections talk to whatever happens to be running on your computer that might be listening for network traffic.

      I can provide a more ELI5 explanation if you would like it.

  • jackpot@lemmy.mlBanned
    link
    fedilink
    arrow-up
    1
    arrow-down
    3
    ·
    2 years ago

    i dont even undedtsand what a firewall is, i yhinm it blocks incouming / ourgojng connectikns lol