{"id":16162129,"url":"https://github.com/deividgdt/fail2ban_telegram_notifications","last_synced_at":"2025-03-18T22:30:57.752Z","repository":{"id":55476133,"uuid":"256819053","full_name":"deividgdt/fail2ban_telegram_notifications","owner":"deividgdt","description":"Sending fail2ban notifications using a Telegram bot","archived":false,"fork":false,"pushed_at":"2021-10-12T13:12:33.000Z","size":40,"stargazers_count":29,"open_issues_count":1,"forks_count":8,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-17T00:07:31.195Z","etag":null,"topics":["bot","fail2ban","fail2ban-telegram-notifications","notifications","telegram"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/deividgdt.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-04-18T17:59:17.000Z","updated_at":"2025-02-07T08:37:50.000Z","dependencies_parsed_at":"2022-08-15T01:10:48.005Z","dependency_job_id":null,"html_url":"https://github.com/deividgdt/fail2ban_telegram_notifications","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deividgdt%2Ffail2ban_telegram_notifications","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deividgdt%2Ffail2ban_telegram_notifications/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deividgdt%2Ffail2ban_telegram_notifications/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deividgdt%2Ffail2ban_telegram_notifications/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/deividgdt","download_url":"https://codeload.github.com/deividgdt/fail2ban_telegram_notifications/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244318443,"owners_count":20433904,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bot","fail2ban","fail2ban-telegram-notifications","notifications","telegram"],"created_at":"2024-10-10T02:29:10.249Z","updated_at":"2025-03-18T22:30:57.477Z","avatar_url":"https://github.com/deividgdt.png","language":"Shell","funding_links":["https://ko-fi.com/U7U01LTQB"],"categories":[],"sub_categories":[],"readme":"# Fail2ban Telegram Notifications\n\n![](https://deividsdocs.files.wordpress.com/2020/04/telegram_notifications_fail2ban.jpg)\n\nSending **fail2ban** notifications using a **Telegram** bot\n\n## Installation and configuration\n- Add the following two lines, for example, to **SSHD** in the file **/etc/fail2ban/jail.conf**, make sure to tab the word **telegram**.\n  \n  ```sh\n  action  = iptables[name=SSH, port=22, protocol=tcp]\n  \t\ttelegram\n  ```\n  Example:\n  \n  ![](https://deividsdocs.files.wordpress.com/2020/04/fail2ban-sshd-conf.png)\n  \n- Download the file **telegram.conf** and move it to **/etc/fail2ban/action.d/**\n- Download the file **send_telegram_notif.sh** move it to **/etc/fail2ban/scripts/**\n- Modify the file **/etc/fail2ban/scripts/send_telegram_notif.sh** and add your **Token** and your **Chat ID**:\n\n  ```sh\n  telegramBotToken=YOUR_BOT_TOKEN\n  telegramChatID=YOUR_CHAT_ID\n  ```\n- Make the file executable\n\n  ```sh\n  chmod +x /etc/fail2ban/scripts/send_telegram_notif.sh\n  ```\n- Restart the fail2ban service and enjoy!\n\n  ```sh\n  systemctl restart fail2ban\n  ```\n \n## Usage\n+ /etc/fail2ban/scripts/send_telegram_notif.sh -a [ start || stop ] || [ -n $NAME -b $IP || -n $NAME -u $IP ]\"\n  + -a (action)\n  + -n (jail name)\n  + -b (ban)\n  + -u (unban)\n  \n## Buy me a coffe\n[![ko-fi](https://www.ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/U7U01LTQB)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeividgdt%2Ffail2ban_telegram_notifications","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdeividgdt%2Ffail2ban_telegram_notifications","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeividgdt%2Ffail2ban_telegram_notifications/lists"}