Nework Problems - VirtualBox


Very new to all this, did my first machine today (Legacy).

Despite understanding what I needed to, I was frustrated by what I think are network issues.

So, my setup is this. A Windows 10 box, with VirtualBox installed. I then have a Kali VM setup within that. On my Windows 10 PC I have a VPN running.

If I set the VM networking to NAT, I see strange behaviors. From examples using Metasploit will time out with errors like ‘Sending stage (175174 bytes) to’ or ‘[-] - Exploit failed [unreachable]: Rex::ConnectionTimeout The connection timed out (’

If I change it to Bridged networking then it improves, but it is still flaky.

Does this sound like a HTB problem or an issues somewhere with my settings?

This stuff is hard enough to learn without fighting these sorts of issues.

I’ve tried turning off my VPN, disabling the Windows Defender firewall but nothing changes.



I’m assuming you’re using a HTB VPN to connect into the HTB network? If so you’re best leaving your VM networking to NAT and then establishing the HTB VPN tunnel FROM the Kali VM rather than the windows box. Any LHOST return IP for metasploit or the like would then be set to your tun0 IP on your Kali box. That should work without a problem.

Sorry, should have made it clearer, the VPN on my Windows 10 is seperate, nothing to do with HTB. I’ve set openvpn inside kali as instructed. Like I say, the only real difference between it working and not is NAT v Bridged. No idea whether using bridged mode is adding any addtitional risks.

The LHOST I have set to the tun0

Bridged mode just sets the VM as another device on the same LAN as the laptop. So if it’s getting IP via DHCP then it will pick up an IP in the same local LAN as your actual laptop. Since you’ve also got a non HTB VPN running on the Windows box I’d go for bridged mode for the VM and establish the HTB VPN within the VM like you’re doing now. Having a host VPN running, a VM guest VPN running AND the VM set to NAT sounds like it would raise some issues to me.

Ok, I think you’re right. Thanks for the advice.

1 Like

I think when you use dual boot it will be much simpler