pyronear / pyronear/pyro-sys-setup
RUT Router Provisioning Automation
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
Goal
Provide a simple, repeatable way to provision Teltonika RUT routers using a single shell script and environment variables.
The goal is to replace manual web UI configuration with a minimal SSH-based setup process.
Scope
This automation covers:
- Initial admin password setup/change
- SIM PIN configuration (if required)
- Firewall rules to block Internet access for camera devices
No additional features are included.
User Workflow (suggested)
cp router/.env.example router/.env
# edit values
nano router/.env
# run the script
./router/provision.sh
Steps:
- Connect router to local network
- Ensure router is reachable via SSH
- Insert SIM card
- Fill
.env - Run provisioning script
- Wait for completion (may include reboot)
- Run post-provisioning connectivity check (admin access + WAN/internet via mobile)
Configuration Variables
Required
ROUTER_IP=192.168.1.1
DEFAULT_ADMIN_PASSWORD=password_written_on_device
ADMIN_PASSWORD=your_admin_password
Optional
SIM_PIN=1234
CAMERA_IPS=192.168.1.50,192.168.1.51,192.168.1.52
Provisioning Tasks
The provision.sh script must:
- Connect to router via SSH
- Change or enforce administrator password
- Configure SIM PIN if provided
- Apply firewall rules to block Internet access for camera IPs (if provided)
- Persist configuration changes
- Reload firewall and/or network services
- Reboot router if required to apply changes safely
- Run checks
Firewall Behavior
If CAMERA_IPS is defined:
- Each IP must be blocked from accessing WAN (Internet)
- LAN-to-LAN communication must remain unaffected
- Internal access from trusted devices must remain possible
Implementation Notes
- SSH access is assumed to be available on first provisioning
- Configuration should use standard OpenWrt/RutOS mechanisms (e.g.
uci) - Script should be idempotent when possible but this is not a strict requirement
- Fail fast on SSH connection or authentication errors
Documentation Requirement
The main README must include a short section:
Router Setup
cp router/.env.example router/.env
vim router/.env
./router/provision.sh
No additional explanation required in the main README.
Non-Goals
- No web UI automation
- No cloud or remote management platform
- No fleet orchestration system
- No VLAN / network redesign
- No long-term configuration management
Future Improvements (optional)
- DHCP reservation for camera devices
- Support for multiple router models
- Validation of connectivity after provisioning
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the requested router/.env.example and router/provision.sh workflow, then add the Router Setup commands to the main README. Verify SSH failure handling, password and optional SIM PIN configuration, camera WAN blocking without disrupting LAN access, persistence, reload or reboot behavior, and the stated post-provisioning checks.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- shell
- Domain
- cli, devops, networking, security
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100