hey all 🙂
I have this environment:
Physical Machine A with two interfaces:
- physical interface eth0 10.0.0.130
- virtual interface virbr0 172.16.99.1 (dnsmasq from libvirt)
- virtual kvm machine A1 172.16.99.76
- in kvm machine A1 I configured a VPN server with 172.16.100.0/24 network
Physical Machine B with two interfaces:
- physical interface eth0 10.0.0.132
- virtual interface virbr0 172.16.101.1 (dnsmasq from libvirt)
- virtual kvm machine B1 172.16.101.202
- in kvm machine B1 I configured a VPN client to connect to 10.0.0.130 (and on 10.0.0.130 i had FORWARD to 172.16.99.76 with iptables)
I'm connecting A1 and B1 virtual machines with openvpn. That worked, but what I need is connect two subnets, ie, 172.16.101.0/24 can ping 172.16.99.0/24 and vice versa.
To share route/subnet to virtual machine clients on subnet 172.16.101.0/24 (B side) I used "push route" openvpn and that worked. I can ping from 172.16.101.0/24 (B side) to 172.16.99.0/24 (A side), but I can not ping from 172.16.99.0/24 (A side, server side) to 172.16.101.0/24 (B side, client side). How can I do that? I tried to configure "iroute" openvpn config, but without success.
My config files:
server.conf:
client-config-dir ccd
push "route 172.16.99.0 255.255.255.0"
server 172.16.100.0 255.255.255.0
status /var/log/openvpn/matriz-staus.log
log-append /var/log/openvpn/matriz.log
port 1194
proto udp
dev tun
ca ca.crt
cert vpnserver.crt
key vpnserver.key # This file should be kept secret
dh dh1024.pem
ifconfig-pool-persist ipp.txt
#client-to-client
keepalive 10 120
comp-lzo
persist-key
persist-tun
status openvpn-status.log
verb 3
/etc/openvpn/ccd/bugs
iroute 172.16.101.0 255.255.255.0