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.
  • ? 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
                      • ? 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
                        #21

                        I use OpenWRT on my network and each server I have is on its own VLAN. So in my case, my router is the firewall to my servers. But I do have on my todo list to get the local firewalls working as well. As others have said, security is about layers. You want an attacker to have to jump multiple hurdles.

                        possiblylinux127@lemmy.zipP 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?

                          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
                          #22

                          If it is just you on your server and the only access from outside your network is SSHing in front the VPN? You're good. Especially if it's just you on your network/VPN.

                          If there are services that others utilize, you need a firewall. Can't trust other people's devices to not drag in malware.

                          1 Reply Last reply
                          0
                          • A [email protected]

                            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 This user is from outside of this forum
                            swab148@lemm.eeS This user is from outside of this forum
                            [email protected]
                            wrote on last edited by
                            #23

                            Sounds like you could use a reverse proxy.

                            J 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?

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

                              You have a firewall. It’s in your router, and it is what makes it so that you have to VPN into the server. Otherwise the server would be accessible. NAT is, effectively, a firewall.

                              Should you add another layer, perhaps an IPS or deny-listing? Maybe it’s a good idea.

                              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?

                                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
                                #25

                                Just make sure you're using public key authentication and you're good

                                1 Reply Last reply
                                0
                                • C [email protected]

                                  You have a firewall. It’s in your router, and it is what makes it so that you have to VPN into the server. Otherwise the server would be accessible. NAT is, effectively, a firewall.

                                  Should you add another layer, perhaps an IPS or deny-listing? Maybe it’s a good idea.

                                  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
                                  #26

                                  Op means, as they said, a firewall on the server itself.

                                  NAT is, effectively, a firewall.

                                  No it isn't. Stop giving advice on edge security.

                                  H shellmonkey@lemmy.socdojo.comS possiblylinux127@lemmy.zipP 3 Replies Last reply
                                  0
                                  • N [email protected]

                                    Op means, as they said, a firewall on the server itself.

                                    NAT is, effectively, a firewall.

                                    No it isn't. Stop giving advice on edge security.

                                    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
                                    #27

                                    Are you saying that NAT isn’t effectively a firewall or that a NAT firewall isn’t effectively a firewall?

                                    N C 2 Replies Last reply
                                    0
                                    • N [email protected]

                                      Op means, as they said, a firewall on the server itself.

                                      NAT is, effectively, a firewall.

                                      No it isn't. Stop giving advice on edge security.

                                      shellmonkey@lemmy.socdojo.comS This user is from outside of this forum
                                      shellmonkey@lemmy.socdojo.comS This user is from outside of this forum
                                      [email protected]
                                      wrote on last edited by
                                      #28

                                      Assuming it's not a 1-1 NAT it does make for a functional unidirectional firewall. Now, a pure router in the sense of simply offering a gateway to another subnet doesn't do much, but the typical home router as most people think of it is creating a snat for multiple devices to reach out to the internet and without port forwarding effectively blocks off traffic from the outside in.

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

                                        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 This user is from outside of this forum
                                        ikidd@lemmy.worldI This user is from outside of this forum
                                        [email protected]
                                        wrote on last edited by
                                        #29

                                        Absolutely. Even if your ISP is firewalling, never trust they will maintain it, and some of these cheapshit routers they use are awful. Use your own router and put it on the ISP routers DMZ.

                                        1 Reply Last reply
                                        0
                                        • H [email protected]

                                          Are you saying that NAT isn’t effectively a firewall or that a NAT firewall isn’t effectively a firewall?

                                          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
                                          #30

                                          NAT simply maps IPS across subnet boundaries in such a way that upstream routing tables don't need updating.

                                          If you use destination NAT forward rules to facilitate specific destination port access, you are using a firewall.

                                          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