Skip to content

File Types

os-filetypes · Protection

A policy for file types - allowed, logged or blocked by type - written as Suricata rules for OPNsense's Intrusion Detection.

In the menu

  • With os-xgs-npu installed: XGS: File Types
  • Without os-xgs-npu: Services: Intrusion Detection: File Types

For each of seven file types, Allow, Log or Block, matched by the file's content, its extension, or both. Apply writes the Suricata rules - an alert for Log, a drop for Block - and has the Intrusion Detection load them live, without a restart. Off by default, every type Allow until it is set.

The page shows what the installed rules of each type do after the Intrusion Detection's own policies, and the files they matched, from its alerts. Block is offered in IPS mode only; the cards say whether the Intrusion Detection is on, in which mode, and whether Suricata runs - and, with os-xgs-npu, whether Suricata sees each connection past its first packets.

Features

  • Seven types

    Windows programs, scripts, archives, Office documents, Office documents with macros, PDF documents and Android packages.

  • By content or by extension

    The name libmagic gives a file's content, the file's extension, or both.

  • What is in force

    For each type, what its installed rules do, and the policy that made one differ.

  • Matches

    The newest 500 files the rules matched, one row a file.

Install and update

Its first release is v1.0.0, of 2026-12-02. It is also installed 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 Services without it, and keeps the settings when run again; sh install/uninstall.sh takes it away. From its first signed release, XGS: Updates installs and updates it from its Plugins tab, with an os-xgs-npu newer than 0.2.0-alpha.1.3. It is not in the OPNsense plugin repository.

Limits, and what is not tested yet

  • The page in a browser: the plugin ran on the second XGS 3300 and the XGS 136, and its page's API was read there; and a plain OPNsense.
  • Blocking on the XGS 136: measured on the second XGS 3300 only.
  • Rules for SMTP, FTP, SMB and NFS: not measured, so not written.
  • Microsoft OOXML by its content: not yet named by Suricata for a sample.
  • More, each with its reason: the README's Not yet, and why.

Repository

First release: 2026-12-02

os-filetypes 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.