Resource Type: ufw_rule

Defined in:
lib/puppet/type/ufw_rule.rb

Summary

a ufw_rule type controls regular rules

Overview

This type provides Puppet with the capabilities to manage regular ufw rules.

Important: The default action is ‘reject`, so traffic would be rejected if `action` parameter is omitted.

Autorequires:

Examples:

ufw_rule { 'allow ssh from internal networks':
  ensure         => 'present',
  action         => 'allow',
  direction      => 'in',
  interface      => undef,
  log            => undef,
  from_addr      => '10.1.3.0/24',
  from_ports_app => 'any',
  to_addr        => '10.3.0.1',
  to_ports_app   => 22,
  proto          => 'tcp',
}

Properties

  • action (defaults to: reject)

    Action to perform. default: reject

  • direction (defaults to: in)

    Traffic direction. default: in

  • ensure (defaults to: present)

    Whether this resource should be present or absent on the target system.

  • from_addr (defaults to: any)

    Source address. default: any

  • from_ports_app

    Source address ports or app.

  • interface

    Interface that recieves traffic.

  • log

    Logging option.

  • proto (defaults to: any)

    Protocol. default: any

  • to_addr (defaults to: any)

    Destination address. default: any

  • to_ports_app

    Destination address ports or app.

Parameters

  • name (namevar)

    The name of the resource you want to manage.