Platon Technologies
not logged in Login Registration
EnglishSlovak
open source software development celebrating 10 years of open source development! Thursday, April 18, 2024

File: [Platon] / scripts / shell / firewall / fw-off.sh (download)

Revision 1.2, Wed Aug 9 11:50:19 2006 UTC (17 years, 8 months ago) by rajo


Changes since 1.1: +18 -38 lines

Remove all iptables rules.

#!/bin/sh

#
# fw-off.sh
#
# Developed by Ondrej Jombik <nepto@platon.sk>
# Copyright (c) 2003 Platon SDG, http://platon.sk/
# Licensed under terms of GNU General Public License.
# All rights reserved.
#
# Changelog:
# 10/01/2002 - created
# 02/08/2003 - import into CVS
# 09/08/2006 - enhanced by Lubomir Host 'rajo' <rajo AT platon.sk> - simplification of rules removal
#

# $Platon: scripts/shell/firewall/fw-off.sh,v 1.1 2003/08/03 14:11:32 nepto Exp $

IPTABLES="/sbin/iptables"

for chain in INPUT OUTPUT FORWARD; do
    $IPTABLES -t filter -P $chain ACCEPT
done

for chain in PREROUTING POSTROUTING OUTPUT; do
    $IPTABLES -t nat -P $chain ACCEPT
done

for chain in PREROUTING INPUT FORWARD OUTPUT POSTROUTING; do
    $IPTABLES -t mangle -P $chain ACCEPT
done

for table in filter nat mangle; do
    iptables -F -t $table
    iptables -X -t $table
done


Platon Group <platon@platon.org> http://platon.org/
Copyright © 2002-2006 Platon Group
Site powered by Metafox CMS
Go to Top