I want to make a site-to-site VPN connection and have set up a test environment where i have 4 VMs.
They are connected like this:
-------------------------- -----------------
| VM 2 | | VM 3 |
|OVPN-Server | Network 1 |IP: |
|eth1: 192.168.177.20----|--------------------------|192.168.177.30 |
|eth1:0: 192.168.179.20 | 192.168.177.0/24 |Gateway: |
|tun0: 10.0.0.1 | |192.168.177.20 |
-------------------------- -----------------
| | Internet
| |
| |
| | Network 2: OpenVPN
| | 10.0.0.0/24
| |
| |
-------------------------- -----------------
| VM 1 | | VM 4 |
|OVPN-Client | Network 3 | |
|eth2: 192.168.178.10--|--------------------------|192.168.178.40 |
|eth2:0: 192.168.179.10 | 192.168.178.0/24 |Gateway: |
|tun0: 10.0.0.6 (dhcp) | |192.168.178.10 |
-------------------------- -----------------
As you can see, each VM only has one interface, for VM2/server and VM1/client those interfaces have multiple IPs.
What should be:
Everyone should be able to ping everyone else.
What is:
VM1: ping to VM2 @ 192.168.177.20 [works]
VM1: ping to VM2 @ 10.0.0.1 [works]
VM1: ping to VM3 @ 192.168.177.30 [fails]
VM3: ping to VM2 @ 192.168.177.20 [works]
VM3: ping to VM2 @ 192.168.179.20 [works]
VM3: ping to VM2 @ 10.0.0.1 [fails]
VM2: ping to VM1 @192.168.179.10 [works]
VM2: ping to VM1 @ 10.0.0.6 [works]
VM2: ping to VM1 @192.168.178.10 [fails]
VM4 is not up yet as it slows down my host machine. I will test the full setup when everything else works.
These are the configuration files:
#server.conf
port 1194
proto udp
dev tun
server 10.0.0.0 255.255.255.0
dh /etc/openvpn/keys/dh1024.pem
ca /etc/openvpn/keys/ca.crt
key /etc/openvpn/keys/server.key
cert /etc/openvpn/keys/server.crt
client-config-dir /etc/openvpn/ccd
keepalive 10 60
route 192.168.178.0 255.255.255.0
push "route 192.168.177.0 255.255.255.0"
#/etc/openvpn/ccd/client
iroute 192.168.178.0 255.255.255.0
#client.conf
port 1194
proto udp
dev tun
client
remote 192.168.179.20
ca /etc/openvpn/keys/ca.crt
key /etc/openvpn/keys/client.key
cert /etc/openvpn/keys/client.crt
If anyone speaks german, I followed this tutorial:
http://wiki.openvpn.eu/index.php/Config_ServerNET_ClientNET
Thanks in advance.