visit local network from host system

Discussions related to using VirtualBox on Windows hosts.
Post Reply
jumbo125
Posts: 5
Joined: 1. Apr 2023, 11:06

visit local network from host system

Post by jumbo125 »

Hello
On my Notebook (windows) runs a local server (apache xampp) n my home network. With my other pcs i can enter and visit the apache server.

On my second pc runs a virtual box. I start a Linux dist. (Ubuntu) in it.

How can i connect my local home network from my virutal box (ubuntu system)
I use "network bridge" to get internet on my Vb Ubuntu. Thats work

If i go into my Vbox Ubuntu system and enter the ip adress from my host pc or any other pc in my home network, i can't connect to it.
How can i fix it?
thank you a lot
best regards
Jumbo
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: visit local network from host system

Post by mpack »

The default is for the VM to be on a separate NAT network. That separate subnet has its own IP address range and no direct contact with your host network - obviously this has desirable security implications, which is why it is the default.

If you want your VM to participate on the physical host network then make sure you configure the VM that way, i.e. using Bridged Networking. Note however that the latter doesn't always work on WiFi.
jumbo125
Posts: 5
Joined: 1. Apr 2023, 11:06

Re: visit local network from host system

Post by jumbo125 »

okay. i tried to use network bridge to get acess to the host (home network). but it didn' work.
Do you have any tips for me?

should i use the wlan or eterneth adapter?

Should i activate the promiscuous mode?
should i activate cable option

The host pc is via wifi in the home network connected.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: visit local network from host system

Post by mpack »

"Network Bridge"? "Didn't work"?

I don't want to be pedantic, but the feature I mentioned is referred to in the docs as "Bridged Adapter". If you use some other term then I'm left wondering if you used some similarly named but non-VirtualBox feature you found elsewhere. Also, I'd need a bit more info on "didn't work".

You need to bridge to whatever host network adapter is connected to the network you want to participate in. Ideally that would be an Ethernet adapter.
jumbo125
Posts: 5
Joined: 1. Apr 2023, 11:06

Re: visit local network from host system

Post by jumbo125 »

At the beginn, i want to say THANK you for your help and your time!!!
I use the vm with german language and my meaning was incorrect. So i change the language to english.

here is my option:
Attachments
vm.JPG
vm.JPG (54.56 KiB) Viewed 1270 times
jumbo125
Posts: 5
Joined: 1. Apr 2023, 11:06

Re: visit local network from host system

Post by jumbo125 »

srry my fail. port problem. now it works
thank you!!!
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: visit local network from host system

Post by mpack »

Congratulations on working it out.
jumbo125
Posts: 5
Joined: 1. Apr 2023, 11:06

Re: visit local network from host system

Post by jumbo125 »

Sorry to bother you again.
There is one problem, that i can't fix since 3 hours....

When i open my vlc player on windows (on windows runs the vm) i can stream my camera with: rtsp://user:pw@10.0.0.153/onvif1

when i run the vm (ubuntu) and run vlc, i can't open the media stream with rtsp://user:pw@10.0.0.153/onvif1

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

Re: visit local network from host system

Post by mpack »

LAN IP address "10.x.x.x" is typical of NAT, it is not typical of a physical LAN that you bridged to. 10.x is certainly possible, but most routers in my experience normally use the range 192.168.xxx.yyy, and this is what your VM should now be using now that it's being served an IP address by the host network DHCP. Did you check this?

Better yet would be if the router has a local DNS function, hence the IP camera would be accessed using a host name rather than hard coding a potentially variable IP address.
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: visit local network from host system

Post by scottgus1 »

Maybe some diagnostic data can help us pin this down.

1. 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.)

2. Start the VM from full normal shutdown, not save-state. Run until you see the problem happen, 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 in Explorer/Finder/File Manager. In the "Logs" subfolder, zip the VM's "vbox.log", and post the zip file, using the forum's Upload Attachment tab. (Configure your host OS to show all extensions so you can find the "vbox.log", not "vbox.log.1", etc.)

3. In the Windows OS, open a Command Prompt and run ipconfig /all. Post the command output.

4. In the Linux OS, open a Terminal and run ifconfig or ip address. Post the command output.

5. In both host and VM Windows OS's, ping 8.8.8.8. Post the command output. Label which is which.
Post Reply