My question seems to be the exact same as this one, but the solution didn’t work for me.


I have one Ubuntu machine acting as a Virtualbox host and OpenVPN server, and several Virtualbox guests inside the host-only network vboxnet1

I can connect to the Ubuntu machine from my macOs host which gets the address with VPN, I can also ping the server’s host-only address


I’d like to access a VM located inside the host-only network at, but all my pings have timed out.

What I tried

  • Pushing the subnet to all clients in OpenVPN config with push "route"

  • Enabling IP forwarding according to the solution in the link.

cat /proc/sys/net/ipv4/ip_forward returns 1. Still doesn’t work.

  • Running tcpdump on both ends show that my ICMP requests from are indeed reaching and has been sending ICMP replies back. But tcpdump on vboxnet1 on the Ubuntu host doesn't show any of the reply packets. Probably dropped somewhere in the host-only network?


What do I need to do to allow connected VPN clients to access virtual machines in the host-only network?

Many thanks in advance. I’ve been banging my head on the wall for the past few days for this.


After sshing inside the VM and changing the default gateway with ip route change default via dev eth1, I’m able to ping the VM from my VPN client. That’s the step I was missing.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.