Skip to content

jnelle/Telegram-IP-Check-Bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Telegram-IP-Check-Bot

This script will parse NGINX- and dmesg-logs and checks the ip addresses found there using the AbuseIPDB and Alienvault-API to see if it is a malicious ip and blocks it if necessary.

Quick start for Debian/Ubuntu based installations

  1. wget https://raw.githubusercontent.com/Billaids/Telegram-IP-Check-Bot/master/check_bot.sh
  2. chmod +x check_bot.sh
  3. Enable iptables logging:
  sudo iptables -A INPUT -j LOG
  sudo iptables -A FORWARD -j LOG
  sudo ip6tables -A INPUT -j LOG
  sudo ip6tables -A FORWARD -j LOG
  1. Install jq
  sudo apt-get install jq
  1. Get Telegram Bot API-Key and your CHATID
  2. Get an AbuseIPDB and Alienvault API-Key
  3. fill in your MAC-Address from ethernet adapter and server ip etc.
  4. run bot, if you filled in empty vars.

WARNING!

It might be possible that this script blocks ip-addresses that are actually harmless. It checks for the abusescore from AbuseIPDB and Alienvault (Threadscore), which can result in false-positives.

Screenshot

Contributors

@KEN @uberhahn