Giter Club home page Giter Club logo

Comments (4)

leeclemens avatar leeclemens commented on July 23, 2024

At least on CentOS 6, the pid in syslog is of the child (the attempt connection that failed), as opposed to the parent process's pid in /var/run/sshd.pid.

from fail2ban.

leeclemens avatar leeclemens commented on July 23, 2024

Considering fail2ban largely deals with failed login attempts (SSH), the SSH pid is essentially ephemeral and not linked to a parent for very long - I'm not sure how such an association could be reliably be made between the parent pid (SSH) and the failed log in SSH pid's. And if other applications behave differently (thread vs process) fail2ban would also need to understand all of those relationships.

from fail2ban.

sebres avatar sebres commented on July 23, 2024

I've tried some time ago with a small change on my fail2ban, where #1698 was already implemented, so I could get the PID from the several filters, by adding <F-PID>\S+</F-PID> (and using a simple solution by checking of PID with pid_exists in failmanager).
It works as expected... But not for the services like sshd, because of session- resp. connection-related pid, so fail2ban misses the failure sporadic, if the connection was closed too fast after failure (pid_exists says False).
I can try to cherry-pick it, if someone needed.

from fail2ban.

sebres avatar sebres commented on July 23, 2024

Playing a bit with this I can judge that this approach is hardly suitable (as for PID validation), at least turns out to be not really practicable, but also too error-prone.
Thus I tend to close it at the moment.
Please reopen if the interest is still existing.

from fail2ban.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.