From df5729b55c11a7f5d2b2d9e263c57bcd5e80a95a Mon Sep 17 00:00:00 2001 From: Blackwhitebear8 Date: Tue, 5 Aug 2025 19:41:05 +0200 Subject: [PATCH] Update README.md --- README.md | 92 ++++++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 71 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index cb4f67c..8a43ea3 100644 --- a/README.md +++ b/README.md @@ -1,30 +1,80 @@ +![Header](https://git.pixelhosting.nl/PixelHosting/Router-tools/raw/branch/main/example/header.png) + # AS215085.net Router tools -```cd /opt && git clone https://git.pixelhosting.nl/Blackwhitebear8/Router-tools.git``` +This document outlines the installation and configuration of the AS215085.net Router Tools. -### Requirements -* A working and configured Vyos router -* A working and configured Librenms instance +## Screenshots + +[See the screenshots of the application here](https://git.pixelhosting.nl/PixelHosting/Router-tools/src/branch/main/example) + + +## Installation + +Clone the Git repository to the `/opt` directory on your server. + +```bash +cd /opt && git clone https://git.pixelhosting.nl/Blackwhitebear8/Router-tools.git +``` + + +## Prerequisites +Before you begin, ensure the following systems are operational and correctly configured: +* A working and configured VyOS router +* A working and configured LibreNMS instance * A working and configured Akvorado instance -### Vyos config -1. Login to Vyos and enter configure mode. -2. ```set service https api keys id api key 'YourKey'``` -3. ```set service https listen-address 'VyosIP'``` -4. ```set service https port '80'``` -5. ```set service https allow-client address '0.0.0.0/0'``` -### App config -1. Edit .env and fill in the details -2. ```apt install -y gunicorn python3 python3-jinja2 python3-flask python3-gunicorn python3-dotenv python3-requests python3-flask python3-matplotlib python3-networkx``` -3. ```gunicorn -w 4 -b 0.0.0.0:5000 app:app``` +## Configuration +Follow the steps below to configure the tools. + +### 1. VyOS API Configuration +1. Log in to your VyOS router and enter configuration mode. +2. Set up an API key. Replace ```YourKey``` with your own unique and secure key. + ```bash + set service https api keys id api key 'YourKey' + ``` +3. Set the IP address for the API to listen on. Replace ```VyosIP``` with your router's IP address. + ```bash + set service https listen-address 'VyosIP' + ``` +4. Set the listening port for the API (port 80 is used in this example). + ```bash + set service https port '80' + ``` +5. Allow clients to connect. **Note:** ```0.0.0.0/0``` allows all IP addresses, which is insecure for production. You should restrict this to the IP address of the server where the tools are running. + ```bash + set service https allow-client address '0.0.0.0/0' + ``` +6. Commit your changes and save the configuration. + ```bash + commit + save + ``` + +### 2. Application Configuration +Next, configure the application itself. +1. Install the required Python packages: + ```bash + apt update + apt install -y gunicorn python3 python3-jinja2 python3-flask python3-gunicorn python3-dotenv python3-requests python3-matplotlib python3-networkx + ``` + + +## Running the Application +Once the configuration is complete, you can run the application using Gunicorn. +```bash +gunicorn -w 4 -b 0.0.0.0:5000 app:app +``` +The application will now be accessible on port ```5000``` of your server. + ## License -```This project is licensed under the Apache License 2.0 with the Commons Clause restriction.``` - -```You may use, modify, and distribute this work for personal and non-commercial purposes only.``` - -**You must provide a clear link or reference to the original project when redistributing or using this work.** - -```Commercial use is strictly prohibited.``` \ No newline at end of file +> This project is licensed under the **Apache License 2.0** with the **Commons Clause** restriction. +> +> You may use, modify, and distribute this work for personal and non-commercial purposes only. +> +> **You must provide a clear link or reference to the original project when redistributing or using this work.** +> +> Commercial use is strictly prohibited. \ No newline at end of file