sill
(usa Debian)
Enviado em 16/03/2009 - 10:30h
Bom dia,
gente olha eu tenho quase certeza q meu problema está na má configuração da rede.
Vejam só:
Vamos supor que o ip fornecido pela telefonica seja 200.201.202.3
eu deixei minha interfaces assim:
auto eth0
iface eth0 inet dhcp
auto eth1
iface eth1 inet static
address 192.168.1.250 (exemplo tbm)
network 255.255.255.0
***** meu pc *****
IP 192.168.1.1 (exemplo)
MASC 255.255.255.0
GAT 192.168.1.250
SERVIDOR DNS 200.204.0.10
200.204.0.138
Já deixei tbm como 192.168.1.250
******************FIREWALL EU ADAPTEI O MEU COM O QUE O VERDINHO SUGERIU, FICANDO ASSIM:
#!/bin/bash
# REGRAS DE FIREWALL PROXY ;SQUID ;APACHE ;SARG ;DHCP3-SERVER ;BIND
#########################################################################
#
echo
echo "=========================================="
echo "| :: SETTING IPTABLES'S CONFIGURATION :: |"
echo "=========================================="
#
iptables=/sbin/iptables
IF_LAN="eth1"
IF_WAN="eth0"
IF_IP="192.168.0.0/24"
#Loga tentativa de acesso a determinadas portas no Caso de Webmail
# -------------------------------------------------------
$iptables -A INPUT -p tcp --dport 21 -i $IF_WAN -j LOG --log-level 6 --log-prefix "FIREWALL: ftp:"
$iptables -A INPUT -p tcp --dport 25 -i $IF_WAN -j LOG --log-level 6 --log-prefix "FIREWALL: smtp:"
$iptables -A INPUT -p tcp --dport 80 -i $IF_WAN -j LOG --log-level 6 --log-prefix "FIREWALL: http:"
$iptables -A INPUT -p tcp --dport 110 -i $IF_WAN -j LOG --log-level 6 --log-prefix "FIREWALL: pop3:"
#
flush_rules()
{
iptables -F
iptables -t nat -F
iptables -t mangle -F
iptables -X
iptables -Z
}
#
add_rules()
{
######################Habilitando o roteamento
echo 1 > /proc/sys/net/ipv4/ip_forward
echo "Roteamento .........................[ OK ]"
#
#
######################CARREGANDO MODULOS
/sbin/modprobe ip_tables
/sbin/modprobe iptable_filter
/sbin/modprobe iptable_mangle
/sbin/modprobe iptable_nat
/sbin/modprobe ipt_MASQUERADE
/sbin/modprobe ipt_state
/sbin/modprobe ip_conntrack
/sbin/modprobe ip_conntrack_ftp
/sbin/modprobe ipt_multiport
/sbin/modprobe ip_nat_ftp
/sbin/modprobe ipt_tos
/sbin/modprobe ipt_limit
echo "Loading iptables's modules .........[ OK ]"
#
# Libera acesso a determinadas portas na sua maquina Esta parte e muito importante
# -------------------------------------------------------
$iptables -A INPUT -p tcp --destination-port 22 -j ACCEPT # SSH
$iptables -A INPUT -p tcp --dport 22 -j ACCEPT
$iptables -A INPUT -p tcp --dport 8017 -j ACCEPT # TED
$iptables -A INPUT -p tcp --dport 443 -j ACCEPT
$iptables -A INPUT -p tcp --destination-port 53 -j ACCEPT # >>> DNS Transferencia de zona
$iptables -A INPUT -p udp --destination-port 53 -j ACCEPT # >>> DNS Consultas
$iptables -A INPUT -p TCP --dport 53 -i $IF_WAN -j ACCEPT
$iptables -A INPUT -p UDP --dport 53 -i $IF_WAN -j ACCEPT
$iptables -A INPUT -p tcp --dport 22 -i $IF_WAN -j ACCEPT
$iptables -A INPUT -p tcp --dport 3128 -i $IF_LAN -j ACCEPT
$iptables -A INPUT -p tcp --dport 80 -i $IF_LAN -j ACCEPT
$iptables -A INPUT -p tcp --dport 8080 -i $IF_LAN -j ACCEPT
# CONEXAO DE SAIDA ( Acesso da rede interna direto para Internet )
#---------------------------------------------------------------------
$iptables -A FORWARD -p tcp -i $IF_LAN -s 200.201.202.3 --dport 110 -j ACCEPT
$iptables -A FORWARD -p tcp -i $IF_LAN -s 200.201.202.3 -m multiport --dport 80,443 -j ACCEPT
# Proxy transparente
# -------------------------------------------------------
$iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 3128
#
}
case $1 in
start)
echo -n Starting Firewall...
add_rules
echo "Done"
;;
stop)
echo -n Stoping Firewall...
flush_rules
echo "Done"
;;
restart)
echo Restarting Firewall...
flush_rules
iptables -F INPUT
iptables -F OUTPUT
iptables -F FORWARD
echo "Cleaning all rules .................[ OK ]"
add_rules
echo "Done"
;;
status)
echo "============================ Firewall rules:"
iptables -L -n
echo "============================ Masquerade tables:"
iptables -t nat -L -n
echo "============================ Mangle table:"
iptables -t mangle -L -n
;;
*)
echo Usar: "$0 { status | start | stop | restart }"
;;
esac
exit 0
-------------------
Antes eu consegui pingar o ip do servidor pelo menos, mas agora nem isso!!
Já estou desesperada.