A Python Flask-based secure authentication system that manages network access by enforcing user login through a custom captive portal.
A secure authentication system for managing network access through a firewall. This project helps implement a custom captive portal, requiring users to authenticate before accessing the internet.
This tool is used to control internet access within a local network by requiring users to authenticate before gaining connectivity. Network administrators or small office/home users can deploy it to enforce access restrictions and monitor user authentication via a simple web interface.
The current startup method triggers a Windows UAC prompt requiring manual approval each boot, which may be inconvenient. Users should ensure the correct file paths are set in the startup script. Credentials are hardcoded by default, so securing or integrating a database for credential management is recommended. Firewall rules must allow access to the configured IP and port.
Ensure Python is installed
Run 'pip install flask' to install dependencies
Run 'python auth_server.py' to start the authentication server
Place 'start_auth_server.bat' in 'shell:startup' folder to auto-start on Windows boot
Edit 'start_auth_server.bat' to include the absolute path to 'auth_server.py'
Modify 'auth_server.py' to bind the server to the desired IP address
pip install flask
Installs the Flask dependency required to run the authentication server
python auth_server.py
Starts the Python Flask authentication server accessible on the configured IP
Place 'start_auth_server.bat' in 'shell:startup'
Configures the authentication server to automatically launch on Windows system boot
Modify 'start_auth_server.bat' with the absolute path to 'auth_server.py'
Ensures the startup script correctly locates and runs the authentication server
app.run(host='192.168.1.1', port=5000)
Example modification in 'auth_server.py' to bind the server to a specific IP address