Skip to content
Guides & References

Policy Library

Worked rConfig policy definition examples drawn from real-world configs and customer submissions, with a passing and failing config for each rule.

Policy LibraryUpdated
On this page

Policy Library

The Policy Library is a set of worked policy definition examples. Each example gives you the definition to copy, a config that passes, a config that fails, and the result rConfig reports for each. The Policy Definitions reference explains the file format and every method. This library shows the methods applied to real configuration problems.

rConfig docsCompliance OverviewGuide to Policy Compliance in rConfig V8 Pro: architecture, implementation, reporting, and best practices for automated configuration validation.Read the compliance docs

Where the examples come from

The examples are a mix of real-world configurations, rules that customers have submitted over the years, and scenarios built in the lab from vendor documentation. Customer submissions keep the library focused on the problems engineers actually need to check for, rather than textbook cases.

Every example is run through rConfig’s own policy engine, so the result on each page is the result rConfig reports for that definition and config.

Customer and lab configs alike are sanitised before publication: documentation IP ranges (RFC 5737 and RFC 3849), example.com hostnames, and fake hashes, keys and SNMP communities. Sanitising never changes whether an example passes or fails.

How the library is organised

Section What it holds
Your first policy A tutorial: write one IOS-XE rule, test it, assign it, and read the result.
Patterns All policy methods, an index of every method with a passing and failing example. Then vendor-neutral techniques: must contain and must not contain, section-scoped checks, regex patterns, per-device values and exceptions and avoiding false positives.
Platforms Worked examples grouped by operating system and topic: Arista EOS, Cisco IOS-XE, Cisco IOS XR, Cisco NX-OS, F5 BIG-IP, Fortinet FortiOS, IP Infusion OcNOS, Juniper Junos, MikroTik RouterOS and Palo Alto PAN-OS.
Compliance frameworks Framework files from the policy templates (NIST SP 800-53, NIST CSF 1.1, HIPAA, ISO/IEC 27001:2022) for every platform except F5 BIG-IP and MikroTik RouterOS.

Start with the platform pages if you know what you want to check. Read the patterns first if you are writing your own rules, especially avoiding false positives.

Using an example

  1. Copy the definition into a new or existing policy definition under Compliance → Definitions.
  2. Change the values (servers, account names, VLANs) to match your standard. The format has no variables, so every value is written literally. See per-device values and exceptions.
  3. Test it against a stored config with Test Policy Definition before you assign it. The policy development workflow covers this in detail.
  4. Assign it to the devices it applies to under Compliance → Assignments.

If you change a definition beyond the values, the published result no longer applies. Test it against your own passing and failing configs.

Minimum versions

Methods Minimum rConfig version
Single-string, array and wildcard methods, must_match_regex, match_code_block_from_array, match_code_block_flexible 8.0.0
must_not_match_regex, wildcard_must_not_match_single_string 8.0.2
match_code_block_strict 8.2.2
evaluate_block 8.3.0

A definition needs the highest minimum version of any method it contains.

Type to search.