On 18.09.2014 17:38, Hervé Werner wrote:

Hello

After giving this module a try I found out that the final ACCEPT target is missing. I had to add an ACCEPT rule juste after the log rule to make it work (patch attached).

Here is the part that causes trouble :
    if ($args->{log_level} & 1)
    {
      log_rule_limit($args->{log_level},
                     $chainref,
                     $name,
                     'ACCEPT',
                     '',
                     $args->{log_tag} || '',
                     'add',
"-p $current_proto --dport $current_port -m recent --rcheck --seconds $seconds --name $lastname"
                    );
    }
    else
    {
add_rule($chainref, "-p $current_proto --dport $current_port -m recent --rcheck --seconds $seconds --name $lastname -j ACCEPT");
    }


Hello Werner, hello Tom,

Thank you for pointing out the missing statement when logging is enabled. Can you also share your experience?

@Tom: To avoid code duplication can you apply the patch attached on the latest online version (add_rule outside of the if).

BTW: @Tom: Can you please add a link on http://shorewall.net/Events.html for "Gerhard Wiesinger" to http://www.wiesinger.com/

Thnx.

Ciao,
Gerhard

--
http://www.wiesinger.com

--- KnockEnhanced-V6-online.pm  Sat Sep 20 05:53:14 2014
+++ KnockEnhanced-V7-online.pm  Sat Sep 20 06:00:40 2014
@@ -229,12 +229,8 @@
                      'add',
                      "-p $current_proto --dport $current_port -m recent 
--rcheck --seconds $seconds --name $lastname"
                     );
-      add_rule($chainref, "-p $current_proto --dport $current_port -m recent 
--rcheck --seconds $seconds --name $lastname -j ACCEPT");
-    }
-    else
-    {
-      add_rule($chainref, "-p $current_proto --dport $current_port -m recent 
--rcheck --seconds $seconds --name $lastname -j ACCEPT");
     }
+    add_rule($chainref, "-p $current_proto --dport $current_port -m recent 
--rcheck --seconds $seconds --name $lastname -j ACCEPT");
   }
 
   ##################################################
------------------------------------------------------------------------------
Slashdot TV.  Video for Nerds.  Stuff that Matters.
http://pubads.g.doubleclick.net/gampad/clk?id=160591471&iu=/4140/ostg.clktrk
_______________________________________________
Shorewall-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/shorewall-users

Reply via email to