(Bridged Networking) Guest not reachable from outside

Discussions related to using VirtualBox on Windows hosts.
Post Reply
sydnytt
Posts: 2
Joined: 14. Sep 2022, 10:43

(Bridged Networking) Guest not reachable from outside

Post by sydnytt »

I've installed a few vulnhub vms for practicing pentesting.

Initially worked to access from outside the Host into the Guest, however now not working and this applies to all VMs, so i must have made some change to network settings outside individual VMs.

Is the bridge established in conventional windows way using the Host-only adapter? if so, what settings should i use for it?

tried different promiscous mode/adapter type to no avail.
tried manually bridging a host-only adapter to my wifi adapter.
tried using bridged adapter under vm settings.
tried setting the same dhcp settings as local network (duh)

Windows 10
Intel Wi-Fi 6 AX200 160MHz
Virtualbox 6.1.38
local network subnet 192.168.1.x

any idea of the necessary setup?
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: (Bridged Networking) Guest not reachable from outside

Post by mpack »

Can you please clarify what you mean by "not working"? I.e. what are you doing to test "working"?

Please note that the only mode where it is expected that a guest OS will respond to outside requests is Bridged Networking, and although the topic title says that's what you were using, the text of the post says otherwise.

Also, if the test method was ping: for security reasons not all guests respond to ping by default.

And no, bridged is entirely separate from the host-only adapter. Bridged requires that you enable the VirtualBox NDISx Bridged Networking Driver in the protocol stack for the host network card. This is essentially a software switch, so once installed it allows host and VM to share access to the physical network.

The host only adapter is purely virtual, it provides no access to physical networks.
sydnytt
Posts: 2
Joined: 14. Sep 2022, 10:43

Re: (Bridged Networking) Guest not reachable from outside

Post by sydnytt »

Can you please clarify what you mean by "not working"? I.e. what are you doing to test "working"?
Hi! Yes, the services running on the guests are inaccessible, and an nmap scan reveals only the standard windows ports exposed from the host.
...although the topic title says that's what you were using, the text of the post says otherwise.
I have tried using both bridged adapter under VM network settings and host-only adapter with a bridge defined in the host OS network configuration (bridge connections in windows network adapters).
When running with Host-Only adapter, VMs web service is accessible from host, but this does not fit my need.
Have also tried removing the VMs and virtual disks, uninstalling and installing virtualbox, and re-importing VMs.

can the existence of a host-only network conflict with bridged adapter?

VirtualBox NDISx Bridged Networking Driver is enabled for my wifi card.

regards
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: (Bridged Networking) Guest not reachable from outside

Post by mpack »

sydnytt wrote: can the existence of a host-only network conflict with bridged adapter?
You use one or the other (the latter if you need Internet), so a conflict doesn't arise.
sydnytt wrote: VirtualBox NDISx Bridged Networking Driver is enabled for my wifi card.
Bridged is designed to work with Ethernet cards. Switches (i.e. multiple MACs reponding on a single endpoint) are not usually a thing with WiFi, but it often works anyway because most parts of the driver stack are the same.
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: (Bridged Networking) Guest not reachable from outside

Post by scottgus1 »

For direct, non-port-forwarded-NAT access to the VMs from outside the host, you must use Virtualbox Bridged. Cobbling together a host OS "bridge" or ICS to Host-Only is not guaranteed to work.

Please see Virtualbox Networks: In Pictures, to see what the various network types do. Under Bridged, take note of why Bridged might not work under Wi-Fi.

If you recently changed from wired Ethernet to Wi-Fi, this might be why your VMs can no longer be connected to. If you recently changed the host OS, the Wi-Fi adapter drivers might have changed, which can also stop Bridged from working. As far as we know, if Bridged cannot work through your host's Wi-Fi, then there may be nothing that can be done except to go back to wired. (Note that some few folks have anecdotally reported that setting a LAN-compatible static IP address in the VM might get Bridged over Wi-Fi working.)
  • Set one VM to Bridged, with no other network adapters enabled. Start the VM from full normal shutdown, not save-state. Attempt the LAN connections you used to be able to do.
  • While the VM is running, please provide the following: (I assume "vulnhub" is a Linux VM, since distributing Windows like that would unleash the rabid lawyers)
    • from inside the VM:
      ifconfig or ip address
      ping 8.8.8.8
    • from the host Windows:
      ipconfig /all
      ping 8.8.8.8
    • Please don't obfuscate any numbers. Such would render the data and my help unusable.
  • Then shut down the VM from within the VM's OS if possible. If not possible, close the Virtualbox window for the VM with the Power Off option set.
  • Right-click the VM in the main Virtualbox window's VM list, choose Show Log. Save the far left tab's log, zip it, and post the zip file, using the forum's Upload Attachment tab.
  • Right-click the VM in the main Virtualbox window's VM list, choose Show in Explorer/Finder/File Manager. Zip the VM's .vbox file (not the .vbox-prev file), and post the zip file, using the forum's Upload Attachment tab. (Configure your host OS to show all extensions if the folder that opens does not show a .vbox file.)
Post Reply