Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Brite
  • 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. Programmer Humor
  3. Context: Docker bypasses all UFW firewall rules

Context: Docker bypasses all UFW firewall rules

Scheduled Pinned Locked Moved Programmer Humor
programmerhumor
105 Posts 58 Posters 0 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.
  • K [email protected]

    Try podman and quadlets

    ambiguousprops@lemmy.todayA This user is from outside of this forum
    ambiguousprops@lemmy.todayA This user is from outside of this forum
    [email protected]
    wrote last edited by
    #53

    Quadlets are so good.

    1 Reply Last reply
    2
    • P [email protected]

      Ok

      So, confession time.

      I don't understand docker at all. Everyone at work says "but it makes things so easy." But it doesnt make things easy. It puts everything in a box, executes things in a box, and you have to pull other images to use in your images, and it's all spaghetti in the end anyway.

      If I can build an Angular app the same on my Linux machine and my windows PC, and everything works identically on either, and The only thing I really have to make sure of is that the deployment environment has node and the angular CLI installed, how is that not simpler than everything you need to do to set up a goddamn container?

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

      Sure but thats an angular app, and you already know how to manage its environment.

      People self host all sorts of things, with dozens of services in their home server.

      They dont need to know how to manage the environment for these services because docker "makes everything so easy".

      1 Reply Last reply
      5
      • Q [email protected]

        Docker docs:

        Docker routes container traffic in the nat table, which means that packets are diverted before it reaches the INPUT and OUTPUT chains that ufw uses. Packets are routed before the firewall rules can be applied, effectively ignoring your firewall configuration.

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

        On windows (coughing)

        1 Reply Last reply
        8
        • F [email protected]

          Explicitly binding certain ports to the container has a similar effect, no?

          D This user is from outside of this forum
          D This user is from outside of this forum
          [email protected]
          wrote last edited by
          #56

          I still need to allow the ports in my firewall when using podman, even when I bind to 0.0.0.0.

          Q 1 Reply Last reply
          3
          • P [email protected]

            Ok

            So, confession time.

            I don't understand docker at all. Everyone at work says "but it makes things so easy." But it doesnt make things easy. It puts everything in a box, executes things in a box, and you have to pull other images to use in your images, and it's all spaghetti in the end anyway.

            If I can build an Angular app the same on my Linux machine and my windows PC, and everything works identically on either, and The only thing I really have to make sure of is that the deployment environment has node and the angular CLI installed, how is that not simpler than everything you need to do to set up a goddamn container?

            fuckbigtech347@lemmygrad.mlF This user is from outside of this forum
            fuckbigtech347@lemmygrad.mlF This user is from outside of this forum
            [email protected]
            wrote last edited by
            #57

            I pretty much share the same experience. I avoid using docker or any other containerizing thing due to the amount of bloat and complexity that this shit brings. I always get out of my way to get Software running w/o docker, even if there is no documented way. If that fails then the Software just sucks.

            1 Reply Last reply
            0
            • Q [email protected]

              Docker docs:

              Docker routes container traffic in the nat table, which means that packets are diverted before it reaches the INPUT and OUTPUT chains that ufw uses. Packets are routed before the firewall rules can be applied, effectively ignoring your firewall configuration.

              communism@lemmy.mlC This user is from outside of this forum
              communism@lemmy.mlC This user is from outside of this forum
              [email protected]
              wrote last edited by
              #58

              https://github.com/chaifeng/ufw-docker

              Q 1 Reply Last reply
              1
              • S [email protected]

                My impression from a recent crash course on Docker is that it got popular because it allows script kiddies to spin up services very fast without knowing how they work.

                OWASP was like "you can follow these thirty steps to make Docker secure, or just run Podman instead." https://cheatsheetseries.owasp.org/cheatsheets/Docker_Security_Cheat_Sheet.html

                L This user is from outside of this forum
                L This user is from outside of this forum
                [email protected]
                wrote last edited by
                #59

                That is definitely one of the crowds but there are also people like me that just are sick and tired of dealing with python, node, ruby depends. The install process for services has only continued to become increasingly more convoluted over the years. And then you show me an option where I can literally just slap down a compose.yml and hit "docker compose up - d" and be done? Fuck yeah I'm using that

                1 Reply Last reply
                9
                • Q [email protected]

                  It's okay for simple things, but too simple for anything beyond that, IMO. One important issue is that unlike with Portainer you can't edit the container in any way without deleting it and configuring it again, which is quite annoying if you just want to change 1 environment variable (GH Issue). Perhaps they will add a quadlet config tool to cockpit sometime in the future.

                  G This user is from outside of this forum
                  G This user is from outside of this forum
                  [email protected]
                  wrote last edited by
                  #60

                  i mean, you can just redeploy the container with the updated variable. thats kinda how they work.

                  1 Reply Last reply
                  4
                  • mangopenguin@lemmy.blahaj.zoneM [email protected]

                    Linux lets you do whatever you want and that's a side effect of it, there's nothing preventing an app from messing with things it shouldn't.

                    W This user is from outside of this forum
                    W This user is from outside of this forum
                    [email protected]
                    wrote last edited by
                    #61

                    there's nothing preventing an app from messing with things it shouldn't.

                    that's not exactly a linux specialty

                    1 Reply Last reply
                    2
                    • P [email protected]

                      Ok, see the sandboxing makes sense and for a language like C++ makes sense. But every other language I used it with is already portable to every OS I have access to, so it feels like that defeats the benefit of using a language that's portable.

                      W This user is from outside of this forum
                      W This user is from outside of this forum
                      [email protected]
                      wrote last edited by
                      #62

                      it does not solve portability across OS families. you can't run a windows based docker image on linux, and running a linux image on windows is solved by starting a linux VM.

                      P 1 Reply Last reply
                      1
                      • Q [email protected]

                        ufw just manages iptables rules, if docker overrides those it's on them IMO

                        P This user is from outside of this forum
                        P This user is from outside of this forum
                        [email protected]
                        wrote last edited by
                        #63

                        iptables is deprecated for like a decade now, the fact that both still use it might be the source of the problem here.

                        1 Reply Last reply
                        0
                        • W [email protected]

                          it does not solve portability across OS families. you can't run a windows based docker image on linux, and running a linux image on windows is solved by starting a linux VM.

                          P This user is from outside of this forum
                          P This user is from outside of this forum
                          [email protected]
                          wrote last edited by
                          #64

                          Oh, fair. That's a good point.

                          1 Reply Last reply
                          0
                          • S [email protected]

                            CLI and Quadlet? /s but seriously, that's what I use lol

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

                            Quadlets are so nice.

                            1 Reply Last reply
                            1
                            • communism@lemmy.mlC [email protected]

                              https://github.com/chaifeng/ufw-docker

                              Q This user is from outside of this forum
                              Q This user is from outside of this forum
                              [email protected]
                              wrote last edited by
                              #66

                              That caused issues with Docker containers being unable to communicate with eachother for me.

                              T 1 Reply Last reply
                              0
                              • M [email protected]

                                I mean if you're hosting anything publicly, you really should have a dedicated firewall

                                Q This user is from outside of this forum
                                Q This user is from outside of this forum
                                [email protected]
                                wrote last edited by
                                #67

                                Do you mean a hardware firewall?

                                M 1 Reply Last reply
                                0
                                • D [email protected]

                                  I still need to allow the ports in my firewall when using podman, even when I bind to 0.0.0.0.

                                  Q This user is from outside of this forum
                                  Q This user is from outside of this forum
                                  [email protected]
                                  wrote last edited by
                                  #68

                                  Also when using a rootfull Podman socket?

                                  D 2 Replies Last reply
                                  1
                                  • G [email protected]

                                    I assume portainer communicates via the docker socket? If so, couldn’t you just point portainer to the podman socket?

                                    Q This user is from outside of this forum
                                    Q This user is from outside of this forum
                                    [email protected]
                                    wrote last edited by
                                    #69

                                    Portainer Docs | Install Portainer CE with Podman on Linux The official docs also mention doing that.

                                    1 Reply Last reply
                                    2
                                    • Q [email protected]

                                      Also when using a rootfull Podman socket?

                                      D This user is from outside of this forum
                                      D This user is from outside of this forum
                                      [email protected]
                                      wrote last edited by
                                      #70

                                      I haven't tried rootful since I haven't had issues with rootless. I'll have to check on that and get back to you.

                                      1 Reply Last reply
                                      0
                                      • Q [email protected]

                                        Docker docs:

                                        Docker routes container traffic in the nat table, which means that packets are diverted before it reaches the INPUT and OUTPUT chains that ufw uses. Packets are routed before the firewall rules can be applied, effectively ignoring your firewall configuration.

                                        ohshit604@sh.itjust.worksO This user is from outside of this forum
                                        ohshit604@sh.itjust.worksO This user is from outside of this forum
                                        [email protected]
                                        wrote last edited by
                                        #71

                                        This post inspired me to try podman, after it pulled all the images it needed my Proxmox VM died, VM won’t boot cause disk is now full. It’s currently 10pm, tonight’s going to suck.

                                        S 1 Reply Last reply
                                        7
                                        • ohshit604@sh.itjust.worksO [email protected]

                                          This post inspired me to try podman, after it pulled all the images it needed my Proxmox VM died, VM won’t boot cause disk is now full. It’s currently 10pm, tonight’s going to suck.

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

                                          eh, booting into single user mod should work fine, uninstall podman and init 5

                                          ohshit604@sh.itjust.worksO 1 Reply Last reply
                                          2
                                          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