Gentoo Archives: gentoo-user-br

From: Ricardo Felix <felix.ricardo@×××××.com>
To: gentoo-user-br@l.g.o
Subject: [gentoo-user-br] VPN ipsec
Date: Wed, 24 Nov 2010 15:02:00
Message-Id: AANLkTin7Kx3du8sX5pwUVRFDbu7wbTV+y9m6c_ozLLTP@mail.gmail.com
1 Boa tarde galera, uma pergunta aqui que já to suando.
2 Alguém por aqui já criou uma VPN Ipsec com openswan e um Juniper SSG520 ?
3
4 Consigo colocar a VPN no Ar, mas o tráfego não passa de uma ponta a outra....
5
6 meus arquivos de conf...
7
8 ipsec.conf
9
10 conn HQtoDC
11         type=tunnel
12         left=189.38.x.x
13         leftsubnet=172.16.16.0/24
14         leftnexthop=200.160.x.x
15         right=200.160.x.x
16         rightsubnet=172.16.18.0/24
17         pfs=yes
18         keyingtries=0
19         aggrmode=no
20         auto=start
21         auth=esp
22         esp=3des-sha1-96
23         ike=3des-sha1-96
24         authby=secret
25
26
27 minha tabela de rotas após subir o ipsec
28
29 Kernel IP routing table
30 Destination          Gateway         Genmask         Flags Metric Ref
31   Use Iface
32 201.6.249.136   189.38.250.1    255.255.255.255 UGH   0      0        0 eth0
33 200.207.121.196 189.38.250.1    255.255.255.255 UGH   0      0        0 eth0
34 200.204.154.71  189.38.250.1    255.255.255.255 UGH   0      0        0 eth0
35 10.8.0.2        0.0.0.0         255.255.255.255 UH    0      0        0 tun0
36 201.81.231.236  189.38.250.1    255.255.255.255 UGH   0      0        0 eth0
37 74.125.93.121   189.38.250.1    255.255.255.255 UGH   0      0        0 eth0
38 201.81.224.243  189.38.250.1    255.255.255.255 UGH   0      0        0 eth0
39 200.171.213.106 189.38.250.1    255.255.255.255 UGH   0      0        0 eth0
40 200.158.83.246  189.38.250.1    255.255.255.255 UGH   0      0        0 eth0
41 200.160.255.48  189.38.250.1    255.255.255.240 UG    0      0        0 eth0
42 172.16.18.0     0.0.0.0         255.255.255.0   U     0      0        0 eth0
43 10.0.0.0        0.0.0.0         255.255.255.0   U     0      0        0 eth2
44 189.38.250.0    0.0.0.0         255.255.255.0   U     0      0        0 eth0
45 10.8.0.0        10.8.0.2        255.255.255.0   UG    0      0        0 tun0
46 172.16.16.0     0.0.0.0         255.255.255.0   U     0      0        0 eth1
47 187.38.0.0      0.0.0.0         255.255.240.0   U     0      0        0 eth3
48 10.0.0.0        10.0.0.1        255.255.0.0     UG    0      0        0 eth2
49 74.125.0.0      189.38.250.1    255.255.0.0     UG    0      0        0 eth0
50 0.0.0.0         187.38.0.1      0.0.0.0         UG    0      0        0 eth3
51
52
53 Comandos iptables para permitir o tráfego entre as redes.
54
55 iptables -t nat -A POSTROUTING -o eth0 -s 172.16.16.0/24 -d !
56 172.16.18.0/24 -j MASQUERADE
57 iptables -A FORWARD -p tcp -i eth0 -s 172.16.18.0/24 -o eth1 -d
58 172.16.16.0/24 -j ACCEPT
59 iptables -A FORWARD -p tcp -i eth1 -s 172.16.16.0/24 -o eth0 -d
60 172.16.18.0/24 -j ACCEPT
61
62
63 Não pego pacotes sendo dropados no linux.
64 Alguma ideia iluminada...?
65
66 Abraços
67 Ricardo Felix do Nascimento

Replies

Subject Author
RES: [gentoo-user-br] VPN ipsec Eduardo Schoedler <eschoedler@×××××××××××.br>