how to access samba on a guest Linux behind the VirtualBox NAT?
Solution 1
I would try setting up two separate network adapters.
- Adapter #1 would be your current #1 setup: NAT to allow access to the internet available.
- Adapter #2 would be a host-only setup to provide the connection between the host and the guest for the Samba shares.
Solution 2
Another possibility is to create two bridged virtual NICs, one to the physical wireless interface and one to the physical wired interface. As long as one (or both) of the physical interfaces is connected you should have access. I generally try to avoid NATing as much as possible, since it tends to create a lot of headaches in the long run (as you have seen with file sharing).
Related videos on Youtube
noamtm
Updated on September 17, 2022Comments
-
noamtm over 1 year
On my laptop, I'm running Ubuntu 9.10 under WinXP using VirtualBox 3.1.2. I want a setup where:
- The guest can freely access the internet.
- The host can access the guest files via Samba.
- The setup must work whether or not my ethernet/wifi ports are connected.
Is it possible?
#1 works with NAT and bridged networking.
#2 works with bridged and host-only networking.
Bridge-based setup doesn't work if relevant physical port is not connected. At the office, the laptop is connected to wifi or ethernet. At home, wifi only.
Is there a workaround? Am I missing anything? I hope I'm making my question clear.
-
noamtm over 14 yearsThanks, this works great. I have no idea why I missed it when playing with the different setups...
-
Amelio Vazquez-Reina about 13 yearsI forgot to mention that I configured
eth1
as host-only, andeth0
as NAT. I tried accessing and mounting\\10.0.2.15\testh
and\\192.168.56.101\testh
from the host OS (Windows), but I receive no response. -
Avindra Goolcharan over 9 yearsDoes bridged mode work with wireless devices? I remember there's some trouble with it because Wireless devices ignore packets that aren't intended for it (something like that).