summaryrefslogtreecommitdiff
path: root/puppet/modules/site_shorewall/manifests/service/webapp_api.pp
blob: e3ae4200a03d26841457ed4872d06ece8809c054 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# configure shorewall for webapp api
class site_shorewall::service::webapp_api {

  $api = hiera('api')
  $api_port = $api['port']

  # define macro for incoming services
  file { '/etc/shorewall/macro.leap_webapp_api':
    content => "PARAM   -       -       tcp    ${api_port} ",
    notify  => Exec['shorewall_check'],
    require => Package['shorewall']
  }


  shorewall::rule {
      'net2fw-webapp_api':
        source      => 'net',
        destination => '$FW',
        action      => 'leap_webapp_api(ACCEPT)',
        order       => 200;
  }

}