Update README.md

This commit is contained in:
Sefinek 2024-08-20 10:40:18 +02:00
parent 0db9b490d5
commit 43e84912c7

100
README.md
View file

@ -1,88 +1,88 @@
# 🛡️ UFW AbuseIPDB Reporter # 🛡️ UFW AbuseIPDB Reporter
Narzędzie, które analizuje logi firewalla UFW i zgłasza złośliwe adresy IP do bazy danych [AbuseIPDB](https://www.abuseipdb.com). A tool that analyzes UFW firewall logs and reports malicious IP addresses to the [AbuseIPDB](https://www.abuseipdb.com) database.
Jeśli planujesz wprowadzić zmiany w którymkolwiek z plików tego repozytorium, utwórz najpierw jego publiczny fork. If you plan to make changes to any of the files in this repository, please create a public fork first.
<div align="center"> <div align="center">
[<a href="README.md">English</a>] [<a href="README.md">English</a>]
[<a href="README_PL.md">Polish</a>] [<a href="README_PL.md">Polish</a>]
</div> </div>
- [⚙️ Jak to dokładniej działa?](#jak-to-dziala) - [⚙️ How does it work in detail?](#how-it-works)
- [📋 Wymagania](#wymagania) - [📋 Requirements](#requirements)
- [🛠️ Instalacja wymaganych pakietów](#instalacja-wymaganych-pakietow) - [🛠️ Installing required packages](#installing-required-packages)
- [🌍 Wykonaj aktualizacje repozytoriów i oprogramowania](#wykonaj-aktualizacje-repozytoriow-i-oprogramowania) - [🌍 Perform repository and software updates](#perform-repository-and-software-updates)
- [🌌 Zainstaluj wymagane zależności](#zainstaluj-wymagane-zaleznosci) - [🌌 Install required dependencies](#install-required-dependencies)
- [🧪 Testowane systemy operacyjne](#testowane-systemy-operacyjne) - [🧪 Tested operating systems](#tested-operating-systems)
- [📥 Instalacja](#instalacja) - [📥 Installation](#installation)
- [🖥️ Użycie](#uzycie) - [🖥️ Usage](#usage)
- [🔍 Sprawdzenie statusu usługi](#sprawdzenie-statusu-uslugi) - [🔍 Checking service status](#checking-service-status)
- [📄 Przykładowe zgłoszenie](#przykladowe-zgloszenie) - [📄 Example report](#example-report)
- [🤝 Rozwój](#rozwoj) - [🤝 Development](#development)
- [🔑 Licencja MIT](#licencja-mit) - [🔑 MIT License](#mit-license)
## ⚙️ Jak to dokładniej działa?<div id="jak-to-dziala"></div> ## ⚙️ How does it work in detail?<div id="how-it-works"></div>
1. **Monitorowanie logów UFW:** Narzędzie stale śledzi logi generowane przez firewall UFW, poszukując prób nieautoryzowanego dostępu lub innych podejrzanych działań. 1. **Monitoring UFW logs:** The tool continuously monitors logs generated by the UFW firewall, looking for unauthorized access attempts or other suspicious activities.
2. **Analiza zgłoszonego adresu:** Po zidentyfikowaniu podejrzanego adresu IP, skrypt sprawdza, czy adres ten został już wcześniej zgłoszony. 2. **Analyzing the reported address:** After identifying a suspicious IP address, the script checks if the address has already been reported.
3. **Zgłaszanie IP do AbuseIPDB:** Jeśli IP spełnia kryteria, adres jest zgłaszany do bazy danych AbuseIPDB wraz z informacjami o protokole, porcie źródłowym i docelowym itd. 3. **Reporting IP to AbuseIPDB:** If the IP meets the criteria, the address is reported to the AbuseIPDB database with information about the protocol, source port, destination port, etc.
4. **Cache zgłoszonych IP:** Narzędzie przechowuje listę zgłoszonych IP w pliku tymczasowym, aby zapobiec wielokrotnemu zgłaszaniu tego samego adresu IP w krótkim czasie. 4. **Cache of reported IPs:** The tool stores a list of reported IPs in a temporary file to prevent multiple reports of the same IP address in a short period.
## 📋 Wymagania<div id="wymagania"></div> ## 📋 Requirements<div id="requirements"></div>
- **System operacyjny:** Linux z zainstalowanym i skonfigurowanym firewallem UFW. - **Operating System:** Linux with UFW firewall installed and configured.
- **Konto AbuseIPDB:** Wymagane jest konto w serwisie AbuseIPDB [z ważnym tokenem API](https://www.abuseipdb.com/account/api). Token API jest niezbędny. - **AbuseIPDB Account:** An account on the AbuseIPDB service [with a valid API token](https://www.abuseipdb.com/account/api). The API token is required.
- **Zainstalowane pakiety:** - **Installed packages:**
- `wget` lub `curl`: Jedno z tych narzędzi jest wymagane do pobrania [skryptu instalacyjnego](install.sh) z repozytorium GitHub oraz do wysyłania zapytań do API AbuseIPDB. - `wget` or `curl`: One of these tools is required to download the [installation script](install.sh) from the GitHub repository and to send requests to the AbuseIPDB API.
- `jq`: Narzędzie do przetwarzania i parsowania danych w formacie JSON, zwracanych przez API AbuseIPDB. - `jq`: A tool for processing and parsing JSON data returned by the AbuseIPDB API.
- `openssl`: Używane do kodowania i dekodowania tokena API, aby zabezpieczyć dane uwierzytelniające. - `openssl`: Used to encode and decode the API token to secure authentication data.
- `tail`, `awk`, `grep`, `sed`: Standardowe narzędzia Unixowe wykorzystywane do przetwarzania tekstu i analizy logów. - `tail`, `awk`, `grep`, `sed`: Standard Unix tools used for text processing and log analysis.
- **Połączenie z Internetem:** Hm, wydaje, mi się, że jest to oczywiste, prawda? - **Internet connection:** Hm, I think it's obvious, right?
### 🛠️ Instalacja wymaganych pakietów<div id="instalacja-wymaganych-pakietow"></div> ### 🛠️ Installing required packages<div id="installing-required-packages"></div>
#### 🌍 Wykonaj aktualizacje repozytoriów i oprogramowania (wysoko zalecane)<div id="wykonaj-aktualizacje-repozytoriow-i-oprogramowania"></div> #### 🌍 Perform repository and software updates (highly recommended)<div id="perform-repository-and-software-updates"></div>
```bash ```bash
sudo apt update && sudo apt upgrade -y sudo apt update && sudo apt upgrade -y
``` ```
#### 🌌 Zainstaluj wymagane zależności<div id="zainstaluj-wymagane-zaleznosci"></div> #### 🌌 Install required dependencies<div id="install-required-dependencies"></div>
```bash ```bash
sudo apt install -y curl jq openssl ufw sudo apt install -y curl jq openssl ufw
``` ```
### 🧪 Testowane systemy operacyjne<div id="testowane-systemy-operacyjne"></div> ### 🧪 Tested operating systems<div id="tested-operating-systems"></div>
- Ubuntu Server 20.04/22.04 - Ubuntu Server 20.04/22.04
Jeśli dystrybucja, na której uruchomiłeś narzędzie, nie znajduje się na tej liście, a skrypt działa poprawnie, utwórz nowy Issue. Dodam jej nazwę tu. If the distribution you're running the tool on isn't listed here and the script works correctly, please create a new Issue. I'll add its name here.
## 📥 Instalacja<div id="instalacja"></div> ## 📥 Installation<div id="installation"></div>
Aby zainstalować to narzędzie, wykonaj poniższą komendę w terminalu (`sudo` jest wymagane): To install this tool, run the following command in the terminal (`sudo` is required):
```bash ```bash
sudo bash -c "$(curl -s https://raw.githubusercontent.com/sefinek24/UFW-AbuseIPDB-Reporter/main/install.sh)" sudo bash -c "$(curl -s https://raw.githubusercontent.com/sefinek24/UFW-AbuseIPDB-Reporter/main/install.sh)"
``` ```
Skrypt instalacyjny automatycznie pobierze i skonfiguruje narzędzie na Twoim serwerze. Podczas instalacji zostaniesz poproszony o podanie tokena API z AbuseIPDB. The installation script will automatically download and configure the tool on your server. During installation, you will be asked to provide an AbuseIPDB API token.
## 🖥️ Użycie<div id="uzycie"></div> ## 🖥️ Usage<div id="usage"></div>
Po pomyślnej instalacji skrypt będzie działać cały czas w tle, monitorując logi UFW i automatycznie zgłaszając złośliwe adresy IP. After successful installation, the script will run continuously in the background, monitoring UFW logs and automatically reporting malicious IP addresses.
Narzędzie nie wymaga dodatkowych działań użytkownika po instalacji. Warto jednak od czasu do czasu sprawdzić jego działanie oraz aktualizować skrypt na bieżąco (wywołując polecenie instalacyjne). The tool requires no additional user action after installation. However, it's worth occasionally checking its operation and updating the script regularly (by running the installation command).
Jeśli jednak chcesz mieć pewność, że wszystko działa prawidłowo, możesz pójść sobie wypić piwo. Po skończonym alkoholizowaniu się sprawdź, czy jest wszystko ok. If you want to be sure that everything is working properly, you can go and have a beer. After finishing your drink, check if everything is okay.
Serwery otwarte na świat są nieustannie skanowane przez boty, które zazwyczaj szukają podatności lub jakichkolwiek innych luk w zabezpieczeniach. Servers open to the world are constantly scanned by bots, usually looking for vulnerabilities or other security gaps.
Więc nie zdziw się, jeśli następnego dnia liczba zgłoszeń na AbuseIPDB przekroczy tysiąc. So don't be surprised if the next day, the number of reports to AbuseIPDB exceeds a thousand.
### 🔍 Sprawdzenie statusu usługi<div id="sprawdzenie-statusu-uslugi"></div> ### 🔍 Checking service status<div id="checking-service-status"></div>
Jeśli narzędzie zostało zainstalowane jako usługa systemowa, możesz sprawdzić jej status za pomocą poniższej komendy: If the tool was installed as a system service, you can check its status using the following command:
```bash ```bash
sudo systemctl status abuseipdb-ufw.service sudo systemctl status abuseipdb-ufw.service
``` ```
Aby zobaczyć bieżące logi generowane przez proces, użyj polecenia: To see the current logs generated by the process, use the command:
```bash ```bash
journalctl -u abuseipdb-ufw.service -f journalctl -u abuseipdb-ufw.service -f
``` ```
### 📄 Przykładowe zgłoszenie<div id="przykladowe-zgloszenie"></div> ### 📄 Example report<div id="example-report"></div>
``` ```
Blocked by UFW (TCP on port 848). Blocked by UFW (TCP on port 848).
Source port: 42764 Source port: 42764
@ -96,8 +96,8 @@ https://github.com/sefinek24/UFW-AbuseIPDB-Reporter
``` ```
## 🤝 Rozwój<div id="rozwoj"></div> ## 🤝 Development<div id="development"></div>
Jeśli chcesz przyczynić się do rozwoju tego projektu, śmiało stwórz nowy [Pull request](https://github.com/sefinek24/UFW-AbuseIPDB-Reporter/pulls). Z pewnością to docenię! If you want to contribute to the development of this project, feel free to create a new [Pull request](https://github.com/sefinek24/UFW-AbuseIPDB-Reporter/pulls). I will definitely appreciate it!
## 🔑 Licencja MIT<div id="licencja-mit"></div> ## 🔑 MIT License<div id="mit-license"></div>
Copyright 2024 © by [Sefinek](https://sefinek.net). Wszelkie prawa zastrzeżone. Zobacz plik [LICENSE](LICENSE), aby uzyskać więcej informacji. Copyright 2024 © by [Sefinek](https://sefinek.net). All rights reserved. See the [LICENSE](LICENSE) file for more information.