Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

agnos.is Forums

  1. Home
  2. Selfhosted
  3. Do I really need a firewall for my server?

Do I really need a firewall for my server?

Scheduled Pinned Locked Moved Selfhosted
selfhosted
64 Posts 39 Posters 272 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • ? Offline
    ? Offline
    Guest
    wrote on last edited by
    #1

    I've been running my server without a firewall for quite some time now, I have a piped instance and snikket running on it. I've been meaning to get UFW on it but I've been too lazy to do so. Is it a necessary thing that I need to have or it's a huge security vulnerability? I can only SSH my server from only my local network and must use a VPN if I wanna SSH in outside so I'd say my server's pretty secure but not the furthest I could take it. Opinions please?

    fizz@lemmy.nzF max_p@lemmy.max-p.meM mhzawadi@lemmy.horwood.cloudM shimitar@downonthestreet.euS A 20 Replies Last reply
    1
    0
    • System shared this topic on
    • ? Guest

      I've been running my server without a firewall for quite some time now, I have a piped instance and snikket running on it. I've been meaning to get UFW on it but I've been too lazy to do so. Is it a necessary thing that I need to have or it's a huge security vulnerability? I can only SSH my server from only my local network and must use a VPN if I wanna SSH in outside so I'd say my server's pretty secure but not the furthest I could take it. Opinions please?

      fizz@lemmy.nzF This user is from outside of this forum
      fizz@lemmy.nzF This user is from outside of this forum
      [email protected]
      wrote on last edited by
      #2

      Disclaimer, I'm not a network professional im only learning. But you dont need ufw since your router firewall should be able to filter majority of the traffic. But in security there is a concept of layers. You want your router firewall then your device firewall to provide multiple layers incase something slips through one layer.

      So to give a simple answer, it depends how secure you want your network to be. Personally I think UFW is easy so you may as well set it up. 5sec of config might stop a hacker traversing your network hoping from device to device.

      F N J A M 5 Replies Last reply
      0
      • ? Guest

        I've been running my server without a firewall for quite some time now, I have a piped instance and snikket running on it. I've been meaning to get UFW on it but I've been too lazy to do so. Is it a necessary thing that I need to have or it's a huge security vulnerability? I can only SSH my server from only my local network and must use a VPN if I wanna SSH in outside so I'd say my server's pretty secure but not the furthest I could take it. Opinions please?

        max_p@lemmy.max-p.meM This user is from outside of this forum
        max_p@lemmy.max-p.meM This user is from outside of this forum
        [email protected]
        wrote on last edited by
        #3

        Is it directly exposed over the Internet? If you only port forward the VPN on your router, I wouldn't worry about it unless you're worried about someone else already on your LAN.

        And even then, it's really more like an extra layer of security against accidentally running something exposed publicly that you didn't intend to, or maybe you want some services to only be accessible via a particular private interface. You don't need a firewall if you have nothing to filter in the first place.

        A machine without a firewall that doesn't have any open port behave practically the same from a security standpoint: nothing's gonna happen. The only difference is the port showing as closed vs filtered in nmap, and the server refusing to send any response not even a rejection, but that's it.

        1 Reply Last reply
        0
        • ? Guest

          I've been running my server without a firewall for quite some time now, I have a piped instance and snikket running on it. I've been meaning to get UFW on it but I've been too lazy to do so. Is it a necessary thing that I need to have or it's a huge security vulnerability? I can only SSH my server from only my local network and must use a VPN if I wanna SSH in outside so I'd say my server's pretty secure but not the furthest I could take it. Opinions please?

          mhzawadi@lemmy.horwood.cloudM This user is from outside of this forum
          mhzawadi@lemmy.horwood.cloudM This user is from outside of this forum
          [email protected]
          wrote on last edited by
          #4

          If your router is setup to only allow in the ports with a service hanging off it, like SSH. Then a firewall wont add anything your router doesnt.

          On the flip side, if your running any kind of VPS or directly accessible server, like a VPS or dedicated server. Then a firewall is required.

          Now protecting your server from other things on your local network might something you want to do, think IoT stuff getting popped and being used to hack other things on the network

          1 Reply Last reply
          0
          • ? Guest

            I've been running my server without a firewall for quite some time now, I have a piped instance and snikket running on it. I've been meaning to get UFW on it but I've been too lazy to do so. Is it a necessary thing that I need to have or it's a huge security vulnerability? I can only SSH my server from only my local network and must use a VPN if I wanna SSH in outside so I'd say my server's pretty secure but not the furthest I could take it. Opinions please?

            shimitar@downonthestreet.euS This user is from outside of this forum
            shimitar@downonthestreet.euS This user is from outside of this forum
            [email protected]
            wrote on last edited by
            #5

            You don't. Providing you have an upstream gateway that do the firewall for you, provided you don't have an open WiFi, provided you use a reverse proxy, provided you have sane network settings all around, provided you run linux(or similar).

            Even better if you are behind CGNAT.

            Provided you know what you are doing.

            On the other hand, setting up a firewall in a safe way is no easy task either.

            I use an opnSense on top of my home network, given all the above "provided".

            Before that, I never run a firewall and never had an issue. Always being cg-nat tough.

            1 Reply Last reply
            0
            • fizz@lemmy.nzF [email protected]

              Disclaimer, I'm not a network professional im only learning. But you dont need ufw since your router firewall should be able to filter majority of the traffic. But in security there is a concept of layers. You want your router firewall then your device firewall to provide multiple layers incase something slips through one layer.

              So to give a simple answer, it depends how secure you want your network to be. Personally I think UFW is easy so you may as well set it up. 5sec of config might stop a hacker traversing your network hoping from device to device.

              F This user is from outside of this forum
              F This user is from outside of this forum
              [email protected]
              wrote on last edited by
              #6

              This is the best answer. Your router protects you from the outside, but a local firewall can protect you from someone prodding your lan from a hacked camera or some other IoT device. By having a firewall locally you just minimize the attack surface further.

              1 Reply Last reply
              0
              • fizz@lemmy.nzF [email protected]

                Disclaimer, I'm not a network professional im only learning. But you dont need ufw since your router firewall should be able to filter majority of the traffic. But in security there is a concept of layers. You want your router firewall then your device firewall to provide multiple layers incase something slips through one layer.

                So to give a simple answer, it depends how secure you want your network to be. Personally I think UFW is easy so you may as well set it up. 5sec of config might stop a hacker traversing your network hoping from device to device.

                N This user is from outside of this forum
                N This user is from outside of this forum
                [email protected]
                wrote on last edited by
                #7

                This. It's unnecessary but it's another layer.

                E 1 Reply Last reply
                0
                • ? Guest

                  I've been running my server without a firewall for quite some time now, I have a piped instance and snikket running on it. I've been meaning to get UFW on it but I've been too lazy to do so. Is it a necessary thing that I need to have or it's a huge security vulnerability? I can only SSH my server from only my local network and must use a VPN if I wanna SSH in outside so I'd say my server's pretty secure but not the furthest I could take it. Opinions please?

                  A This user is from outside of this forum
                  A This user is from outside of this forum
                  [email protected]
                  wrote on last edited by
                  #8

                  One thing that hasn't been said in this thread is the following:
                  Do you trust your router? Do you have an isp that can probe your router remotely and access it? In those cases, you absolutely need a firewall

                  ikidd@lemmy.worldI 1 Reply Last reply
                  0
                  • ? Guest

                    I've been running my server without a firewall for quite some time now, I have a piped instance and snikket running on it. I've been meaning to get UFW on it but I've been too lazy to do so. Is it a necessary thing that I need to have or it's a huge security vulnerability? I can only SSH my server from only my local network and must use a VPN if I wanna SSH in outside so I'd say my server's pretty secure but not the furthest I could take it. Opinions please?

                    E This user is from outside of this forum
                    E This user is from outside of this forum
                    [email protected]
                    wrote on last edited by
                    #9

                    I can recommend cockpit for managing the firewall

                    1 Reply Last reply
                    0
                    • N [email protected]

                      This. It's unnecessary but it's another layer.

                      E This user is from outside of this forum
                      E This user is from outside of this forum
                      [email protected]
                      wrote on last edited by
                      #10

                      Instead of thinking with layers, you should use think of Swiss cheese. Each slice of cheese has some holes - think of weaknesses in the defense (or intentional holes as you need a way to connect to the target legitimately). Putting several slices back to back (in random order and orientation) means that the way to penetrate all layers is not a simple straight way, but that you need to work around each layer.

                      N 1 Reply Last reply
                      0
                      • ? Guest

                        I've been running my server without a firewall for quite some time now, I have a piped instance and snikket running on it. I've been meaning to get UFW on it but I've been too lazy to do so. Is it a necessary thing that I need to have or it's a huge security vulnerability? I can only SSH my server from only my local network and must use a VPN if I wanna SSH in outside so I'd say my server's pretty secure but not the furthest I could take it. Opinions please?

                        S This user is from outside of this forum
                        S This user is from outside of this forum
                        [email protected]
                        wrote on last edited by
                        #11

                        You do not even need a port based firewall when the server is open on the internet.

                        When you configure the software to not have unnecessary open ports over the internet connected interface then a port based firewall is providing zero additional security.

                        A port based firewall has the benefit that you can lock everything down to the few ports you actually need, and do not have to worry about misconfigured software.

                        For example, something like docker circumvents ufw anyway. And i know ppl that had open ports even tho they had ufw running.

                        1 Reply Last reply
                        0
                        • ? Guest

                          I've been running my server without a firewall for quite some time now, I have a piped instance and snikket running on it. I've been meaning to get UFW on it but I've been too lazy to do so. Is it a necessary thing that I need to have or it's a huge security vulnerability? I can only SSH my server from only my local network and must use a VPN if I wanna SSH in outside so I'd say my server's pretty secure but not the furthest I could take it. Opinions please?

                          H This user is from outside of this forum
                          H This user is from outside of this forum
                          [email protected]
                          wrote on last edited by
                          #12

                          In your case: no need for a fw if you can trust your local network.

                          Generally: services can have bugs - reverse proxy them. Not everybody needs to access the service - limit access with a firewall. Limit brute-force/ word-list attempts - MFA / fail2ban.

                          1 Reply Last reply
                          0
                          • E [email protected]

                            Instead of thinking with layers, you should use think of Swiss cheese. Each slice of cheese has some holes - think of weaknesses in the defense (or intentional holes as you need a way to connect to the target legitimately). Putting several slices back to back (in random order and orientation) means that the way to penetrate all layers is not a simple straight way, but that you need to work around each layer.

                            N This user is from outside of this forum
                            N This user is from outside of this forum
                            [email protected]
                            wrote on last edited by
                            #13

                            I've heard this analogy before but I don't really care for it myself.

                            It creates a mental image but isn't really analogous.

                            In the case of a firewall on a server behind a NAT, ports forwarded through the NAT are holes through the first several slices.

                            E 1 Reply Last reply
                            0
                            • ? Guest

                              I've been running my server without a firewall for quite some time now, I have a piped instance and snikket running on it. I've been meaning to get UFW on it but I've been too lazy to do so. Is it a necessary thing that I need to have or it's a huge security vulnerability? I can only SSH my server from only my local network and must use a VPN if I wanna SSH in outside so I'd say my server's pretty secure but not the furthest I could take it. Opinions please?

                              M This user is from outside of this forum
                              M This user is from outside of this forum
                              [email protected]
                              wrote on last edited by
                              #14

                              I like to run ufw on all my machines but I'm also a tinfoil-hat wearing wacko who believes that no computer should ever really be trusted. Just trusted enough to do specific tasks.

                              1 Reply Last reply
                              0
                              • N [email protected]

                                I've heard this analogy before but I don't really care for it myself.

                                It creates a mental image but isn't really analogous.

                                In the case of a firewall on a server behind a NAT, ports forwarded through the NAT are holes through the first several slices.

                                E This user is from outside of this forum
                                E This user is from outside of this forum
                                [email protected]
                                wrote on last edited by
                                #15

                                If done correctly, those may only be open from the internet, but not from the local network. While SSH may only be available from your local network - or maybe only by the fixed IP of your PC. Other services may only be reachable, when coming from the correct VLAN (assuming you did segment your home network). Maybe your server can only access the internet, but not to the home network, so that an attacker has a harder time spreading into your home network (note: that's only really meaningful, if it's not a software firewall on that same server...)

                                N 1 Reply Last reply
                                0
                                • E [email protected]

                                  If done correctly, those may only be open from the internet, but not from the local network. While SSH may only be available from your local network - or maybe only by the fixed IP of your PC. Other services may only be reachable, when coming from the correct VLAN (assuming you did segment your home network). Maybe your server can only access the internet, but not to the home network, so that an attacker has a harder time spreading into your home network (note: that's only really meaningful, if it's not a software firewall on that same server...)

                                  N This user is from outside of this forum
                                  N This user is from outside of this forum
                                  [email protected]
                                  wrote on last edited by
                                  #16

                                  Sure mate, keep trotting out the dumb swiss cheese analogy. Fine by me.

                                  1 Reply Last reply
                                  0
                                  • fizz@lemmy.nzF [email protected]

                                    Disclaimer, I'm not a network professional im only learning. But you dont need ufw since your router firewall should be able to filter majority of the traffic. But in security there is a concept of layers. You want your router firewall then your device firewall to provide multiple layers incase something slips through one layer.

                                    So to give a simple answer, it depends how secure you want your network to be. Personally I think UFW is easy so you may as well set it up. 5sec of config might stop a hacker traversing your network hoping from device to device.

                                    J This user is from outside of this forum
                                    J This user is from outside of this forum
                                    [email protected]
                                    wrote on last edited by
                                    #17

                                    it depends how secure you want your network to be. Personally I think UFW is easy so you may as well set it up

                                    IMO this attitude is problematic. It encourages people (especially newbies) to think they can't trust anything, that software is by nature unreliable. I was one of those people once.

                                    Personally, now I understand better how these things work, there's no way I'm wasting my time putting up multiple firewalls. The router already has a firewall. Next.

                                    appoxo@lemmy.dbzer0.comA 1 Reply Last reply
                                    0
                                    • J [email protected]

                                      it depends how secure you want your network to be. Personally I think UFW is easy so you may as well set it up

                                      IMO this attitude is problematic. It encourages people (especially newbies) to think they can't trust anything, that software is by nature unreliable. I was one of those people once.

                                      Personally, now I understand better how these things work, there's no way I'm wasting my time putting up multiple firewalls. The router already has a firewall. Next.

                                      appoxo@lemmy.dbzer0.comA This user is from outside of this forum
                                      appoxo@lemmy.dbzer0.comA This user is from outside of this forum
                                      [email protected]
                                      wrote on last edited by
                                      #18

                                      IMO this attitude is problematic. It encourages people (especially newbies) to think they can't trust anything, that software is by nature unreliable. I was one of those people once.

                                      IMO: Exactly the reverse. That's how we get clients clicking and agreeing to everything presented without for once thinking critically.

                                      In 6 working years (MSP) I had probably less than 10 occurrences of clients questioning a security concept from their own action.
                                      If we didnt protect them from their own stupidity, the amount of cyber breaches would explode...

                                      Just recently:
                                      A client: I clicked on the box that is asking me for domain credentials.

                                      The client didnt say what type of window it was or what happened before/after.
                                      The client juat contacted us, because the pc wouldnt connect to the network and thus was unusable... >_>

                                      J 1 Reply Last reply
                                      0
                                      • fizz@lemmy.nzF [email protected]

                                        Disclaimer, I'm not a network professional im only learning. But you dont need ufw since your router firewall should be able to filter majority of the traffic. But in security there is a concept of layers. You want your router firewall then your device firewall to provide multiple layers incase something slips through one layer.

                                        So to give a simple answer, it depends how secure you want your network to be. Personally I think UFW is easy so you may as well set it up. 5sec of config might stop a hacker traversing your network hoping from device to device.

                                        A This user is from outside of this forum
                                        A This user is from outside of this forum
                                        [email protected]
                                        wrote on last edited by
                                        #19

                                        I have about 20 services on my machine so I'm going to need to open a ton of ports (ssh, SSL, multiple higher number ports since some services require several ports). At that point, what is the point of a firewall if so many ports are open? With so many ports open, it seems like a firewall doesn't add much security vs the complexity it adds.

                                        swab148@lemm.eeS E fizz@lemmy.nzF 3 Replies Last reply
                                        0
                                        • appoxo@lemmy.dbzer0.comA [email protected]

                                          IMO this attitude is problematic. It encourages people (especially newbies) to think they can't trust anything, that software is by nature unreliable. I was one of those people once.

                                          IMO: Exactly the reverse. That's how we get clients clicking and agreeing to everything presented without for once thinking critically.

                                          In 6 working years (MSP) I had probably less than 10 occurrences of clients questioning a security concept from their own action.
                                          If we didnt protect them from their own stupidity, the amount of cyber breaches would explode...

                                          Just recently:
                                          A client: I clicked on the box that is asking me for domain credentials.

                                          The client didnt say what type of window it was or what happened before/after.
                                          The client juat contacted us, because the pc wouldnt connect to the network and thus was unusable... >_>

                                          J This user is from outside of this forum
                                          J This user is from outside of this forum
                                          [email protected]
                                          wrote on last edited by
                                          #20

                                          Possibly it's about personality types. I was only going on my own experience. Of always being told by a chorus of experts "Oh no you don't want to do that!" and ending up being terrified to touch anything. When I now know that I usually had nothing to be afraid of, because dangerous things tend to be locked down by design, exactly as they should be.

                                          appoxo@lemmy.dbzer0.comA 1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • Login

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • World
                                          • Users
                                          • Groups