----- Original Message -----
From: Br�ulio Weimann Gergull <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Thursday, June 21, 2001 12:42 PM
Subject: Re: (linux-br) Problemas = Kernel 2.44 + iptables + NAT
Acesso pelo menor pre�o do mercado! R$ 14,90 nos 3 primeiros meses!
ASSINE AGORA! http://www.bol.com.br/acessobol/
[EMAIL PROTECTED] wrote:
<-- SNIP -->
> Preciso que todo trafego que chegue em
> 192.168.168.253:80 v� para o meu web server da intranet
> (10.2.21.80). Acho que um nat (alterando o end de
> destino) consigo isso....Estou certo..?
Certo.
> Ai escrevi as seguintes regras do iptables
>
> iptables -t nat -F PREROUTING
>
> iptables -t nat -A PREROUTING -t tcp -d 192.168.253.253 -
> -dport 80 -j DNAT --to 10.2.21.80:80
>
> Aponto meu browser para 192.168.168.253 e nada porem,
> quando dou um:
> iptable -L -nv -t nat
> vejo que a regra foi aplicada
>
> O que pode estar errado..?
Precisa colocar o nat no sentido inverso tb, ie. o tr�fego que sai do
10.2.21.80 tem que ser mascarado para 192.168.168.253
iptables -t nat -A POSTROUTING -s 10.2.21.80 -j MASQUERADE
Mesmo colocando esta regra nao funcionou
Qual a necessidade desta regra..ela nao � coberta pelo NAT implicito..?
If one of these links were to do NAT, then they would alter the source or
destinations of the packet as it passes through. As you can imagine, this is
not how the system was designed to work, and hence NAT is always something
of a crock. Usually the link doing NAT will remember how it mangled a
packet, and when a reply packet passes through the other way, it will do the
reverse mangling on that reply packet, so everything works.
http://netfilter.samba.org/unreliable-guides/NAT-HOWTO/NAT-HOWTO.linuxdoc-2.
html#ss2.1
> QUe estrategia posso utilizar para debugar este
> probleminha.
tcpdump
[]s,
Br�ulio Gergull
GetNet Comunica��es
http://www.getnet.com.br/
Assinantes em 21/06/2001: 2318
Mensagens recebidas desde 07/01/1999: 119320
Historico e [des]cadastramento: http://linux-br.conectiva.com.br
Assuntos administrativos e problemas com a lista:
mailto:[EMAIL PROTECTED]