I have an Ubuntu server running virtual machines with KVM, it has the internal IP

I have not touched the default iptables configs on the host. The VMs use MacVTap to connect to the network.

On one virtual machine, with IP, I have installed OpenVPN. My goal is to access all machines and virtual machines from that network from outside.

On the VPN server I made sure that connections fake the local IP of the VM, by setting the POSTROUTING rule:

target      prot  opt  source           destination 
MASQUERADE  all   --      anywhere

So far, my setup works well now, for one exception: I cannot access the host of the VPN server that has IP For all attempts I get "network unreachable" and no response.

I assume that this has to be some kind of issue with the routing on the host of the VMs itself?

  • If i did understand u correct: You have a VPN-Server running at You can conncet to it using vpn. When connected you can use the tunnel to create connections to the other machines too except The 101 machine is the host of all these VM's. If that's the case, i expect it to be a network issue that belongs to your kvm/network setup and is not openvpn related. I don't know how you need to setup MacVTap to work properly but the solution is in the MacVTap documentation for sure. Otherwise you could try using the public bridge method: linux-kvm.org/page/Networking – AlexOnLinux Feb 10 at 15:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.