forked from extern/shorewall_code
Add 'blacklist!' command.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
527533ecb6
commit
07160c5ed1
@ -3642,7 +3642,11 @@ blacklist_command() {
|
||||
;;
|
||||
esac
|
||||
|
||||
echo "$@" | fgrep -q ' timeout ' || timeout="timeout $g_dbltimeout"
|
||||
if [ $COMMAND = 'blacklist!' ]; then
|
||||
timeout='timeout 0'
|
||||
else
|
||||
echo "$@" | fgrep -q ' timeout ' || timeout="timeout $g_dbltimeout"
|
||||
fi
|
||||
|
||||
if $IPSET -A $g_blacklistipset $@ $timeout -exist; then
|
||||
local message
|
||||
@ -4716,7 +4720,7 @@ shorewall_cli() {
|
||||
fatal_error "$g_product is not running"
|
||||
fi
|
||||
;;
|
||||
blacklist)
|
||||
blacklist|blacklist!)
|
||||
only_root
|
||||
get_config Yes
|
||||
shift
|
||||
|
@ -48,7 +48,7 @@
|
||||
|
||||
<arg>options</arg>
|
||||
|
||||
<arg choice="plain"><option>blacklist</option></arg>
|
||||
<arg choice="plain"><option>blacklist[!]</option></arg>
|
||||
|
||||
<arg
|
||||
choice="plain"><replaceable>address</replaceable><arg><replaceable>option</replaceable>
|
||||
@ -1151,7 +1151,7 @@
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><emphasis role="bold">blacklist</emphasis>
|
||||
<term><emphasis role="bold">blacklist[!]</emphasis>
|
||||
<replaceable>address</replaceable> [ <replaceable>option</replaceable>
|
||||
... ]</term>
|
||||
|
||||
@ -1172,6 +1172,11 @@
|
||||
|
||||
<programlisting> shorewall blacklist 192.0.2.22 timeout 0</programlisting>
|
||||
|
||||
<para>Beginning with Shorewall 5.2.5, the above command can be
|
||||
shortened to:</para>
|
||||
|
||||
<programlisting> shorewall blacklist! 192.0.2.22</programlisting>
|
||||
|
||||
<para>If the <option>disconnect</option> option is specified in the
|
||||
DYNAMIC_BLACKLISTING setting, then the effective VERBOSITY
|
||||
determines the amount of information displayed:</para>
|
||||
|
@ -338,7 +338,7 @@ get_config() {
|
||||
|
||||
if [ -n "$DYNAMIC_BLACKLIST" -a "$(id -u)" = 0 ]; then
|
||||
case $COMMAND in
|
||||
blacklist|allow|drop|logdrop|reject)
|
||||
blacklist*|allow|drop|logdrop|reject)
|
||||
setup_dbl
|
||||
;;
|
||||
esac
|
||||
|
Loading…
Reference in New Issue
Block a user