Rozdiely pre scripts/shell/firewall/fw-universal.sh medzi verziami 2.73 a 2.74
verzia 2.73, 2010/06/21 21:52:16 |
verzia 2.74, 2010/08/08 23:34:25 |
|
|
# Licensed under terms of GNU General Public License. |
# Licensed under terms of GNU General Public License. |
# All rights reserved. |
# All rights reserved. |
# |
# |
# $Platon: scripts/shell/firewall/fw-universal.sh,v 2.72 2010-06-09 11:29:14 nepto Exp $ |
# $Platon: scripts/shell/firewall/fw-universal.sh,v 2.73 2010-06-21 21:52:16 nepto Exp $ |
# |
# |
# Changelog: |
# Changelog: |
# 2003-10-24 - created |
# 2003-10-24 - created |
Riadok 1025 configure_special_rules() |
|
Riadok 1025 configure_special_rules() |
|
|
|
} # }}} |
} # }}} |
|
|
|
custom_rules() |
|
{ # {{{ |
|
print_info -en "Executing custom rules: " |
|
for max_rule_num in 9 99 999; do |
|
initialized="no"; |
|
for i in `seq -w 0 "$max_rule_num"`; do |
|
varname="CUSTOM_RULE_$i"; |
|
if [ -z "${!varname}" ]; then |
|
break; |
|
fi |
|
echo -n "#$i"; |
|
$IPTABLES ${!varname}; |
|
rc="$?"; |
|
if [ "$rc" -eq 0 ]; then |
|
echo -n "[OK] "; |
|
else |
|
echo -n "[rc:$?] "; |
|
fi; |
|
initialized="yes"; |
|
done |
|
if [ "X$initialized" = "Xyes" ]; then |
|
break; |
|
fi |
|
done |
|
print_info " done."; |
|
} # }}} |
|
|
do_ip_accounting() |
do_ip_accounting() |
{ # {{{ |
{ # {{{ |
|
|
|
|
shaping_off |
shaping_off |
shaping_on |
shaping_on |
configure_special_rules |
configure_special_rules |
|
custom_rules |
$IPTABLES_SAVE -c > $CACHE_FILE |
$IPTABLES_SAVE -c > $CACHE_FILE |
;; |
;; |
|
|
Platon Group <platon@platon.sk> http://platon.sk/
|
|