]> gitweb.fluxo.info Git - puppet-shorewall.git/commitdiff
Revert "Allow redirecting DNS requests to Tor for specific users or globally."
authorintrigeri <intrigeri@boum.org>
Wed, 2 Jan 2013 17:01:43 +0000 (18:01 +0100)
committerintrigeri <intrigeri@boum.org>
Wed, 2 Jan 2013 17:01:43 +0000 (18:01 +0100)
This reverts commit 0c28fa636653f395c756f56c93f8c78fddfcee00.

This stuff is not ready for the shared repo, but we want to take benefit from me
having already merged immerda's stuff into my branch and solved the conflicts.

README
manifests/init.pp
manifests/rules/torify/redirect_dns_to_tor.pp [deleted file]

diff --git a/README b/README
index 07c50f2a59cb02be7c8e5e8a9503a0bc570e2529..cb4424f964cd0fd650301c49ae28dd599fd78072 100644 (file)
--- a/README
+++ b/README
@@ -110,18 +110,7 @@ rejected. This is intentional: it does not make sense leaking -via DNS
 requests- network activity that would otherwise be torified. In that
 case you probably want to read proper documentation about such
 matters, enable the Tor DNS resolver and redirect DNS requests through
-it,
-
-either globally:
-
-  shorewall::rules::torify::redirect_dns_to_tor { '-': }
-
-or for specific users:
-
-  shorewall::rules::torify::redirect_dns_to_tor { ['bob', 'alice' ]: }
-
-The $tor_dns_host and $tor_dns_port variables must be set before
-these defines are setup.
+it.
 
 Example
 -------
index a446253dc1873cd1024803d37a35926f813a9d80..dd287678a3969bb7b0409b36b69c40b1b3b9f635 100644 (file)
@@ -27,12 +27,6 @@ class shorewall(
   case $tor_transparent_proxy_port {
     '': { $tor_transparent_proxy_port = '9040' }
   }
-  case $tor_dns_host {
-    '': { $tor_dns_host = '127.0.0.1' }
-  }
-  case $tor_dns_port {
-    '': { $tor_dns_port = '8853' }
-  }
   if $tor_user == '' {
     $tor_user = $dist_tor_user ? {
       ''      => 'tor',
diff --git a/manifests/rules/torify/redirect_dns_to_tor.pp b/manifests/rules/torify/redirect_dns_to_tor.pp
deleted file mode 100644 (file)
index 9c71204..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-define shorewall::rules::torify::redirect_dns_to_tor() {
-
-  $user = $name
-
-  $destzone = $shorewall::tor_dns_host ? {
-    '127.0.0.1' => '$FW',
-    default     => 'net'
-  }
-
-  $tcp_rule = "redirect-tcp-dns-to-tor-user=${user}"
-  if !defined(Shorewall::Rule["$tcp_rule"]) {
-    shorewall::rule {
-      "$tcp_rule":
-        source          => '$FW',
-        destination     => "${destzone}:${shorewall::tor_dns_host}:${shorewall::tor_dns_port}",
-        proto           => 'tcp',
-        destinationport => 'domain',
-        user            => $user,
-        order           => 108,
-        action          => 'DNAT';
-    }
-  }
-
-  $udp_rule = "redirect-udp-dns-to-tor-user=${user}"
-  if !defined(Shorewall::Rule["$udp_rule"]) {
-    shorewall::rule {
-      "$udp_rule":
-        source          => '$FW',
-        destination     => "${destzone}:${shorewall::tor_dns_host}:${shorewall::tor_dns_port}",
-        proto           => 'udp',
-        destinationport => 'domain',
-        user            => $user,
-        order           => 108,
-        action          => 'DNAT';
-    }
-  }
-
-}