Valeu pela dica, mas para a vpn n�o resolveu, ficou da mesma forma que
fazendo com o iptables.

Continuo sem solu��o para direcionar a porta pela vpn.

[]s

Dilceu
----- Original Message ----- 
From: "Fabiano Rodrigues" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: "debian" <[email protected]>
Sent: Tuesday, May 31, 2005 6:26 PM
Subject: Re: Redirecionar porta


Ser� que ajuda?


# apt-cache show redir

Description: Redirect TCP connections

On Tue, 31 May 2005 16:39:20 -0300
<[EMAIL PROTECTED]> wrote:

> Ol� Pessoal,
>
> Seguinte, tenho a seguinte situa��o:
> Matriz e filial Debian woody 3.0 r3. Na matriz tem um link dedicado de
512k
> e na filial um adsl com ip dinamico. Os dois pontos s�o interligados por
uma
> VPN utilizadno openvpn. At� aqui, esta tudo certo, pois tudo funciona
> perfeitamente. O problema � que na filial tem um que escuta na porta 3000
e
> esse deve ser acessado via internet, como na filial n�o tem ip fixo tentei
> fazer nat da matriz para a filial usando a vpn, mas n�o tive sucesso, pois
o
> pacote chega na filial e at� tem resposta, mas a resposta � enviada pelo
> adsl (fora do tunel vpn) e o que eu preciso � que essa m�quina responda
para
> o servidor da matriz e ai sim a matriz enviar a resposta para a origem.
> Abaixo segue algumas regras de iptables que tentei usar para fazer isso
> funcionar.
> Redes internas
> Matriz > 192.168.0.0/24 (rede interna) filial >192.168.99.0/24
> Matriz > 192.168.197.1 (tunel vpn) Filial >192.168.197.2
>
> Matriz
> $IPTABLES -A FORWARD -i tun+ -j ACCEPT
> $IPTABLES -t nat -A PREROUTING -p tcp --dport 3000 -j DNAT --to
> 192.168.197.2:3000
> Ou seja, estou acetando tudo que vem da interface tun+ e direcionando o
> trafego da porta 3000 para o gateway da filial
>
> Filial
> $IPTABLES -A INPUT -i tun+ -j ACCEPT
> $IPTABLES -A FORWARD -i tun+ -j ACCEPT
> $IPTABLES -t nat -A PREROUTING -p tcp --dport 3000 -j DNAT --to
> 192.168.99.13:3000
>
>
> Grato por qualquer ajuda
>
> Dilceu
>
>
> -- 
> To UNSUBSCRIBE, email to [EMAIL PROTECTED]
> with a subject of "unsubscribe". Trouble? Contact
[EMAIL PROTECTED]
>
>


-- 
frodrigues arroba ig ponto com ponto br



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Responder a