KVM-Router is a lightweight, web-based router management tool designed for VPS/Locked-Down environments. With features like port forwarding, Tailscale integration (Not via UI), and the ability to function as a Tailscale exit node, it provides flexibility and control over your network.
- Port Management: Easily add and remove port forwarding rules through a web interface.
- Tailscale Integration: Use your Router/Host/VPS as a Tailscale exit node for public access to local resources with an public-ipv4 router (GCNAT)
- Router Info Dashboard: View router information, such as IP address, model, firmware, CPU, and memory stats.
- Password Management: Reset the default admin password via the web interface.
- Python 3.x (Python 3.10 Recommended)
- Flask
- OpenSSL (to generate SSL certificates)
- socat (to port forward)
-
Clone the repository:
git clone https://github.com/katy-the-kat/KVM-Router cd KVM-Router/service -
Install dependencies:
pip3 install flask
-
Generate a self-signed SSL certificate:
openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout cert.key -out cert.pem
-
Run the application:
python3 app.py
-
Access the application in your browser at
https://<your-server-ip>(default port: 443).
- Username:
admin - Password:
password
- Edit the following variables in
main.pyto match your setup:ROUTER_IP = '0.0.0.0' # Router IP MODEL = 'M1' # Router Model RAM = '1GB' # Router RAM Size CPU = 'Intel Atom' # Router CPU USERNAME = 'admin' # Default Username, Please Change. PASSWORD = 'password' # Default Password, Please Change.
app.py: Main application file containing the backend logic.templates/: Directory containing HTML + CSS templates for the web interface.ports.txt: File used to store port forwarding rules.
-
Add a Port:
- Navigate to the "Add Port" page.
- Enter the
Router Port,Target Port, andIP Addressof the target device. - Submit the form to add the port forwarding rule.
-
Remove a Port:
- Go to the "Remove Port" page.
- Enter the
Router Portto remove. - Submit the form to delete the port forwarding rule.
-
View Active Ports:
- Visit the "Port Dashboard" to see all active port forwarding rules.
- Access the "Reset Password" page from the dashboard.
- Enter and confirm your new password.
- Navigate to the "Info Dashboard" to view:
- Router IP address
- Active ports count
- Router model
- Firmware version
- CPU and memory specs
- By default, the application runs on port 443 using HTTPS.
- The router uses
socatfor port forwarding. Ensuresocatis installed on your server. - Tailscale integration allows a Host/VPS to act as an exit node or connect to your local network to a public ipv4 address.
Feel free to submit pull requests or issues to improve KVM-Router. Contributions are always welcome!
- Created by
discord.gg/dell. - Powered by Flask and Socat.