The SBC on an OPNsense firewall
If the branch office already has an OPNsense firewall, the SBC can run on it as a plugin instead of on a separate Linux box. It is the same SBC as the container: the site's phones register to the firewall's LAN address, and their calls go to your PBX over the same encrypted tunnel. You manage it from the firewall's web interface, and updates arrive through OPNsense's own firmware page.
Before you start
- OPNsense 26.7 on 64-bit Intel/AMD hardware (the plugin is built for both of its FreeBSD 14 and 15 releases).
- The firewall's LAN address is the phones' SBC address, so give that interface a fixed IPv4 address (it normally has one already).
- Outbound access to your PBX, the same as any SBC: its HTTPS port (default 443) to enroll, and 5090 TCP and UDP for the tunnel. OPNsense allows the firewall's own outbound traffic by default.
- Nothing else on the firewall using UDP 5060, or UDP 69 and TCP 6970 if you have Cisco Enterprise phones.
1. Create the site in the console
Exactly as for any SBC: Admin → Connectivity → SBC → Provision a new SBC, name the site, and copy the one-time enrollment key the console shows. The key is good for 7 days and enrolls one SBC.
2. Install the plugin
The first install is one command on the firewall. Open a shell on it (the Shell option in the console menu, or SSH as root) and run:
pkg add https://catalog.exovo.tel/opnsense/freebsd`freebsd-version | cut -d. -f1`-amd64/os-exovo-sbc.pkg
This works in OPNsense's default shell as typed. It installs the plugin and adds the Exovo package repository to the firewall. The repository is signed, and the plugin carries the key OPNsense checks every later update against.
3. Turn it on
In the OPNsense web interface, open Services → Exovo SBC and fill in:
| Setting | What to enter |
|---|---|
| Enable | Ticked. |
| Phone system address | Your system's host name, for example pbx.example.com. |
| Phone interface | The interface the phones are on, usually LAN. |
| SIP port | Leave at 5060. |
| Enrollment key | The one-time key from step 1. It is used once, on the first start. |
| Add firewall rules | Leave ticked (see below). |
Choose Save. The Status panel under the form should show the service running, the
SBC's identity under Enrolled (for example exovo/sbc/1/site1), and the tunnel up within a
few seconds. In the console the site moves from Pending to Enrolled and shows the firewall's
LAN address.
The SBC listens on the phone interface's address only, never on the WAN.
4. Point the phones at it
Assign each phone with connection type SBC and this site selected, as for any SBC (see
provisioning). Phones download their configuration from
the PBX's public address, so add the site's public IP to PROVISIONING_ALLOWED_CIDR under
Admin → System → Parameters first, as described in the
install guide.
Cisco 8800 phones on Enterprise firmware provision from the SBC too: in the firewall's DHCP server settings for the phone interface, set option 150 to the firewall's LAN address. See Cisco Enterprise phones.
Firewall rules
With Add firewall rules ticked, the plugin adds these pass rules on the phone interface, to the firewall itself only:
| Port | Why |
|---|---|
| UDP 5060 (or your SIP port) | SIP from the phones |
| UDP 69 | Cisco Enterprise phones' TFTP provisioning |
| TCP 6970 | Cisco Enterprise phones' HTTP provisioning |
| UDP 1024–65535 | Call audio (the SBC uses a fresh port for each call) |
They are reloaded whenever you save the page. OPNsense's default LAN rule already allows LAN devices to reach the firewall, so they matter where the LAN rules are tighter than the default. Untick the option if you prefer to write these rules yourself.
Updating
From the phone system, the same way as any SBC: Admin → Dashboard → Updates lists the firewall's SBC with the build it runs, and Update has the firewall install the newer plugin and restart the SBC. You can also update on the firewall itself: System → Firmware → Updates lists a new os-exovo-sbc alongside OPNsense's own packages.
Either way the SBC keeps its certificate, so calls through the site drop for a few seconds and the phones are back by themselves. Pick a quiet moment.
Checking and troubleshooting
The SBC's log is part of the firewall's system log: System → Log Files → General, filtered on
exovo-sbc. It prints the same lines as the container: a healthy start ends with tunnel UP,
SIP listener bound on 10.0.0.1:5060 (your LAN address) and reported SBC LAN endpoint. The
same log also reaches the PBX: Dashboard › Services › History on its row (see
Logs and alerts), so most of the time you don't need the
firewall's own log at all. The
troubleshooting table applies as written; on
OPNsense:
| What you see | What to do |
|---|---|
| The service won't start, with "interface … has no IPv4 address" | Choose the interface the phones are on and check it has a static IPv4 address. |
no certificate … and SBC_ENROLL_KEY is not set |
Enter the enrollment key on the page and save. |
enroll rejected (401) |
The key was used already or is over 7 days old. Regenerate key in the console, paste it on the page and save. |
| Phones register but there is no audio | Check UDP 5090 is allowed out, and with your own LAN rules, that the phones may reach the firewall on UDP 1024–65535. |
Moving to or from a separate box
The SBC's certificate belongs to one installation. To move a site between a Linux box and the firewall, provision a new SBC entry, install it with the new key, point the phones at its address, then Revoke the old entry. To remove the plugin, untick Enable, save, and remove os-exovo-sbc under System → Firmware → Plugins; then Revoke the site in the console.