0

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

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 192.168.3.108, 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:

Chain POSTROUTING (policy ACCEPT)
target      prot  opt  source           destination 
MASQUERADE  all   --   10.8.0.0/16      anywhere

So far, my setup works well now, for one exception: I cannot access the host of the VPN server that has IP 192.168.3.101. 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 192.168.3.108. You can conncet to it using vpn. When connected you can use the tunnel to create connections to the other machines too except 192.168.3.101. 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.