summaryrefslogtreecommitdiff
path: root/manifests/virtual/jabber.pp
blob: 703b9a949f7f2d7d17ebf667b4cbf4ac4cee9d57 (plain)
1
2
3
4
5
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
52
53
54
class firewall::virtual::jabber($destination, $zone = 'fw') {
  shorewall::rule { 'jabber-0':
    action          => 'DNAT',
    source          => 'net',
    destination     => "$zone:$destination:5222",
    proto           => 'tcp',
    destinationport => '5222',
    ratelimit       => '-',
    order           => 2200,
  }

  shorewall::rule { 'jabber-1':
    action          => 'DNAT',
    source          => '$FW',
    destination     => "$zone:$destination:5223",
    proto           => 'tcp',
    destinationport => '5223',
    originaldest    => lookup('firewall::external_ip', undef, undef, $::ipaddress),
    ratelimit       => '-',
    order           => 2201,
  }

  shorewall::rule { 'jabber-2':
    action          => 'DNAT',
    source          => 'net',
    destination     => "$zone:$destination:5269",
    proto           => 'tcp',
    destinationport => '5269',
    ratelimit       => '-',
    order           => 2202,
  }

  shorewall::rule { 'jabber-3':
    action          => 'DNAT',
    source          => '$FW',
    destination     => "$zone:$destination:4369",
    proto           => 'tcp',
    destinationport => '4369',
    originaldest    => lookup('firewall::external_ip', undef, undef, $::ipaddress),
    ratelimit       => '-',
    order           => 2203,
  }

  shorewall::rule { 'jabber-4':
    action          => 'DNAT',
    source          => '$FW',
    destination     => "$zone:$destination:4370",
    proto           => 'tcp',
    destinationport => '4370:4375',
    originaldest    => lookup('firewall::external_ip', undef, undef, $::ipaddress),
    ratelimit       => '-',
    order           => 2204,
  }
}