Running firewalls for other companies means keeping each client’s network to itself: its own addresses, its own rules, its own people, a few who may look and fewer who may change things. With one OPNsense box per site and a handful of clients, that’s a folder of notes per client. With a few dozen, it’s the job.
This guide sets up NetDefense the way an MSP would: one organization per client, the right role for each person in it, and automation that stays inside the client it was made for.
TL;DR
- Create one organization per client. Its firewalls, configuration, backups, members and plan stay in it, and the organization switcher moves you between clients.
- Register each client’s firewalls with the install command from that client’s Devices page.
- Give each person a role per organization: Read-Only, Read-Write or Superuser. Read-only remote access for technicians is in early access.
- Automate with a personal access token bound to one client’s organization. It can’t act on another client, act above Read-Write, or open a remote session.
One organization per client
An organization is the container everything else lives in: firewalls, OUs, templates, snippets, variables, backups, schedules, members and the plan. One login can belong to many organizations, with a different role in each, and the organization switcher at the top of the sidebar moves you from one client to the next.
Each organization also has its own plan and its own subscription, so a client’s firewalls are counted and billed in that client’s organization. Paid plans are priced per device: see Pricing.
Step 1: Create the client’s organization
Open the organization switcher, choose Manage Organizations, click New Organization and give it a name: lowercase letters, numbers and hyphens, such as cindervale. The name can’t change later. You become the organization’s first Superuser.
Step 2: Register the client’s firewalls
With the client’s organization selected, open Devices and click Deploy Device. It shows the install command for that organization. Run it on each of the client’s firewalls: the firewall registers into that organization, dialing out, and waits as Pending until you approve it. The agent needs OPNsense 26.1.11 or later (amd64), so an inherited firewall on an older release has to be upgraded first. See Installation.
Inside the organization, group the firewalls into OUs by site or role, and build the client’s templates and variables, as in How to Push One Rule to Every OPNsense Firewall.
Step 3: Give each person the role they need
Roles are per organization: the same person can be Superuser in one client’s organization and Read-Only in another’s.
- Read-Only: See everything in the organization and work its support tickets, but change none of its firewalls or configuration. A remote session is read-only (early access): the firewall’s WebAdmin only, with no shell.
- Read-Write: Everything Read-Only can, plus every other change: approve firewalls, sync, run commands, and edit snippets, templates, OUs, variables, networks, backups and firmware tracks. Open full remote sessions, shell included.
- Superuser: Everything Read-Write can, plus manage members, roles and invitations, change or delete the organization, manage its billing, and save snippets that grant firewall administrator rights. The member list and the organization switcher show this role as Admin.
To add someone, click the gear beside the organization switcher, then Manage Members, Invite Member, an Email Address and a Role, and Send Invitation. NetDefense sends no email, so tell them to sign in and accept it under Invitations in their avatar menu.
A technician who should look at a client’s firewall without changing it gets Read-Only. Their remote session opens the WebAdmin only, and the firewall itself blocks configuration changes, whatever the browser does. It still shows logs and settings, and a search of the lists that hold secrets can recover one, so give it to someone you would trust with those secrets. Read-only remote access is in early access, so check it against your own policies before you rely on it.
Read-Write is a shell
A Read-Write member can open a remote session, and a remote session is a shell on the client’s firewall. Give Read-Write to the people you’d give that firewall’s SSH key.
Step 4: Automate per client
Scripts and CI jobs authenticate with a personal access token, created under Settings in the web console or with NDCLI. For client work, bind each token to one organization:
- It stays in its organization. A token bound to
cindervaleis refused by every other organization. - It never acts above Read-Write, whatever the role of the person who made it, and a read-only token is read-only.
- It can’t open a remote session. A session needs an interactive login.
The same baseline for every client
Templates, snippets and variables live inside each organization, so each client’s configuration stays inside that client’s organization. To give every client the same baseline, keep its snippets as JSON files, in Git for instance, and create them in each organization with NDCLI, where -o picks the organization. Variables then fill in each client’s own addresses.
The same thing from the terminal
The Accounts & Organizations and Personal Access Tokens guides cover roles, invitations and tokens in depth.