usbguard

Install & configure usbguard

80 downloads

80 latest version

Version information

  • 1.0.0 (latest)
released May 16th 2025
This version is compatible with:
  • Puppet Enterprise 2025.3.x, 2025.2.x, 2025.1.x, 2023.8.x, 2023.7.x, 2023.6.x, 2023.5.x, 2023.4.x, 2023.3.x, 2023.2.x, 2023.1.x, 2023.0.x, 2021.7.x, 2021.6.x, 2021.5.x, 2021.4.x, 2021.3.x, 2021.2.x, 2021.1.x, 2021.0.x, 2019.8.x, 2019.7.x, 2019.5.x, 2019.4.x, 2019.3.x, 2019.2.x, 2019.1.x, 2019.0.x, 2018.1.x, 2017.3.x, 2017.2.x, 2017.1.x, 2016.5.x, 2016.4.x
  • Puppet >= 4.7.0 < 9.0.0
  • , , , , , ,

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'puppet-usbguard', '1.0.0'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add puppet-usbguard
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install puppet-usbguard --version 1.0.0

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.

Download

Documentation

puppet/usbguard — version 1.0.0 May 16th 2025

usbguard

Table of Contents

  1. Description
  2. Setup - The basics of getting started with usbguard
  3. Usage - Configuration options and additional functionality
  4. Limitations - OS compatibility, etc.
  5. Development - Guide for contributing to the module

Description

Install usbguard and configure the daemon and rules.

https://dkopecek.github.io/usbguard/

Usbguard is available for RHEL/CentOS >= 7.4 and Fedora.

Setup

What usbguard affects

  • the usbguard package
  • the usbguard-daemon.conf file
  • the rules file (by default /etc/usbguard/rules-managed-by-puppet.conf)

Beginning with usbguard

Just include ::usbguard to start without any rule.

Usage

Install, configure some rules and start the service:

include ::usbguard

$rule_content = @(CONTENT)
  allow with-interface equals { 08:*:* }
  reject with-interface all-of { 08:*:* 03:00:* }
  reject with-interface all-of { 08:*:* 03:01:* }
  reject with-interface all-of { 08:*:* e0:*:* }
  reject with-interface all-of { 08:*:* 02:*:* }
  | CONTENT

# DON'T DO THIS ON YOUR COMPUTER OR YOU MIGHT LOCK YOU OUT
# this is just an example. :-)
usbguard::rule { 'allow usb disks without keyboard interface':
  rule => $rule_content,
}

Limitations

  • The usbguard package for RHEL/CentOS is only available for 7.4 and later or you need to configure a external repo on your own (this module will never fiddle with your repo config)

Development

No defined process available. :-) Github pull-request style.