Skip to content

Instantly share code, notes, and snippets.

View clickworkorange's full-sized avatar

Ola Tuvesson clickworkorange

  • clickworkorange Ltd
View GitHub Profile
@sander1
sander1 / nginx.local
Last active January 23, 2024 15:40
fail2ban filters for nginx
# fail2ban filter configuration for nginx, by Sander
# 1) Catch WordPress related requests (we don't have WordPress on this server)
# 2) Catch requests for certain scripts we don't host
# 3) Catch script requests we don't host
# 4) Catch referer spam
[Definition]
failregex = ^<HOST> .* "(GET|POST|HEAD) /+(?i)(wp(-|/)|xmlrpc\.php|\?author=1)
^<HOST> .* "(GET|POST|HEAD|PROPFIND) /+(?i)(a2billing|admin|apache|axis|blog|cfide|cgi|cms|config|etc|\.git|hnap|inc|jenkins|jmx-|joomla|lib|linuxsucks|msd|muieblackcat|mysql|myadmin|n0w|owa-autodiscover|pbxip|php|pma|recordings|sap|sdk|script|service|shell|sqlite|vmskdl44rededd|vtigercrm|w00tw00t|webdav|websql|wordpress|xampp|xxbb)
@jhollinger
jhollinger / thin
Created November 4, 2012 14:51 — forked from sorah/thin
/etc/init.d/thin - thin init script with bundle exec
#!/bin/bash
DAEMON=/usr/local/bin/thin
BUNDLE=/usr/local/bin/bundle
CONFIG_PATH=/etc/thin
SCRIPT_NAME=/etc/init.d/thin
# Exit if the package is not installed
[ -x "$DAEMON" ] || exit 0
invoke()