OPNsense 26.7 · amd64

Install the LegoTypes plugins

A few commands add the signed LegoTypes package repository to your firewall. From then on the plugins install, update and uninstall in System > Firmware like any other.

What it provides

1. Check the key

Everything the repository serves is verified against one signing-key fingerprint, and the commands below trust the fingerprint you give them. So check it first. It is the SHA-256 of the repository's public signing key, which is also kept in the repository source:

sha256 213c16793ee5bec26098d5be9017e0888af98a94b86e4abddc4e42a78bbe4610

To work it out yourself, in a shell on the firewall (console option 8, or SSH as root), download the key and hash it. The result should match the line above, and the copy in the repository source (both are served by LegoTypes, so the comparison checks the download, not LegoTypes itself):

fetch -o /tmp/legotypes-pkg-signing.pub https://legotypes.github.io/opnsense-repo/legotypes-pkg-signing.pub
sha256 -q /tmp/legotypes-pkg-signing.pub

2. Add the repository (once)

Still in the shell on the firewall, run these commands. They are for sh: the shell the console and SSH give root is csh, which reads the <<'EOF' blocks differently, so the first line starts sh and the last leaves it. They write the fingerprint and the repository's address, install os-legotypes from the signed repository, register it with the firmware as the GUI does for any plugin, and remove the temporary fingerprint file:

sh
mkdir -p /usr/local/etc/pkg/fingerprints/LegoTypes/trusted
cat > /usr/local/etc/pkg/fingerprints/LegoTypes/trusted/bootstrap <<'EOF'
function: "sha256"
fingerprint: "213c16793ee5bec26098d5be9017e0888af98a94b86e4abddc4e42a78bbe4610"
EOF
cat > /usr/local/etc/pkg/repos/LegoTypes.conf <<'EOF'
LegoTypes: {
  fingerprints: "/usr/local/etc/pkg/fingerprints/LegoTypes",
  url: "https://legotypes.github.io/opnsense-repo/${ABI}/26.7/latest",
  signature_type: "fingerprints",
  priority: 5,
  enabled: yes
}
EOF
pkg update -r LegoTypes && pkg install -y -r LegoTypes os-legotypes && \
  /usr/local/opnsense/scripts/firmware/register.php install os-legotypes
rm /usr/local/etc/pkg/fingerprints/LegoTypes/trusted/bootstrap
exit

pkg update -r LegoTypes should end with LegoTypes is up to date.; a signature problem shows as No trusted public keys found, and nothing from the repository is used. The package installs the fingerprint on the firewall, and later releases update it: a key rotation adds a new dated fingerprint file.

3. Install plugins

System > Firmware > Plugins lists the LegoTypes plugins beside the official ones; install with the + button. They show tier 4: OPNsense reserves its trusted tiers for its own repository and Zenarmor's, and marks every community repository tier 4.

Updates and removal

Supported

OPNsense 26.7 on amd64 (FreeBSD 15). Packages are built and signed by the repository's GitHub Actions workflow from the plugin sources in LegoTypes/plugins, and os-legotypes from the repository's own source; every published build is also kept as a release.