opnsense_if_assign
Assign a VLAN or NIC device to a free optN slot, filling the missing OPNsense API endpoint for interface assignments.
Instructions
Assign an existing VLAN or NIC device to a free optN slot via SSH. Requires OPNSENSE_SSH_ENABLED=true and the opnsense-helpers/if_assign.php script installed on the target host. Fills the gap where the OPNsense REST API has no 'Interfaces → Assignments' endpoint.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| slot | Yes | Target slot (e.g. 'opt1', 'opt2'). Must be free. | |
| if | Yes | Device to assign (e.g. 'vlan10' for a VLAN or 'igb0' for a real NIC) | |
| descr | No | Optional friendly description (max 120 chars) |