Hello,
I'm setting up OpenVPN to be able to connect from home to my office's server.
On this server, KVM is installed and some VM are running on it. I've created a NAT virtual network 172.16.0.0/24. I want the VPN client to be on same network of my VMs.
When i connect to VPN from my client, I get dynamic address from specific scope I set up, some DHCP related options like search domain and domain server, but there is no connectivity with my KVM guest VMs. I can't reach other hosts in same network.
Here is the OpenVPN server configuration :
# OpenVPN Port, Protocol and the Tun
port 1194
proto udp
dev tun0
# OpenVPN Server Certificate - CA, server key and certificate
ca /etc/openvpn/server/ca.crt
cert /etc/openvpn/server/adoc-vpn-server.crt
key /etc/openvpn/server/adoc-vpn-server.key
#DH and CRL key
dh /etc/openvpn/server/dh.pem
#crl-verify /etc/openvpn/server/crl.pem
# Network Configuration - Internal network
# Redirect all Connection through OpenVPN Server
mode server
tls-server
#server 172.16.0.0 255.255.0.0
push "redirect-gateway def1"
# Using the DNS from https://dns.watch
push "dhcp-option DNS 172.16.0.10"
push "dhcp-option DOMAIN adoc.local"
#Enable multiple client to connect with same Certificate key
duplicate-cn
# TLS Security
cipher AES-256-CBC
tls-version-min 1.2
tls-cipher TLS-DHE-RSA-WITH-AES-256-GCM-SHA384:TLS-DHE-RSA-WITH-AES-256-CBC-SHA256:TLS-DHE-RSA-WITH-AES-128-GCM-SHA256:TLS-DHE-RSA-WITH-AES-128-CBC-SHA256
auth SHA512
auth-nocache
# Other Configuration
keepalive 20 60
persist-key
persist-tun
#comp-lzo no
daemon
user nobody
group nobody
# OpenVPN Log
log-append /var/log/openvpn.log
verb 3
topology subnet
push "topology subnet"
ifconfig 172.16.0.2 255.255.0.0
ifconfig-pool 172.16.8.1 172.16.9.254
route-gateway 172.16.0.1
push "route-gateway 172.16.0.1"
push "route 172.16.0.0 255.255.0.0"
client-to-client
I there a way to route all traffic from tun0 to virbr0 (my KVM network 172.16.0.0/16) ?
Thank you !