Update README.md
This commit is contained in:
parent
1a73416adb
commit
df5729b55c
1 changed files with 71 additions and 21 deletions
92
README.md
92
README.md
|
|
@ -1,30 +1,80 @@
|
||||||
|

|
||||||
|
|
||||||
# AS215085.net Router tools
|
# 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
|
## Screenshots
|
||||||
* A working and configured Vyos router
|
|
||||||
* A working and configured Librenms instance
|
[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
|
* 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
|
## Configuration
|
||||||
1. Edit .env and fill in the details
|
Follow the steps below to configure the tools.
|
||||||
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```
|
### 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
|
## License
|
||||||
|
|
||||||
```This project is licensed under the Apache License 2.0 with the Commons Clause restriction.```
|
> 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 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.**
|
> **You must provide a clear link or reference to the original project when redistributing or using this work.**
|
||||||
|
>
|
||||||
```Commercial use is strictly prohibited.```
|
> Commercial use is strictly prohibited.
|
||||||
Loading…
Add table
Add a link
Reference in a new issue