deividgdt / fail2ban_telegram_notifications Goto Github PK
View Code? Open in Web Editor NEWSending fail2ban notifications using a Telegram bot
License: GNU General Public License v3.0
Sending fail2ban notifications using a Telegram bot
License: GNU General Public License v3.0
When I add the code to my jail.local,
action = iptables[name=nginx-custom, port=80, protocol=tcp]
telegram
the IP is not stopped anymore. It is still in the iptable, but it I can still access the server from that ip. Any thoughts?
Hola, muchas gracias por tu aporte.
Al intentar hacer funcionar el script ejecutando solo /etc/fail2ban/scripts/send_telegram_notif.sh -b
Me da este error: -bash: syntax error near unexpected token `newline'
Sabes a que se debe?
Gracias
Hello! Your script works great for me at the first try. I found a very good tutorial from you in NextCloud Support Forum.
Now, I would like to pass to Telegram the name of the Jail that block the IP.
Looking at /etc/fail2ban/jail.conf
I saw:
# The simplest action to take: ban only
action_ = %(banaction)s[name=%(__name__)s, port="%(port)s", protocol="%(protocol)s", chain="%($
And:
# "filter" defines the filter to use by the jail.
# By default jails have names matching their filter name
#
filter = %(__name__)s[mode=%(mode)s]
So... is name=%(__name__)s,
the way of obtain the jail name? If yes, could you help me edit your script to make possible send the jail name?
To show for example this message in Telegram:
The IP: 150.136.60.xxx has been banned by 'apache-badbots'
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.