a.mendesaguiar
(usa Fedora)
Enviado em 01/02/2008 - 11:16h
############################################################
##### REGRA PARA REDIRECIONAR PORTA 80 PARA O SQUID #####
############################################################
#echo ""
#echo "$COLOR[44;37m Redirecionando porta 80 para o Squid $COLOR[0m"
#echo ""
## porta 3128 SQUID
iptables -A FORWARD -p tcp -d $ANY --dport 3128 -j ACCEPT
iptables -A FORWARD -p tcp -s $ANY --dport 3128 -j ACCEPT
iptables -A FORWARD -p tcp -d $ANY --sport 3128 -j ACCEPT
iptables -A FORWARD -p tcp -s $ANY --sport 3128 -j ACCEPT
iptables -A FORWARD -p udp -d $ANY --dport 3128 -j ACCEPT
iptables -A FORWARD -p udp -s $ANY --dport 3128 -j ACCEPT
iptables -A FORWARD -p udp -d $ANY --sport 3128 -j ACCEPT
iptables -A FORWARD -p udp -s $ANY --sport 3128 -j ACCEPT
iptables -A INPUT -p tcp -d $ANY --dport 3128 -j ACCEPT
iptables -A INPUT -p tcp -s $ANY --dport 3128 -j ACCEPT
iptables -A INPUT -p tcp -d $ANY --sport 3128 -j ACCEPT
iptables -A INPUT -p tcp -s $ANY --sport 3128 -j ACCEPT
iptables -A INPUT -p udp -d $ANY --dport 3128 -j ACCEPT
iptables -A INPUT -p udp -s $ANY --dport 3128 -j ACCEPT
iptables -A INPUT -p udp -d $ANY --sport 3128 -j ACCEPT
iptables -A INPUT -p udp -s $ANY --sport 3128 -j ACCEPT
iptables -A OUTPUT -p tcp -d $ANY --dport 3128 -j ACCEPT
iptables -A OUTPUT -p tcp -s $ANY --dport 3128 -j ACCEPT
iptables -A OUTPUT -p tcp -d $ANY --sport 3128 -j ACCEPT
iptables -A OUTPUT -p tcp -s $ANY --sport 3128 -j ACCEPT
iptables -A OUTPUT -p udp -d $ANY --dport 3128 -j ACCEPT
iptables -A OUTPUT -p udp -s $ANY --dport 3128 -j ACCEPT
iptables -A OUTPUT -p udp -d $ANY --sport 3128 -j ACCEPT
iptables -A OUTPUT -p udp -s $ANY --sport 3128 -j ACCEPT
.
.
.
.
.
#GERAL pela porta 3128
iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 3128
Da uma olhada ai .. para ver se isso ajuda em algo ...