forked from extern/shorewall_code
Added BLACKLISTNEWONLY
git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@765 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
parent
55ddfb8c78
commit
67ad01a56f
@ -10,3 +10,6 @@ Changes since 1.4.7
|
||||
|
||||
4) Fix error handling after "Unable to determine the routes..."
|
||||
|
||||
5) Fix handling of LOGUNCLEAN
|
||||
|
||||
6) Added BLACKLISTNEWONLY support.
|
||||
|
@ -3590,9 +3590,11 @@ setup_blacklist() {
|
||||
|
||||
createchain blacklst no
|
||||
|
||||
[ -n "$BLACKLISTNEWONLY" ] && state="-m state --state NEW" || state=
|
||||
|
||||
for interface in $interfaces; do
|
||||
for chain in `first_chains $interface`; do
|
||||
run_iptables -A $chain -j blacklst
|
||||
run_iptables -A $chain $state -j blacklst
|
||||
done
|
||||
|
||||
echo " Blacklisting enabled on $interface"
|
||||
@ -3911,13 +3913,15 @@ initialize_netfilter () {
|
||||
fi
|
||||
fi
|
||||
|
||||
[ -n "$BLACKLISTNEWONLY" ] && state="-m state --state NEW" || state=
|
||||
|
||||
echo "Creating Interface Chains..."
|
||||
|
||||
for interface in $all_interfaces; do
|
||||
createchain `forward_chain $interface` no
|
||||
run_iptables -A `forward_chain $interface` -j dynamic
|
||||
run_iptables -A `forward_chain $interface` $state -j dynamic
|
||||
createchain `input_chain $interface` no
|
||||
run_iptables -A `input_chain $interface` -j dynamic
|
||||
run_iptables -A `input_chain $interface` $state -j dynamic
|
||||
done
|
||||
}
|
||||
|
||||
@ -4015,7 +4019,7 @@ add_common_rules() {
|
||||
if [ -n "$interfaces" ]; then
|
||||
createchain logpkt no
|
||||
|
||||
[ -z"$LOGUNCLEAN" ] && LOGUNCLEAN=info
|
||||
[ -z "$LOGUNCLEAN" ] && LOGUNCLEAN=info
|
||||
|
||||
LOGPARMS="$LOGPARMS --log-ip-options"
|
||||
|
||||
@ -5033,6 +5037,7 @@ do_initialize() {
|
||||
LOGFORMAT=
|
||||
LOGRULENUMBERS=
|
||||
ADMINISABSENTMINDED=
|
||||
BLACKLISTNEWONLY=
|
||||
|
||||
stopping=
|
||||
have_mutex=
|
||||
@ -5182,6 +5187,7 @@ do_initialize() {
|
||||
LOGFORMAT="Shorewall:%s:%s:"
|
||||
fi
|
||||
ADMINISABSENTMINDED=`added_param_value_no ADMINISABSENTMINDED $ADMINISABSENTMINDED`
|
||||
BLACKLISTNEWONLY=`added_param_value_no BLACKLISTNEWONLY $BLACKLISTNEWONLY`
|
||||
#
|
||||
# Strip the files that we use often
|
||||
#
|
||||
|
@ -23,6 +23,9 @@ Problems Corrected since version 1.4.6:
|
||||
|
||||
Error: Unable to determine the routes routes through interface xxx
|
||||
|
||||
4) Handling of the LOGUNCLEAN option in shorewall.conf has been
|
||||
corrected.
|
||||
|
||||
Migration Issues:
|
||||
|
||||
None.
|
||||
@ -47,5 +50,16 @@ New Features:
|
||||
Shorewall will only pass connection requests (SYN packets) to user
|
||||
space. This is for compatibility with p2pwall.
|
||||
|
||||
2. A BLACKLISTNEWNONLY option has been added to shorewall.conf. When
|
||||
this variable is set to "Yes", the blacklists (dynamic and static)
|
||||
are only consulted for new connection requests. When set to "No"
|
||||
(the default if the variable is not set), the blacklists are
|
||||
consulted on every packet.
|
||||
|
||||
Setting this variable to "No" allows blacklisting to stop existing
|
||||
connections from a newly blacklisted host but is more expensive in
|
||||
terms of packet processing time. This is especially true if the
|
||||
blacklists contain a large number of entries.
|
||||
|
||||
|
||||
|
||||
|
@ -463,6 +463,28 @@ NEWNOTSYN=No
|
||||
#
|
||||
ADMINISABSENTMINDED=Yes
|
||||
|
||||
#
|
||||
# BLACKLIST Behavior
|
||||
#
|
||||
# Shorewall offers two types of blacklisting:
|
||||
#
|
||||
# - static blacklisting through the /etc/shorewall/blacklist file together
|
||||
# with the 'blacklist' interface option.
|
||||
# - dynamic blacklisting using the 'drop', 'reject' and 'allow' commands.
|
||||
#
|
||||
# The following variable determines whether the blacklist is checked for each
|
||||
# packet or for each new connection.
|
||||
#
|
||||
# BLACKLISTNEWONLY=Yes Only consult blacklists for new connection
|
||||
# requests
|
||||
#
|
||||
# BLACKLISTNEWONLY=No Consult blacklists for all packets.
|
||||
#
|
||||
# If the BLACKLISTNEWONLY option is not set or is set to the empty value then
|
||||
# BLACKLISTNEWONLY=No is assumed.
|
||||
#
|
||||
BLACKLISTNEWONLY=Yes
|
||||
|
||||
################################################################################
|
||||
# P A C K E T D I S P O S I T I O N
|
||||
################################################################################
|
||||
|
Loading…
Reference in New Issue
Block a user