<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;"><DIV>Hola a todos es mi primer post para la lista de centos y les quiero consultar sobre un tema de redireccionamiento.</DIV>
<DIV>&nbsp;</DIV>
<DIV>Tengo un firewall/proxy (iptables/squid) en centos 5, ahora este serv. cuenta con una ip publica 12.12.12.5, asimismo, dentro de mi lan tengo un serv. que la hara de extranet configurado con iis bajo el puerto 83 con una ip 192.168.0.2, lo que deseo es q las peticiones al sgt link: por ejemplo: <A href="http://www.miextranet:83/extranet">www.miextranet:83/extranet</A> por medio del firewall redirecione a la ip del serv. extarnet la el cual es 192.168.0.2. para acceder desde el ser. extranet lo hago poniendo <A href="http://www.192.168.0.2:83/extranet">www.192.168.0.2:83/extranet</A> .</DIV>
<DIV>&nbsp;</DIV>
<DIV>Ahora esto es lo que tengo en mi firewall: ETH1 INTERNET - ETH0&nbsp; LAN</DIV>
<DIV>&nbsp;</DIV>
<DIV># Vaciado de reglas<BR>&nbsp;iptables -F<BR>&nbsp;iptables -X<BR>&nbsp;iptables -Z<BR>&nbsp;iptables -t nat -F</DIV>
<DIV>## Establecemos politica predeterminada: DROP<BR>&nbsp;iptables -P INPUT ACCEPT<BR>&nbsp;iptables -P OUTPUT ACCEPT<BR>&nbsp;iptables -P FORWARD DROP</DIV>
<DIV>&nbsp;iptables -t nat -A POSTROUTING -s 192.168.0.0/24 -o eth1 -j MASQUERADE</DIV>
<DIV>#Todo pasa por el squid<BR>&nbsp;iptables -t nat -A PREROUTING -i eth0 -s 192.168.0.0/24 -p tcp --dport 80 -j REDIRECT --to-port 3128</DIV>
<DIV>##Redireccionar trafico que proviene desde la ip-publica del FW al serv-web<BR><STRONG>&nbsp;iptables -t nat -A POSTROUTING -o eth1 -j SNAT --to&nbsp;12.12.12.5<BR>&nbsp;iptables -t nat -A PREROUTING -i eth1 -s 0/0 -p tcp --dport 83 -j DNAT --to-destination 192.168.0.2:83</STRONG></DIV>
<DIV>## Acceso desde la red<BR>&nbsp;iptables -A INPUT -i lo -j ACCEPT<BR>&nbsp;iptables -A OUTPUT -o lo -j ACCEPT</DIV>
<DIV># Configuramos el acceso a nuestra IP<BR>&nbsp;iptables -A INPUT -s 192.168.0.0/24 -j ACCEPT<BR>&nbsp;iptables -A INPUT -s 0/0 -p tcp --sport 1:1024 -j ACCEPT<BR>&nbsp;iptables -A INPUT -s 0/0 -p tcp --dport 1025:65535 ! --syn -j ACCEPT<BR>&nbsp;iptables -A INPUT -s 0/0 -p udp --sport 1:1024 -j ACCEPT<BR>&nbsp;iptables -A OUTPUT -d 192.168.0.0/24 -j ACCEPT<BR>&nbsp;iptables -A OUTPUT -d 0/0&nbsp; -p tcp --sport 1025:65535 -j ACCEPT</DIV>
<DIV>&nbsp;iptables -A INPUT -p udp -m state --state ESTABLISHED -j ACCEPT<BR>&nbsp;iptables -A OUTPUT -p udp -m state --state NEW,ESTABLISHED -j ACCEPT</DIV>
<DIV>&nbsp;iptables -A INPUT -p tcp ! --syn -m state --state NEW -j DROP<BR>&nbsp;iptables -A INPUT -p tcp -m state --state ESTABLISHED -j ACCEPT<BR>&nbsp;iptables -A OUTPUT -p tcp -m state --state NEW,ESTABLISHED -j ACCEPT</DIV>
<DIV>## Servidores WEB<BR>&nbsp;# Acceso a puertos 80<BR>&nbsp;#iptables -A FORWARD -p tcp --dport 80 -j ACCEPT</DIV>
<DIV>&nbsp;#iptables -A FORWARD -p tcp --sport 80 -j ACCEPT</DIV>
<DIV>&nbsp;#iptables -A FORWARD -p tcp --dport 443 -d 0/0 -j ACCEPT<BR>&nbsp;#iptables -A FORWARD -p tcp --sport 443 -d 0/0 -j ACCEPT</DIV>
<DIV>&nbsp;iptables -A FORWARD -p tcp -i eth0 -o eth1 -m state --state NEW,ESTABLISHED,RELATED --dport 80 -j ACCEPT<BR>&nbsp;iptables -A FORWARD -p tcp -i eth1 -o eth0 -m state --state ESTABLISHED,RELATED --sport 80 -j ACCEPT<BR>&nbsp;iptables -A FORWARD -p tcp -i eth0 -o eth1 -m state --state NEW,ESTABLISHED,RELATED --dport 443 -j ACCEPT<BR>&nbsp;iptables -A FORWARD -p tcp -i eth1 -o eth0 -m state --state ESTABLISHED,RELATED --sport 443 -j ACCEPT</DIV>
<DIV>&nbsp;# Acceso a puertos 20 y 21 para ftp<BR>&nbsp;iptables -A FORWARD -p tcp --dport 20:21 -j ACCEPT<BR>&nbsp;iptables -A FORWARD -p tcp --sport 20:21 -j ACCEPT</DIV>
<DIV>&nbsp;# Acceso a DNS<BR>&nbsp;iptables -A FORWARD -p tcp --dport 53 -j ACCEPT<BR>&nbsp;iptables -A FORWARD -p tcp --sport 53 -j ACCEPT<BR>&nbsp;iptables -A FORWARD -p udp --dport 53 -j ACCEPT<BR>&nbsp;iptables -A FORWARD -p udp --sport 53 -j ACCEPT</DIV>
<DIV>## correo electr�nico<BR>&nbsp;# Acceso a puerto 25, 110 y 143<BR>&nbsp;iptables -A FORWARD -p tcp --dport 25 -j ACCEPT<BR>&nbsp;iptables -A FORWARD -p tcp --sport 25 -j ACCEPT</DIV>
<DIV>&nbsp;iptables -A FORWARD -p tcp --dport 110 -j ACCEPT<BR>&nbsp;iptables -A FORWARD -p tcp --sport 110 -j ACCEPT</DIV>
<DIV>&nbsp;iptables -A FORWARD -p tcp --dport 143 -j ACCEPT<BR>&nbsp;iptables -A FORWARD -p tcp --sport 143 -j ACCEPT<BR><BR><STRONG>que estoy haciendo mal o q me falta poner segun mi creterio y mis pocos conocimientos con la regla que esta en negrita es suficiente. help</STRONG></DIV>
<DIV>&nbsp;</DIV></td></tr></table><br>