| verzia 2.88, 2012/02/11 18:59:55 |
verzia 2.89, 2012/02/11 19:06:20 |
|
|
| # 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.87 2012-02-10 23:01:58 rajo Exp $ |
# $Platon: scripts/shell/firewall/fw-universal.sh,v 2.88 2012-02-11 18:59:55 rajo Exp $ |
| # |
# |
| # Changelog: |
# Changelog: |
| # 2003-10-24 - created |
# 2003-10-24 - created |
| Riadok 76 IPTABLES="${IPTABLES:=$DEBUG/sbin/iptabl |
|
| Riadok 76 IPTABLES="${IPTABLES:=$DEBUG/sbin/iptabl |
|
| IPTABLES_SAVE="${IPTABLES_SAVE:=$DEBUG/sbin/iptables-save}" |
IPTABLES_SAVE="${IPTABLES_SAVE:=$DEBUG/sbin/iptables-save}" |
| IPTABLES_RESTORE="${IPTABLES_RESTORE:=$DEBUG/sbin/iptables-restore}" |
IPTABLES_RESTORE="${IPTABLES_RESTORE:=$DEBUG/sbin/iptables-restore}" |
| |
|
| |
IPTABLES_TABLES="${IPTABLES_TABLES:=filter nat mangle}" |
| |
|
| |
|
| if [ "x$LOGGING" = "xoff" ]; then |
if [ "x$LOGGING" = "xoff" ]; then |
| IPTABLES_LOG=": log turned off" |
IPTABLES_LOG=": log turned off" |
| else |
else |
| Riadok 285 remove_chains() |
|
| Riadok 288 remove_chains() |
|
| $IPTABLES --flush spoof |
$IPTABLES --flush spoof |
| # TODO!!! |
# TODO!!! |
| else |
else |
| for table in filter nat mangle; do |
for table in $IPTABLES_TABLES; do |
| $IPTABLES -t $table -F # clear all chains |
$IPTABLES -t $table -F # clear all chains |
| $IPTABLES -t $table -X # remove all chains |
$IPTABLES -t $table -X # remove all chains |
| $IPTABLES -t $table -Z # zero counts |
$IPTABLES -t $table -Z # zero counts |