removido
(usa Nenhuma)
Enviado em 28/09/2010 - 22:33h
estou rodando o samba em meu desk, quando eu carrego o firewall, meu irmão que está no note "wireless" não consegue mais acessar
tbm no meu desk estou rodando algumas maquinas virtuais que uso p treinar um pouco, tenho um slackware, winXP e win2003
o que preciso fazer?
======================= iptables =================================
#!/bin/bash
# Comando IPTables
IPTABLES="/usr/sbin/iptables"
# Interface Internet
P1="eth0"
##################################################################
# 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 ACCEPT
$IPTABLES -t filter -P OUTPUT ACCEPT
$IPTABLES -t filter -P FORWARD ACCEPT
###################################################################
# INPUT
# Liberar lo
$IPTABLES -A INPUT -i lo -j ACCEPT
## Manter Conexões Estabelecidas
$IPTABLES -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
# FTP
# SAMBA
$IPTABLES -A INPUT -s 192.168.1.0/24 -p tcp --dport 137:139 -j ACCEPT
$IPTABLES -A INPUT -s 192.168.1.0/24 -p udp --dport 137:139 -j ACCEPT
# -------------------------------------------------------------------------------------------
# OUTPUT
## DNS
$IPTABLES -A OUTPUT -o $P1 -p tcp -m multiport --dports 53,5353 -j ACCEPT
$IPTABLES -A OUTPUT -o $P1 -p udp -m multiport --dports 53,5353 -j ACCEPT
## HTTP e HTTPS
$IPTABLES -A OUTPUT -o $P1 -p tcp -m multiport --dports 80,8080,8081,443 -j ACCEPT
## MSN
$IPTABLES -A OUTPUT -o $P1 -p tcp -m multiport --dports 1863,7001 -j ACCEPT
$IPTABLES -A OUTPUT -o $P1 -p udp --dport 7001 -j ACCEPT
## Gtalk/Jabber
#$IPTABLES -A OUTPUT -o $INET -p tcp --dport 5222 -j ACCEPT
## Ping
$IPTABLES -A OUTPUT -o $P1 -p icmp --icmp-type 8 -j ACCEPT
# FTP
$IPTABLES -A OUTPUT -p tcp --dport 21 -j ACCEPT
$IPTABLES -A OUTPUT -p tcp --dport 20 -j ACCEPT
# SAMBA
$IPTABLES -A OUTPUT -s 192.168.1.0/24 -p tcp --dport 137:139 -j ACCEPT
$IPTABLES -A OUTPUT -s 192.168.1.0/24 -p udp --dport 137:139 -j ACCEPT
# --------------------------------------------------------------------------------------------
# FOWARD
# Contra DoS:
# Protege contra os ataques do tipo Syn-flood
$IPTABLES -A FORWARD -p tcp --syn -m limit --limit 10/s -j ACCEPT
$IPTABLES -A FORWARD -p tcp --syn -j DROP
# FTP
$IPTABLES -A FORWARD -p tcp --dport 21 -j ACCEPT
# SAMBA
echo "Iptables...[Ok]"
===============================================================
o meu ip do desk e do note é reservado pelo roteador
desk: 192.168.1.100
note: 192.168.1.101
as maquinas virtuais fazem DHCP e normalmente fica com
192.168.1.102
192.168.1.103
192.168.1.104
qualquer ajuda será bem vinda, vlw