Resource Type: firewalld_port

Defined in:
lib/puppet/type/firewalld_port.rb
Providers:
firewall_cmd

Overview

Assigns a port to a specific firewalld zone.

firewalld_port will autorequire the firewalld_zone specified in the zone parameter or the firewalld_policy specified in the policy parameter so there is no need to add dependencies for this

Example:

firewalld_port {'Open port 8080 in the public Zone':
    ensure   => 'present',
    zone     => 'public',
    port     => 8080,
    protocol => 'tcp',
}

Properties

  • ensure (defaults to: present)

    Manage the state of this type.

    Supported values:
    • present
    • absent

Parameters

  • name (namevar)

    Name of the port resource in Puppet

  • policy (defaults to: unset)

    Name of the policy to which you want to add the port, exactly one of zone and policy must be supplied

  • port

    Specify the element as a port

  • protocol

    Specify the element as a protocol

  • provider

    The specific backend to use for this ‘firewalld_port` resource. You will seldom need to specify this — Puppet will usually discover the appropriate provider for your platform.

  • zone (defaults to: unset)

    Name of the zone to which you want to add the port, exactly one of zone and policy must be supplied