This repository contains a Bash script that automates the installation and configuration of Darkstat, a network traffic analyzer for Linux. The script ensures that all necessary packages are installed, configures the network interface, and starts the Darkstat service.
-
Clone the Repository (optional):
git clone https://github.com/DrSaeedHub/Darkstat-Fast-Install.git cd Darkstat-Fast-Install -
Run the Script: You can run the script directly using the following command:
bash <(curl -Ls https://raw.githubusercontent.com/DrSaeedHub/Darkstat-Fast-Install/main/setup_darkstat.sh)Or if you have cloned the repository, run:
sudo bash setup_darkstat.sh
- Installs required packages (
curl,gnupg2,unzip,git, anddarkstat). - Automatically detects the network interface.
- Configures Darkstat with a default configuration.
- Opens the required firewall port for Darkstat.
- Enables and starts the Darkstat service.
- A Linux-based operating system (Debian/Ubuntu recommended).
- Root privileges are required to run this script.
The script performs the following tasks:
- ASCII Art Header: Displays a welcoming header in green color.
- Root Check: Ensures the script is run with root privileges.
- System Update: Updates the package list and upgrades the installed packages.
- Package Installation: Installs
curl,gnupg2,unzip,git, anddarkstat. - Network Interface Detection: Automatically detects the network interface to be used by Darkstat.
- Configuration File Creation: Generates a configuration file at
/etc/darkstat/init.cfgwith the detected interface and other settings. - Firewall Configuration: Configures UFW to allow traffic on port 666/tcp.
- Service Management: Reloads systemd, enables the Darkstat service, and starts it.
- Completion Message: Displays a success message upon completion.
Contributions are welcome! Please feel free to submit issues or pull requests.
- Darkstat - Network traffic analyzer.