I want to set up ufw on my server, but something wrong here. Even when I trying to block 22 port ssh still working and nothing changing. I have ufw enabled, but nothing works.

    • @[email protected]
      link
      fedilink
      English
      73 days ago

      So you want to block port 22? Yet the rule you added allows access, or am I misunderstanding?

      You probably need to be DENY instead of ALLOW if that’s what you’re wanting to accomplish.

      • @bmcgonag
        link
        English
        43 days ago

        This! You have it set to “Allow”, so it’s allowing it. You need to set it to Deny.

              • Possibly linux
                link
                fedilink
                English
                32 days ago
                sudo ufw delete allow 22
                

                Is this a public facing server? If it isn’t the online port port scanners will not work as they are scanning your public IP. Also they are unreliable in general. Best tool for the job is nmap. It has a ton of config options so you will need to do some reading. (Definitely worth the learn)

        • @[email protected]
          link
          fedilink
          English
          73 days ago

          Do you have something listening on port 52038 that will respond to a port scan? If not it will report as closed.

        • @[email protected]
          link
          fedilink
          English
          43 days ago

          That’s a website tool checking? It’s almost certainly only going to check TCP, since most of them don’t do anything with UDP because it’s… more complicated.

          You may need to find an alternate way to do that, something like iperf or netcat (nc -u ip port)

          • Ace! _SL/S
            link
            fedilink
            English
            2
            edit-2
            2 days ago

            nmap works great for this

            traceroute might also be usable vith the -p switch I guess?