From ac13be4ed4b44e0c2374d5cb0205219146f9d697 Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Thu, 3 Feb 2011 13:26:41 -0800 Subject: [PATCH] Add rate-limiting example to rules manpages --- docs/configuration_file_basics.xml | 2 +- manpages/shorewall-rules.xml | 17 ++++++++++++++++- manpages6/shorewall6-rules.xml | 13 +++++++++++++ 3 files changed, 30 insertions(+), 2 deletions(-) diff --git a/docs/configuration_file_basics.xml b/docs/configuration_file_basics.xml index 4f6f33352..2cfa9c753 100644 --- a/docs/configuration_file_basics.xml +++ b/docs/configuration_file_basics.xml @@ -1056,7 +1056,7 @@ SHELL cat /etc/shorewall/rules.d/*.rules For optional interfaces, if the interface is not usable at the time that the firewall starts the all-zero address will be used (0.0.0.0 in - IPv4 and :: in IPv6), resulting in no packets matching the rule. + IPv4 and :: in IPv6), resulting in no packets matching the rule.
diff --git a/manpages/shorewall-rules.xml b/manpages/shorewall-rules.xml index da58d4f49..500359b6d 100644 --- a/manpages/shorewall-rules.xml +++ b/manpages/shorewall-rules.xml @@ -1381,7 +1381,22 @@ Add the tupple (source IP, dest port, dest IP) of an incoming SSH connection to the ipset S: - ADD(+S:dst,src,dst) net fw tcp 22 + #ACTION SOURCE DEST PROTO DEST + # PORT(S) + ADD(+S:dst,src,dst) net fw tcp 22 + + + + + Example 11: + + + You wish to limit SSH connections from remote sysstems to + 1/min with a burst of three (to allow for limited retry): + + #ACTION SOURCE DEST PROTO DEST SOURCE ORIGINAL RATE + # PORT(S) PORT(S) DEST LIMIT + SSH(ACCEPT) net all - - - - s:1/min:3 diff --git a/manpages6/shorewall6-rules.xml b/manpages6/shorewall6-rules.xml index 6cf001bee..9b60716d6 100644 --- a/manpages6/shorewall6-rules.xml +++ b/manpages6/shorewall6-rules.xml @@ -1103,6 +1103,19 @@ $FW tcp 22 + + + Example 5: + + + You wish to limit SSH connections from remote sysstems to + 1/min with a burst of three (to allow for limited retry): + + #ACTION SOURCE DEST PROTO DEST SOURCE ORIGINAL RATE + # PORT(S) PORT(S) DEST LIMIT + SSH(ACCEPT) net all - - - - s:1/min:3 + +