Virtual box access to several computers on same network

Discussions related to using VirtualBox on Windows hosts.
Post Reply
Ravi_Speridian
Posts: 2
Joined: 28. Oct 2013, 20:51

Virtual box access to several computers on same network

Post by Ravi_Speridian »

Team,
I want several computers within my office network to access the virtual machine running on a windows box. I have centOS installed on my virtual box.When i ran the ifconfig command; i see the the ip address : 10.0.2.15 and when i ran the ipconfig command on one of the computer on my network (windows) : Ip address: Ethernet adapter VirtualBox Host-Only Network #2:

Connection-specific DNS Suffix . :
Link-local IPv6 Address . . . . . : fe80::4911:22e9:269f:de80%42
IPv4 Address. . . . . . . . . . . : 192.168.38.1
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . :

Wireless LAN adapter Wireless Network Connection:

Connection-specific DNS Suffix . :
Link-local IPv6 Address . . . . . : fe80::f00f:b193:856:ed69%22
IPv4 Address. . . . . . . . . . . : 10.25.68.146
Subnet Mask . . . . . . . . . . . : 255.255.254.0
Default Gateway . . . . . . . . . : 10.25.68.1

Now i want to access the virtual box linux os from any computer on this network.
BillG
Volunteer
Posts: 5106
Joined: 19. Sep 2009, 04:44
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows 10,7 and earlier
Location: Sydney, Australia

Re: Virtual box access to several computers on same network

Post by BillG »

You need to switch the NIC in the vm from NAT to bridged mode. It should then get its network config from DHCP on the LAN and work just like the other LAN machines.

If there is more than one NIC in the host, bridge the vm to the NIC which gets its config from DHCP on the LAN.
Bill
Ravi_Speridian
Posts: 2
Joined: 28. Oct 2013, 20:51

Re: Virtual box access to several computers on same network

Post by Ravi_Speridian »

After changing the network settings to Bridge; below is my ifconfig result:

[img]Capture_ifconfig.PNG[/img]
Attachments
Capture_ifconfig.PNG
Capture_ifconfig.PNG (14.55 KiB) Viewed 693 times
BillG
Volunteer
Posts: 5106
Joined: 19. Sep 2009, 04:44
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows 10,7 and earlier
Location: Sydney, Australia

Re: Virtual box access to several computers on same network

Post by BillG »

Which network do you want to connect the vm to? Which NIC of the host is in that network? Which NIC did you bridge to the vm?

For this to work you need to bridge the vm to the physical NIC in the host which connects to the network containing the machines you need to reach the vm. Does that network have DHCP server? The problem at the moment appears to be that your vm does not have an IPv4 address.
Bill
Post Reply