summaryrefslogtreecommitdiff
path: root/manifests/rules/torify.pp
blob: b393a2a7a24019d5aa6a1b794ad3fee72b013b75 (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
# shorewall::rules::torify
#
# Note: shorewall::rules::torify cannot be used several times with the
# same user listed in the $users array. This restriction applies to
# using this define multiple times without providing a $users
# parameter.
#
# Parameters:
#
# - users: every element of this array must be valid in shorewall
#   rules user/group column.
# - destinations: every element of this array must be valid in
#   shorewall rules original destination column.

define shorewall::rules::torify(
  $users        = ['-'],
  $destinations = ['-'],
  $allow_rfc1918 = true
){

  include shorewall::rules::torify::non_torified_users

  $originaldest = join($destinations,',')

  shorewall::rules::torify::user {
    $users:
      originaldest  => $originaldest,
      allow_rfc1918 => $allow_rfc1918;
  }

}