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
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:
No additional features are included.
User Workflow (suggested)
Steps:
.envConfiguration Variables
Required
Optional
Provisioning Tasks
The
provision.shscript must:Firewall Behavior
If
CAMERA_IPSis defined:Implementation Notes
uci)Documentation Requirement
The main README must include a short section:
Router Setup
No additional explanation required in the main README.
Non-Goals
Future Improvements (optional)