Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

access local Lan's http server inside virtualbox.

Posted on 2011-10-07
15
Medium Priority
?
530 Views
Last Modified: 2012-06-21
Hi

I have a LAN under a wifi router.

A desktop has virtualbox installed and that guest OS is running httpd server.

I want to access this httpd from other LAN machines as well as from ipad.

I can edit hosts file of other machines but I cant do this in ipad.

Only thing i can do is change the proxy setting in ipad.

For more understanding I have attached Image. Design
0
Comment
Question by:BToTheAToTheBABA
  • 6
  • 4
  • 4
  • +1
15 Comments
 
LVL 9

Expert Comment

by:pritamdutt
ID: 36929200
All you need is to configure Bridged Networking for the Virtual Machine

Steps to be followed are

1. Stop the Virtual Machine
2. Right Click the Virtual Machine
3. Click On Settings
4. Click on Network
5. Change Attached To to  Bridged Adapter

Now your virtual machine will have its own IP on your LAN and will be accessible from LAN.

Hope this helps
0
 
LVL 9

Expert Comment

by:pritamdutt
ID: 36929207
You can find more information about various Networking Options of Virtual Box @
http://www.virtualbox.org/manual/ch06.html
0
 
LVL 125
ID: 36929791
If you are using the default NAT networking option change to Bridged.

or you could use Advanced NAT.
0
Threat Trends for MSPs to Watch

See the findings.
Despite its humble beginnings, phishing has come a long way since those first crudely constructed emails. Today, phishing sites can appear and disappear in the length of a coffee break, and it takes more than a little know-how to keep your clients secure.

 
LVL 4

Expert Comment

by:naveencnair
ID: 36941431
With the jalbroken and ssh enabled ios you can do edit your host file in iPad which is in  /private/etc/hosts
and add your Virtual Box's host name in it. Or change your Virtual box settings to bridged to access it from the same network.

0
 

Author Comment

by:BToTheAToTheBABA
ID: 36944507
Hi,

I added a new "Bridged Adapter" to that guest OS.

Now Inside my Guest OS Im seeing a new LAN IP Address, Howerver I cant ping this IP from LAN.

The Host OS has no change in the ipconfig /all.

Thanks
access-local-web--1-.png
0
 
LVL 125
ID: 36944635
so you guest gets and IP address of 192.168.0.4 from the router on your LAN?

what machine are you trying to ping from?

Firewall enabled in VM Guest 192.168.0.4?
0
 
LVL 125
ID: 36944640
what IP address does the host have?

0
 

Author Comment

by:BToTheAToTheBABA
ID: 36945208
host OS cmd prompt ipconfig /all
shows the following

ip is still 192.168.0.2
virtualbox host only adapter is still showing 192.168.52.1
0
 
LVL 125
ID: 36945254
you will not be able to ping the VM from the host, because they are on different networks.

change the hosts network to 192.168.0.x.
0
 
LVL 9

Assisted Solution

by:pritamdutt
pritamdutt earned 2000 total points
ID: 36946336
You do not need Host Only Adapter to ping from Host.

Once you install a Bridge Adapter, the Virtual Machine will be able to communication with Host as well as other Machines on Network.

However you need to take care of the following:

1. The Bridge Adapter is mapped to correct LAN Adapter on your system (in case you have multiple adapters on the system)
2. The firewall of the Virtual Machine Permits pinging from network. Try disabling the firewall on guest os.


Hope this helps!
0
 

Author Comment

by:BToTheAToTheBABA
ID: 37142814
Firewall in guest OS looks fine.

But I dont know how to check if "Bridge Adapter is mapped to correct LAN Adapter"
Can u explain a bit about how to see this in ref with my previous image/sys-diagram posted.
0
 
LVL 125
ID: 37142844
You need to run the Virtual Network Editor, which should be a shortcut in your VMware group.
0
 

Author Comment

by:BToTheAToTheBABA
ID: 37157854
@hanccocka

But I think my question is about VirtualBox & you are answering about VMWare.

[ Oracle VM VirtualBox ] and I dont know about VMware.

I think u answered initially with virtualbox in mind,
but im not sure from when u started talking about vmware.
0
 
LVL 9

Accepted Solution

by:
pritamdutt earned 2000 total points
ID: 37158468
Hi there....

Step 1: Which interface to choose for Bridged Network?

Right Click on your Local Area Connection icon, and choose properties.

Look for the name below "Connect Using"

  LAN Properties

Step 2: Ensure Bridge Related Network Drivers and Protocols are enabled on your host network interface.

Please see the image above, you would find that VMWare Bridge Protocol and VirtualBox Bridged Networking Driver are enabled for your network.

Step 3: Map Bridged Adapter.

Once you have identified your network adapter, select the same in your Virtual Machine's Network Settings Configuration Area, as depicted below:

Oracle VMBox Bridge Network Interface
Step 4: Once you have mapped and enabled the Bridged Adapter, boot your guest operating system.

Assign IP to your Guest OS - 192.168.0.4.
Validate your IP Configuration in the guest os using ifconfig if linux!

Now you should be able to ping other machines on network from Guest OS and vice versa.

If you still face issues, kindly share the following:
1. IPCONFIG /ALL Output for the HOST Machine
2. IPCONFIG /ALL or IFCONFIG output for the GUEST OS
3. Oracle VirtualBox Network Settings Configuration screenshot for your Guest OS as shared by me.

I hope we find a solution soon...

Regards,
0
 
LVL 125
ID: 37158868
oh, yes, sorry, slipped back into VMware there!
0

Featured Post

Prepare for an Exciting Career in Cybersecurity

Help prevent cyber-threats and provide solutions to safeguard our global digital economy. Earn your MS in Cybersecurity. WGU’s MSCSIA degree program curriculum features two internationally recognized certifications from the EC-Council at no additional time or cost.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

What if you have to shut down the entire Citrix infrastructure for hardware maintenance, software upgrades or "the unknown"? I developed this plan for "the unknown" and hope that it helps you as well. This article explains how to properly shut down …
In this article, we’ll look at how to deploy ProxySQL.
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
Suggested Courses

578 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question