0

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

Set-up:

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

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

Problem

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

What I tried

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

  • 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 10.8.0.2 are indeed reaching 172.16.0.3 and 172.16.0.3 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?

Question

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.

0

After sshing inside the VM and changing the default gateway with ip route change default via 172.16.0.1 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.