[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Como zerar as configurações do IPTABLES?



Tenho este script:

#!/bin/bash
#
# rc.flush-iptables - Resets iptables to default values.
#
# Copyright (C) 2001 Oskar Andreasson <bluefluxATkoffeinDOTnet>
#
# Configurations
#
IPTABLES="/usr/sbin/iptables"
#
# reset the default policies in the filter table.
#
$IPTABLES -P INPUT ACCEPT
$IPTABLES -P FORWARD ACCEPT
$IPTABLES -P OUTPUT ACCEPT
#
# reset the default policies in the nat table.
#
$IPTABLES -t nat -P PREROUTING ACCEPT
$IPTABLES -t nat -P POSTROUTING ACCEPT
$IPTABLES -t nat -P OUTPUT ACCEPT
#
# reset the default policies in the mangle table.
#
$IPTABLES -t mangle -P PREROUTING ACCEPT
$IPTABLES -t mangle -P OUTPUT ACCEPT
#
# flush all the rules in the filter and nat tables.
#
$IPTABLES -F
$IPTABLES -t nat -F
$IPTABLES -t mangle -F
#
# erase all chains that?s not default in filter and nat table.
#
$IPTABLES -X
$IPTABLES -t nat -X
$IPTABLES -t mangle -X

Fabio.


<quote quem="Guilherme Rocha">
> Galera, comecei a configurar o IPTABLES usando o firestarter e acabei
> fazendo umas lambanças nas configurações, agora não sei se o firewall
> tá eficiente ou não.
>
> Pensei em remover e reinstalar ele, mas preferi perguntar por uma
> saída menos "ignorante"
>
> VAleus
>
>
> --
> Guilherme Rocha
> Consultor de Serviços
> *************************
> http://e-gui.homelinux.org
> Registered ID Linux: 391180
>
>



Reply to: