D
D
Dmitry Shvalyov2012-12-02 17:46:30
linux
Dmitry Shvalyov, 2012-12-02 17:46:30

Forwarding through NAT ports under Samba from a guest Virtualbox Ubuntu

The situation is this. Parent OS: Windows 7, guest OS - Ubuntu Mini with lamp+ssh+samba server configured. The type of network connection to the guest OC in VirtualBox is NAT.

In ubuntu, ssh is set to port 2222, apache is set to port 8080. Port forwarding was done according to the instructions: www.virtualbox.org/manual/ch06.html#natforward

<ExtraDataItem name="VBoxInternal/Devices/e1000/0/LUN#0/Config/apache/GuestPort" value="8080"/>
<ExtraDataItem name="VBoxInternal/Devices/e1000/0/LUN#0/Config/apache/HostPort" value="80"/>
<ExtraDataItem name="VBoxInternal/Devices/e1000/0/LUN#0/Config/apache/Protocol" value="TCP"/>

<ExtraDataItem name="VBoxInternal/Devices/e1000/0/LUN#0/Config/ssh/GuestPort" value="2222"/>
<ExtraDataItem name="VBoxInternal/Devices/e1000/0/LUN#0/Config/ssh/HostPort" value="22"/>
<ExtraDataItem name="VBoxInternal/Devices/e1000/0/LUN#0/Config/ssh/Protocol" value="TCP"/>

Thus, I have the Internet inside the guest OS and from the parent OS I can access the guest OS on ports 80 and 22. It all works.

But the Samba ports trick cannot be repeated (ports 445.139 TCP and 137.138 UDP). Windows 7 does not see anything on the network based on the IP of the guest OS. Where to dig? I would like to leave the NAT connection type to the guest OS and see its shared folders through the parent OS.

Thank you.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
shadowalone, 2012-12-02
@shadowalone

127.0.0.1 - Doesn't it tell you anything?
start samba on 0.0.0.0

T
tnz, 2012-12-03
@tnz

Virtualbox has its own gadget, which works on top of samba. You specify a folder on the host machine, and use samba on the guest machine. Or will it not work?
Plus, it's not very clear why to throw something at all. If you want only the Internet in the guest - NAT, if you also want parent-guest access - add a virtual host adapter with the second adapter, then from the parent all guest services will be available at the address in the subnet 192,168,56, X. It is worth noting here that the virtual machine will be available only from the parent, from the external network it can not be reached.
If you want to plug a virtual machine into your local network (a la through a switch with the parent), do a bridge.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question