# Puppet Class: puppet_cd::firewall::iptables

Inherits:
  puppet_cd::params

Defined in:
  manifests/firewall/iptables.pp

## Summary

Class manages firewall settings for the puppet_cd module.

## Overview

puppet_cd::firewall::iptables.pp Module name: puppet_cd Author: Arne Teuke (arne_teuke@confdroid)

    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51

    # File 'manifests/firewall/iptables.pp', line 6

    class puppet_cd::firewall::iptables (

    ) inherits puppet_cd::params {
      if $fqdn == $pt_pm_fqdn {
        firewall { '38140 open port 8140':
          proto => 'tcp',
          dport => '8140',
          jump  => 'accept',
        }
        firewall { '38443 open port 8443':
          proto => 'tcp',
          dport => '8443',
          jump  => 'accept',
        }
        if $pt_use_r10k_webhook == true {
          firewall { '38088 open port 8088':
            proto => 'tcp',
            dport => '8088',
            jump  => 'accept',
          }
        }
      }

      if $fqdn == $pt_db_fqdn {
        if $pt_use_ssl_only != true {
          firewall { "3${pt_no_ssl_port} open port ${pt_no_ssl_port}":
            proto => 'tcp',
            dport => $pt_no_ssl_port,
            jump  => 'accept',
          }
          firewall { "3${pt_ssl_port} open port ${pt_ssl_port}":
            proto => 'tcp',
            dport => $pt_ssl_port,
            jump  => 'accept',
          }
        }

        if $pt_use_ssl_only == true {
          firewall { "3${pt_ssl_port} open port ${pt_ssl_port}":
            proto => 'tcp',
            dport => $pt_ssl_port,
            jump  => 'accept',
          }
        }
      }
    }