[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [off] OpenVPN e utilização de rotas para estação navegar na web



Em Sex, 2005-09-30 às 12:09 -0300, Vinicius Vasconcellos escreveu:

> casa:/micro# route -n
> Tabela de Roteamento IP do Kernel
> Destino         Roteador        MáscaraGen.    Opções Métrica Ref   Uso Iface
> 10.0.0.5        0.0.0.0         255.255.255.255 UH    0      0        0 tun0
> 200.217.72.XXX   0.0.0.0         255.255.255.255 UH    0      0        0 ppp0
> 10.0.0.0        0.0.0.0         255.255.255.0   U     0      0        0 eth0
> 172.17.1.0      0.0.0.0         255.255.255.0   U     0      0        0 eth1
> 0.0.0.0         200.217.72.XXX   0.0.0.0         UG    0      0        0 ppp0
O teu problema aqui está sendo endereçamento IP.
Pelo que eu vi seu pc está mais ou menos assim:
ETH0 10.0.0.algumacoisa
ETH1 172.17.1.algumacoisa
Qual é o endereçamento do tun0?

Primeiro as redes não podem ter endereçamento iguais. A não ser que você
esteja pensando em trabalhar com bridge, ai você terá que parra para
tap.
Anyway, Faça o seguinte.

REDEA (matriz) =  10.0.0.0/24
REDEB (filial) = 10.0.1.0/24
VPN = 10.0.2.0/24

Servidor MAtriz
Eth0 = 10.0.0.1
Eth1 = 172.17.1.1
tun0 = 10.0.2.1

Servidor filial
Eth0 = 10.0.1.1
tun0 = 10.0.2.2

Rota na matriz
route add -net 10.0.1.0 netmask 255.255.255.0 gw 10.0.2.2

Rota na filial
route add -net 10.0.0.0 netmask 255.255.255.0 gw 10.0.2.1
route add -net 172.17.1.0 netmask 255.255.255.0 gw 10.0.2.1


No firewall, quando for fazer o NAT para internet, lembre-se de colocar
a interface de saída na regra, senão ele vai mascarar todo o tráfego
forward.

Espero ter ajudado.

-- 
Raphael Bittencourt S. Costa <raphaelbscosta@yahoo.com.br>
Jabber ID: raphaelbscosta@jabber.org
ICQ: 77515478
Freenode: Pyriel

Attachment: signature.asc
Description: Esta =?ISO-8859-1?Q?=E9?= uma parte de mensagem assinada digitalmente


Reply to: