]> git.ipfire.org Git - ipfire-2.x.git/blobdiff - html/cgi-bin/tor.cgi
suricata: Change midstream policy to "pass-flow"
[ipfire-2.x.git] / html / cgi-bin / tor.cgi
index 2b0d93336488a5226eebeced0f93e1e738dd8272..9aa2bc95a1985e2f0e3b23311f0e34a26a10a2ec 100644 (file)
@@ -2,7 +2,7 @@
 ###############################################################################
 #                                                                             #
 # IPFire.org - A linux based firewall                                         #
-# Copyright (C) 2007-2020  IPFire Team  <info@ipfire.org>                     #
+# Copyright (C) 2007-2023  IPFire Team  <info@ipfire.org>                     #
 #                                                                             #
 # This program is free software: you can redistribute it and/or modify        #
 # it under the terms of the GNU General Public License as published by        #
@@ -732,6 +732,7 @@ sub BuildConfiguration() {
        # Global settings.
        print FILE "Sandbox 1\n";
        print FILE "HardwareAccel 1\n";
+       print FILE "ClientUseIPv6 0\n";
        print FILE "ControlPort $TOR_CONTROL_PORT\n";
 
        if ($settings{'TOR_ENABLED'} eq 'on') {
@@ -789,23 +790,25 @@ sub BuildConfiguration() {
 
                        my @nodes = split(",", $settings{'TOR_USE_EXIT_NODES'});
                        foreach (@nodes) {
-                               print FILE "ExitNode $_\n";
+                               print FILE "ExitNodes $_\n";
                        }
                }
 
                if ($strict_nodes > 0) {
                        print FILE "StrictNodes 1\n";
                }
-       }
+        } else {
+               print FILE "SocksPort 0\n";
+        }
 
        if ($settings{'TOR_RELAY_ENABLED'} eq 'on') {
                # Reject access to private networks.
                print FILE "ExitPolicyRejectPrivate 1\n";
 
-               print FILE "ORPort $settings{'TOR_RELAY_PORT'}\n";
+               print FILE "ORPort $settings{'TOR_RELAY_PORT'} IPv4Only\n";
 
                if ($settings{'TOR_RELAY_DIRPORT'} ne '0') {
-                       print FILE "DirPort $settings{'TOR_RELAY_DIRPORT'}\n";
+                       print FILE "DirPort $settings{'TOR_RELAY_DIRPORT'} IPv4Only\n";
                }
 
                if ($settings{'TOR_RELAY_ADDRESS'} ne '') {