Do I need a firewall for my fedora 38?

I’m new to Linux, previously been on Windows where I used defender + Windows firewall. Now I’m on fedora which also have its firewall called firewalld. Are those sufficient, or do I need any other solutions for my security?

  • _cnt0@unilem.org
    link
    fedilink
    arrow-up
    14
    ·
    1 year ago

    All the other comments kind of suggest otherwise, but I am pretty certain that fedora comes with firewalld enabled by default.

  • moist_towelettes@lemm.ee
    link
    fedilink
    English
    arrow-up
    11
    arrow-down
    2
    ·
    edit-2
    1 year ago

    Unless your computer is exposed directly to the internet, your router’s firewall should be enough. Fedora typically has SELinux and AppArmor enabled by default which should protect from something nasty executing on your machine.

    Don’t execute things as root if you don’t know what it is and you should be fine.

    • Caaaaarrrrlll@lemmy.ml
      link
      fedilink
      arrow-up
      5
      ·
      edit-2
      1 year ago

      Fedora doesn’t use AppArmor, it uses SELinux.

      You normally only use SELinux or AppArmor, not both, since they are the same goal and purpose.

      I would definitely keep firewalld and SELinux installed and enabled on any system unless there’s a good reason not to.

  • gibson@sopuli.xyz
    link
    fedilink
    arrow-up
    9
    ·
    edit-2
    1 year ago

    Its best to have some defence in depth. Ideally you would have a firewall on your network AND your local machine. If you are running a laptop definitely have a local firewall on that as you cannot trust random networks you connect to when out and about in the world.

    firewalld is sufficient, i suggest learning its CLI as it is not super complicated. ufw is ok if you are allergic to command line.

  • Responsabilidade@lemmy.eco.br
    link
    fedilink
    arrow-up
    8
    ·
    1 year ago

    You probably is protected by your routers firewall already. But if you want to keep it safe and use a firewall in your computer, you may install ufw or firewalld. The default config should be alright to your needs

  • thayer@lemmy.ca
    link
    fedilink
    English
    arrow-up
    7
    ·
    edit-2
    1 year ago

    I believe that Fedora’s firewall is enabled by default, but it leaves open ports 1025-65535/tcp and 1025-65535/udp.

    To lock down some sane defaults:

    sudo firewall-cmd --permanent --remove-port=1025-65535/tcp
    sudo firewall-cmd --permanent --remove-port=1025-65535/udp
    sudo firewall-cmd --reload
    

    Verify allowed ports with:

    sudo firewall-cmd --list-ports
    

    See also:

  • kevincox@lemmy.ml
    link
    fedilink
    arrow-up
    6
    ·
    1 year ago

    Even without any firewall you should be fine by default. Access to ports with no services listening do nothing. Firewalls are just defense-in-depth in case a service that you didn’t want to accidentally listens on a port. It may also slightly reduce kernel attack surface.

    So I would say that you don’t need it. You will be fine. But if you want to be sure about what is listening on your machine then feel free to apply one.

  • CaptainJack42@discuss.tchncs.de
    link
    fedilink
    arrow-up
    3
    ·
    edit-2
    1 year ago

    Unless you mess around with firewall commands/settings you don’t understand firewalld should be sufficient.

    That being said you might have to allow certain services at some point (openvpn) for example

  • LeTak@lemm.ee
    link
    fedilink
    arrow-up
    3
    ·
    1 year ago

    I use portmaster on my fedora instance. I disabled blocking all from LAN and made a custom rule set to allow some devices and block all others.

  • GustavoM@lemmy.world
    link
    fedilink
    English
    arrow-up
    1
    arrow-down
    3
    ·
    1 year ago

    “That guy” here. I don’t go “further” than setting everything up with firejail and then creating a mavclan port/connection pointing my main ip through it and then removing whatever is in my eth0 port/connection. All that with netctl.

    “Does it work”? Well, whoever tries to scan my ip for open ports with nmap gets a nice and sweet “All ports are closed” message back. So eh… I’ll be fine. :^)