removido
(usa Nenhuma)
Enviado em 15/09/2010 - 01:36h
agr está assim
=======================
#!/bin/bash
IPTABLES="/usr/sbin/iptables"
# Limpando as regras em memória
$IPTABLES -F -t filter
$IPTABLES -F -t mangle
$IPTABLES -F -t nat
$IPTABLES -X -t filter
$IPTABLES -X -t mangle
$IPTABLES -X -t nat
$IPTABLES -Z -t filter
$IPTABLES -Z -t mangle
$IPTABLES -Z -t nat
# Mudando as políticas para DROP
$IPTABLES -t filter -P INPUT DROP
$IPTABLES -t filter -P OUTPUT DROP
$IPTABLES -t filter -P FORWARD DROP
#INPUT
$IPTABLES -A INPUT -p tcp --dport 22 -j ACCEPT
$IPTABLES -A INPUT -p tcp -m multiport --sports 80,443 -j ACCEPT
$IPTABLES -A INPUT -p tcp -m multiport --sports 53,5353 -j ACCEPT
$IPTABLES -A INPUT -p udp -m multiport --sports 53,5353 -j ACCEPT
#FORWARD
$IPTABLES -A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT
#OUTPUT
$IPTABLES -A OUTPUT -p tcp -m multiport --dports 80,443 -j ACCEPT
$IPTABLES -A OUTPUT -p tcp -m multiport --dports 53,5353 -j ACCEPT
$IPTABLES -A OUTPUT -p udp -m multiport --dports 53,5353 -j ACCEPT
echo "Iptables...[Ok]"
============================================
e não consegui ter acesso a internet, e não consegui acessar o link "com outra regra do firewall"