aboutsummaryrefslogtreecommitdiff
path: root/manifests/rules/torify/user.pp
blob: 49c0b3460e404480a8dd993c693016f79dbb0d1f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
define shorewall::rules::torify::user(
  $originaldest = '-',
  $allow_rfc1918 = true
){

  $user = $name

  include shorewall::rules::torify::allow_tor_transparent_proxy

  shorewall::rules::torify::redirect_tcp_to_tor {
    "redirect-to-tor-user=${user}-to=${originaldest}":
      user         => $user,
      originaldest => $originaldest
  }

  shorewall::rules::torify::reject_non_tor {
    "reject-non-tor-user=${user}-to=${originaldest}":
      user          => "$user",
      originaldest  => $originaldest,
      allow_rfc1918 => $allow_rfc1918;
  }

}