Skip to content

Quotas

os-quota · Users and access

Time and volume quotas per host, user or group, counted from pf with what the coprocessor forwards, and a block at the limit.

In the menu

  • With os-xgs-npu installed: XGS: Quotas
  • Without os-xgs-npu: Firewall: Quotas

A quota is for an address, a MAC, or one of os-useridentity's users or groups: a volume, minutes of use, or both, over a cycle started again on the day chosen. Once a minute it is counted from pf's states - every byte of the host's connections, to and from the firewall too, and what the coprocessor forwards where os-xgs-npu's "Count hardware traffic in pf" is on.

A host over a quota goes into the table quota_over, and rules the plugin registers block its new connections; those it already has open are cut there and then, on the coprocessor first where os-xgs-npu is installed. Where os-netreport is installed, an alert goes out before the limit, at 80 % by default. Off by default.

Features

  • Hosts, users and groups

    An IPv4 or IPv6 address, a MAC's addresses from OPNsense's host discovery, or a table of os-useridentity's.

  • Volume and minutes

    Bytes both ways, and minutes in which the host moved more than the threshold Settings gives.

  • A new cycle

    The count starts again on its day, or by Reset on a quota's row; a boot loses no count.

  • Near the limit

    An alert through os-netreport when a quota reaches the share Settings gives.

Install and update

Since os-xgs-npu 0.2.0-alpha.1, XGS: Updates lists it on its Plugins tab, where it is installed and updated from its signed releases, and an update of the project installs it on an appliance that never had it; nothing is updated on its own. By hand, as root, on an XGS appliance or on any other OPNsense: from a checkout of the repository with sh install/install.sh, which puts the page under XGS with os-xgs-npu and under Firewall without it, and keeps the settings when run again; a copy installed this way is updated by its own self-update.py, and sh install/uninstall.sh takes it away. It is not in the OPNsense plugin repository.

Limits, and what is not tested yet

  • The page in a browser: its data was read through configctl quota status, the page's own backend.
  • A plain OPNsense: the second part ran on the two appliances only.
  • A group's members from a real directory: in the lab, os-useridentity's groups came from a stand-in of the directory's answer.
  • On the XGS 136, a user's or a group's quota in hardware, and the logon through a captive portal: both ran on the second XGS 3300 only.
  • Alerts by mail and by ntfy: os-netreport sent them by webhook in the lab.
  • IPv6 in hardware: counted as IPv4 is by the code, not measured.
  • More, each with its reason: the README's Not yet, and why.

Repository

First release: 2026-11-20

os-quota Releases

Discussion

The discussion of this page is held in the project's GitHub Discussions. Showing it here loads giscus from giscus.app and GitHub, and writing in it needs a GitHub account - what that means.