Hi,
I meet an terrible issue with routes and OpenVPN. Below is my design:
Network 172.16.2.0/24<====>Linux Box<====>Vyatta<====>Network 172.16.4.0/24
My goal is to create the communication between network 172.16.2.0/24 and network 172.16.4.0/24 so I created a VPN between the Linux Box and Vyatta.
I used an OpenVPN server on Linux Box with this config:
Code:
port 1197
proto udp
dev tun3
ca ca.crt
cert server.crt
key server.key
dh dh1024.pem
server 10.8.24.0 255.255.255.0
push "route 172.16.2.0 255.255.255.0"
route 172.16.4.0 255.255.255.0
status openvpn-status.log
keepalive 10 120
comp-lzo
persist-key
persist-tun
verb 3
On the Vyatta side, I used this config:
Code:
openvpn vtun3 {
mode client
openvpn-option --comp-lzo
remote-host X.X.X.X
remote-port 1197
tls {
ca-cert-file ca.crt
cert-file mycert.crt
key-file mykey.key
}
The VPN is connected correctly and I can see its status in openvpn-status.log.
Now when I try the connectivity, I have some troubles:
Test 1 - from Vyatta to network 172.16.2.0/24: it works
Test 2 - from Linux Box to network 172.16.4.0/24: it doesn't work
Test 3 - from network 172.16.4.0/24 to network 172.16.2.0/24: it doesn't work
I did some trace in order to find out the issue.
Test 1: tcpdump on Vyatta
Code:
13:50:51.540985 IP 10.8.24.6 > 172.16.2.66: ICMP echo request, id 12158, seq 1, length 64
13:50:51.571067 IP 172.16.2.66 > 10.8.24.6: ICMP echo reply, id 12158, seq 1, length 64
13:50:52.542148 IP 10.8.24.6 > 172.16.2.66: ICMP echo request, id 12158, seq 2, length 64
13:50:52.569989 IP 172.16.2.66 > 10.8.24.6: ICMP echo reply, id 12158, seq 2, length 64
Test 2: tcpdump on the Linux Box
Code:
12:52:32.288776 IP 10.8.24.1 > 172.16.4.2: ICMP echo request, id 18473, seq 1, length 64
12:52:33.288937 IP 10.8.24.1 > 172.16.4.2: ICMP echo request, id 18473, seq 2, length 64
12:52:34.288838 IP 10.8.24.1 > 172.16.4.2: ICMP echo request, id 18473, seq 3, length 64
12:52:35.288798 IP 10.8.24.1 > 172.16.4.2: ICMP echo request, id 18473, seq 4, length 64
Strangely, I have nothing on the tcpdump on Vyatta with this test.
Test 3: tcpdump on Vyatta
Code:
13:55:01.533122 IP 172.16.4.2 > 172.16.2.1: ICMP echo request, id 51096, seq 1, length 64
13:55:02.533125 IP 172.16.4.2 > 172.16.2.1: ICMP echo request, id 51096, seq 2, length 64
13:55:03.533075 IP 172.16.4.2 > 172.16.2.1: ICMP echo request, id 51096, seq 3, length 64
13:55:04.533149 IP 172.16.4.2 > 172.16.2.1: ICMP echo request, id 51096, seq 4, length 64
Again, I have nothing on the tcpdump on the Linux Box with this test.
On the Linux Box, I have the correct route: (I removed all unnecessary routes on the output below)
Code:
[root@LinuxBox openvpn]# ip route
10.8.24.2 dev tun3 proto kernel scope link src 10.8.24.1
10.8.24.0/24 via 10.8.24.2 dev tun3
172.16.4.0/24 via 10.8.24.2 dev tun3
172.16.2.0/24 dev eth2 proto kernel scope link src 172.16.2.110
Same on the Vyatta:
Code:
root@vyatta:/# ip route
10.8.24.1 via 10.8.24.5 dev vtun3
10.8.24.5 dev vtun3 proto kernel scope link src 10.8.24.6
172.16.2.0/24 via 10.8.24.5 dev vtun3
172.16.4.0/24 dev eth1 proto kernel scope link src 172.16.4.1
Do you have any clue why I cannot make those 2 networks communicate together?
I really don't understand why I cannot see anything on the opposite side when I do test 2 and test 3. Do you have any idea?
Thank you for your help
PS: sorry for the long post.