File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -5,14 +5,14 @@ A simple guide to setup fail2ban action for sending an alert message to discord
55 - Go to your Discord Server → Select a channel.
66 - Click Edit Channel → Integrations → Webhooks → New Webhook.
77 - Name it (ex: Fail2Ban Alerts) and copy the Webhook URL.
8- - Example: https://discord.com/api/webhooks/1234567890/abcdefghijklmnopqrstuvwxyz
8+ - Example: ` https://discord.com/api/webhooks/1234567890/abcdefghijklmnopqrstuvwxyz `
99
10102 . Create the Discord Notification Script
1111 - install ` jq ` :
1212 ``` bash
1313 sudo apt install jq
1414 ```
15- - Create the file /usr/local/bin/fail2ban-discord.sh:
15+ - Create the file ` /usr/local/bin/fail2ban-discord.sh` :
1616 ` ` ` bash
1717 #! /bin/bash
1818
@@ -43,7 +43,7 @@ A simple guide to setup fail2ban action for sending an alert message to discord
4343 sudo chmod +x /usr/local/bin/fail2ban-discord.sh
4444 ` ` `
45453. Create a Custom Fail2Ban Action
46- - Create /etc/fail2ban/action.d/discord-ban.conf:
46+ - Create ` /etc/fail2ban/action.d/discord-ban.conf` :
4747 ` ` ` ini
4848 [Definition]
4949 actionstart =
You can’t perform that action at this time.
0 commit comments