[MASOCH-L] VPN ipsec

Diogo Montagner diogo.montagner at gmail.com
Thu Nov 25 03:43:02 BRST 2010


Tem muito tempo que eu nao trabalho com iptables. Posso estar errado,
mas pq vc precisa fazer nat para a rede 18 (opcao -j MASQUERADE) ?

Talvez o problema esteja ai.

[]s

On 11/25/10, Ricardo Felix <felix.ricardo at gmail.com> wrote:
> Boa tarde galera, uma pergunta aqui que já to suando.
> Alguém por aqui já criou uma VPN Ipsec com openswan e um Juniper SSG520 ?
>
> Consigo colocar a VPN no Ar, mas o tráfego não passa de uma ponta a
> outra....
>
> meus arquivos de conf...
>
> ipsec.conf
>
> conn HQtoDC
>         type=tunnel
>         left=189.38.x.x
>         leftsubnet=172.16.16.0/24
>         leftnexthop=200.160.x.x
>         right=200.160.x.x
>         rightsubnet=172.16.18.0/24
>         pfs=yes
>         keyingtries=0
>         aggrmode=no
>         auto=start
>         auth=esp
>         esp=3des-sha1-96
>         ike=3des-sha1-96
>         authby=secret
>
>
> minha tabela de rotas após subir o ipsec
>
> Kernel IP routing table
> Destination          Gateway         Genmask         Flags Metric Ref
>   Use Iface
> 201.6.249.136   189.38.250.1    255.255.255.255 UGH   0      0        0 eth0
> 200.207.121.196 189.38.250.1    255.255.255.255 UGH   0      0        0 eth0
> 200.204.154.71  189.38.250.1    255.255.255.255 UGH   0      0        0 eth0
> 10.8.0.2        0.0.0.0         255.255.255.255 UH    0      0        0 tun0
> 201.81.231.236  189.38.250.1    255.255.255.255 UGH   0      0        0 eth0
> 74.125.93.121   189.38.250.1    255.255.255.255 UGH   0      0        0 eth0
> 201.81.224.243  189.38.250.1    255.255.255.255 UGH   0      0        0 eth0
> 200.171.213.106 189.38.250.1    255.255.255.255 UGH   0      0        0 eth0
> 200.158.83.246  189.38.250.1    255.255.255.255 UGH   0      0        0 eth0
> 200.160.255.48  189.38.250.1    255.255.255.240 UG    0      0        0 eth0
> 172.16.18.0     0.0.0.0         255.255.255.0   U     0      0        0 eth0
> 10.0.0.0        0.0.0.0         255.255.255.0   U     0      0        0 eth2
> 189.38.250.0    0.0.0.0         255.255.255.0   U     0      0        0 eth0
> 10.8.0.0        10.8.0.2        255.255.255.0   UG    0      0        0 tun0
> 172.16.16.0     0.0.0.0         255.255.255.0   U     0      0        0 eth1
> 187.38.0.0      0.0.0.0         255.255.240.0   U     0      0        0 eth3
> 10.0.0.0        10.0.0.1        255.255.0.0     UG    0      0        0 eth2
> 74.125.0.0      189.38.250.1    255.255.0.0     UG    0      0        0 eth0
> 0.0.0.0         187.38.0.1      0.0.0.0         UG    0      0        0 eth3
>
>
> Comandos iptables para permitir o tráfego entre as redes.
>
> iptables -t nat -A POSTROUTING -o eth0 -s 172.16.16.0/24 -d !
> 172.16.18.0/24 -j MASQUERADE
> iptables -A FORWARD -p tcp -i eth0 -s 172.16.18.0/24 -o eth1 -d
> 172.16.16.0/24 -j ACCEPT
> iptables -A FORWARD -p tcp -i eth1 -s 172.16.16.0/24 -o eth0 -d
> 172.16.18.0/24 -j ACCEPT
>
>
> Não pego pacotes sendo dropados no linux.
> Alguma ideia iluminada...?
>
> Abraços
> Ricardo Felix do Nascimento
> __
> masoch-l list
> https://eng.registro.br/mailman/listinfo/masoch-l
>

-- 
Sent from my mobile device

./diogo -montagner


More information about the masoch-l mailing list