3 ms·
A filter matches lines in the nginx log using regular expressions. If the line matches, it uses another regexp to extract the IP address, and then calls out to
by semanticist 8y ago
A filter matches lines in the nginx log using regular expressions. If the line matches, it uses another regexp to extract the IP address, and then calls out to scripts to block that IP address.
I'm not going to post the exact configuration files I use, but the GitHub repo for fail2ban contains examples.
https://github.com/fail2ban/fail2ban/blob/0.11/config/filter.d/apache-shellshock.conf https://github.com/fail2ban/fail2ban/blob/0.11/config/filter...
That's a filter that protects Apache against the 'shellshock' (https://en.wikipedia.org/wiki/Shellshock_(software_bug) https://en.wikipedia.org/wiki/Shellshock_(software_bug)) vulnerability, for example.