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
|
esac
|
||||||
|
|
||||||
|
if [ $COMMAND = 'blacklist!' ]; then
|
||||||
|
timeout='timeout 0'
|
||||||
|
else
|
||||||
echo "$@" | fgrep -q ' timeout ' || timeout="timeout $g_dbltimeout"
|
echo "$@" | fgrep -q ' timeout ' || timeout="timeout $g_dbltimeout"
|
||||||
|
fi
|
||||||
|
|
||||||
if $IPSET -A $g_blacklistipset $@ $timeout -exist; then
|
if $IPSET -A $g_blacklistipset $@ $timeout -exist; then
|
||||||
local message
|
local message
|
||||||
@ -4716,7 +4720,7 @@ shorewall_cli() {
|
|||||||
fatal_error "$g_product is not running"
|
fatal_error "$g_product is not running"
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
blacklist)
|
blacklist|blacklist!)
|
||||||
only_root
|
only_root
|
||||||
get_config Yes
|
get_config Yes
|
||||||
shift
|
shift
|
||||||
|
@ -48,7 +48,7 @@
|
|||||||
|
|
||||||
<arg>options</arg>
|
<arg>options</arg>
|
||||||
|
|
||||||
<arg choice="plain"><option>blacklist</option></arg>
|
<arg choice="plain"><option>blacklist[!]</option></arg>
|
||||||
|
|
||||||
<arg
|
<arg
|
||||||
choice="plain"><replaceable>address</replaceable><arg><replaceable>option</replaceable>
|
choice="plain"><replaceable>address</replaceable><arg><replaceable>option</replaceable>
|
||||||
@ -1151,7 +1151,7 @@
|
|||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><emphasis role="bold">blacklist</emphasis>
|
<term><emphasis role="bold">blacklist[!]</emphasis>
|
||||||
<replaceable>address</replaceable> [ <replaceable>option</replaceable>
|
<replaceable>address</replaceable> [ <replaceable>option</replaceable>
|
||||||
... ]</term>
|
... ]</term>
|
||||||
|
|
||||||
@ -1172,6 +1172,11 @@
|
|||||||
|
|
||||||
<programlisting> shorewall blacklist 192.0.2.22 timeout 0</programlisting>
|
<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
|
<para>If the <option>disconnect</option> option is specified in the
|
||||||
DYNAMIC_BLACKLISTING setting, then the effective VERBOSITY
|
DYNAMIC_BLACKLISTING setting, then the effective VERBOSITY
|
||||||
determines the amount of information displayed:</para>
|
determines the amount of information displayed:</para>
|
||||||
|
@ -338,7 +338,7 @@ get_config() {
|
|||||||
|
|
||||||
if [ -n "$DYNAMIC_BLACKLIST" -a "$(id -u)" = 0 ]; then
|
if [ -n "$DYNAMIC_BLACKLIST" -a "$(id -u)" = 0 ]; then
|
||||||
case $COMMAND in
|
case $COMMAND in
|
||||||
blacklist|allow|drop|logdrop|reject)
|
blacklist*|allow|drop|logdrop|reject)
|
||||||
setup_dbl
|
setup_dbl
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
Loading…
Reference in New Issue
Block a user