Skip to content

Instantly share code, notes, and snippets.

@kddlb
Created January 14, 2024 23:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kddlb/4ea43b2123e1275786951e34c47a91da to your computer and use it in GitHub Desktop.
Save kddlb/4ea43b2123e1275786951e34c47a91da to your computer and use it in GitHub Desktop.
Fail2Ban action for ntfy.sh
[Definition]
actionstart =
actionstop =
actioncheck =
actionban = lgm=$(printf '%%.10240s\n...' "<matches>"); curl -L 'https://ntfy.sh/<topíc_name>' -H 'Title: IP address <ip> has been banned!' -H 'Tags: globe_with_meridians,hammer' -H 'Content-Type: text/plain' -H 'Actions: view, IPinfo.io, https://ipinfo.io/<ip>; view, AbuseIPDB, https://www.abuseipdb.com/check/<ip>' -d "$lgm"
actionunban =
[Init]
name = ntfy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment