So it’s my first time setting up a VPS. Is it to be expected to ban 54 IPs over a 12h timespan? The real question for me is whether this is normal or too much.

$ sudo fail2ban-client status sshd
Status for the jail: sshd
|- Filter
|  |- Currently failed: 3
|  |- Total failed:     586
|  `- Journal matches:  _SYSTEMD_UNIT=ssh.service + _COMM=sshd
`- Actions
   |- Currently banned: 51
   |- Total banned:     54
   `- Banned IP list:   [list of IPs]

fail2ban sshd.conf

$ sudo cat /etc/fail2ban/jail.d/sshd.conf 
[sshd]
enabled = true
mode = aggressive
port = ssh
backend = systemd
maxretry = 3
findtime = 600
bantime = 86400

I have disabled SSH login via password. And only allow it over an SSH key.

$ sudo sshd -T | grep -E -i 'ChallengeResponseAuthentication|PasswordAuthentication|UsePAM|PermitRootLogin'
usepam no
permitrootlogin no
passwordauthentication no
      • pHr34kY@lemmy.world
        link
        fedilink
        English
        arrow-up
        0
        ·
        1 day ago

        The smallest possible subnet has 18.4 quintillion addresses.

        You can’t scan it before encountering the heat death of the universe.

        Outgoing connections are made on a different address that does not accept incoming connections. You never disclose your real IP when browsing.

        So, no. It can’t be done.

        • Possibly linux@lemmy.zip
          link
          fedilink
          English
          arrow-up
          0
          ·
          15 hours ago

          That’s only if you use the brute force method

          IPs are not secret and can be leaked in various ways. Don’t count on IPv6 as a security mechanism as that’s not what it was designed to do

          • pHr34kY@lemmy.world
            link
            fedilink
            English
            arrow-up
            0
            ·
            13 hours ago

            It’s literally called “IPv6 privacy extension”. It’s what it does.

            Unless you’re in the middle and fowarding the packets, you won’t stumble across a connectable IPv6 endpoint.

            • Possibly linux@lemmy.zip
              link
              fedilink
              English
              arrow-up
              0
              ·
              13 hours ago

              The IPv6 privacy extensions are something else entirely and are not used for anything server side

              You should research IPv6 port scanning techniques. It is harder than IPv4 but still doable depending on the context. If your goal is simply to reduce network traffic due to bots that’s one thing. However, it should not be considered a security mechanism.