Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

VirtualBox host-to-guest networking with internet access

Posted on 2011-03-20
22
Medium Priority
?
1,246 Views
Last Modified: 2013-11-15
I am using Oracle VirtualBox and I have installed ubuntu server as a guest VM . I have internet connection(dynamic public ip) to my host ubuntu desktop system. I could access the internet in my guest VM only if I select the network mode as 'NAT' in the VirtualBox network settings  but host-guest is not working. If I select 'Bridged' as network mode in VIrtualBox network settings then the host-guest networing is working but no internet access on the guest VM.

Is there any settings recommendations either on host or guest or on both so that I'll have both host-to-guest networking and internet access.
0
Comment
Question by:Thyagaraj03
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 10
  • 6
  • 3
  • +3
22 Comments
 
LVL 5

Expert Comment

by:paulqna
ID: 35174830
This guy seems to have got it working.
0
 

Author Comment

by:Thyagaraj03
ID: 35174895
My system are not behind firewall/iptables. Here is my network setting of virtualbox

 vbox-preference1
 vbox-preference2
I'm using dhcp either with nat or bridged in the guest VM network settings. I'm expecting the following things,

1. I should have a static ip address(private ip 192.168.x.x) assigned to both host and guest so that I can easily connect to hot to guest and vice-versa
2. On both host(bydefault can access) and guest I should connect to internet
0
 
LVL 17

Expert Comment

by:gelonida
ID: 35175279
Does your host have multiple network interfaces?

you must bidge the guest network interface with the host network interface, that has internet access
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

Author Comment

by:Thyagaraj03
ID: 35175301
Yes, I've two NICs installed on my host computer!.
you must bidge the guest network interface with the host network interface, that has internet access
How do I do this?
0
 
LVL 18

Expert Comment

by:TobiasHolm
ID: 35175856
Hi!

>How do I do this?

Select your virtual machine, go to "Settings" and then "Network". There you can select which NIC you should use. See my pic (it's in Swedish though!).

Regards, Tobias
VB-nic.gif
0
 
LVL 17

Accepted Solution

by:
gelonida earned 375 total points
ID: 35176709
What's good to know is also, that you can change the bridging on the fly, while your guest is runnung.

I have to do this occasionally depending whther my host is connected to the internet via WLAN or ethernet.

After changing the bridfging I just ask my guest to refresh the network sedttings (renegotioate dhcp)
0
 

Author Comment

by:Thyagaraj03
ID: 35177668
Yes, I know this I tried selecting bridged as network mode but I could'nt access the internet in the guest
0
 
LVL 18

Expert Comment

by:TobiasHolm
ID: 35178349
When you used bridged network, did you change the network interface in your virtual machine to your NIC that has internet access?

Regards, Tobias
0
 
LVL 9

Expert Comment

by:crazedsanity
ID: 35180503
Is the host connected via wireless?  That can cause some networking issues that might not be readily apparent, depending upon your setup.
0
 

Author Comment

by:Thyagaraj03
ID: 35185847
@TobiasHolm: Graphically when I look at the 'Wired' connection It's not listing anything like eth0 or eth1. It's empty. Then I edited the /etc/network/interfaces for eth0 to obtain from dhcp on my host. In the VM I selected Bridged--->eth0.


@crazedsanity: No i'ts a wired connection with dhcp enabled
0
 
LVL 18

Expert Comment

by:TobiasHolm
ID: 35190659
ok, strange. I have the option to select which NIC I want to use using the menu "Devices / Network" on a running VM. See pic.

Regards, Tobias
VB-nic.gif
0
 

Author Comment

by:Thyagaraj03
ID: 35220216
I have selected eth0 but still I could not connect to the internet with bridged. FYI, I have no router, the ISP cable directly connects to the NIC of host.
0
 
LVL 18

Assisted Solution

by:TobiasHolm
TobiasHolm earned 1125 total points
ID: 35221005
Ok. Then your ISP might limit the number of computers that can be connected. Here in Sweden the ISP's usually limits the connection to one MAC address.

Your solution: either connect a NAT capable router to your ISP modem or configure VirtualBox to use NAT.

Regards, Tobias
0
 
LVL 17

Expert Comment

by:gelonida
ID: 35224371
Thyagaraj03 I don't know your ISP.

In some countries (with some ISPs)  you can configure the box of the ISP to act either as a NAT router or to act as direct DHCP server with only one external IP address or to act as ADSL modem

It might be worth checking what options you have. bridged mode makes only sense if you have the right to request multiple IP addresses from the DHCP server

0
 

Author Comment

by:Thyagaraj03
ID: 35224508
@gelonida: Yeah you are right, but I don't have any modem or router from ISP. I have taken this connection newly and It has a box(looks like switch/router) outside the home and everyones ethernet cable(RJ-45) is connected to that box and nobody has modem/router with them at their home. I don't if I could hack that box.
0
 
LVL 10

Expert Comment

by:dfke
ID: 35327963
Your isp does not allow you to have concurrent dhcp leases. Use a router for bridge mode access.
0
 

Author Comment

by:Thyagaraj03
ID: 35367444
yes using router(office) I can but could not without router at home
0
 
LVL 18

Assisted Solution

by:TobiasHolm
TobiasHolm earned 1125 total points
ID: 35368096
Solution: buy an external router at home capable of NAT.

Regards, Tobias
0
 

Author Comment

by:Thyagaraj03
ID: 35488550
Actually my friend has this issue and he could not afford to the router
0
 
LVL 18

Assisted Solution

by:TobiasHolm
TobiasHolm earned 1125 total points
ID: 35489673
Alt solution: Use an old PC as a NAT router. You must have at least two NIC's in the PC though.

Wiki list of router dists: http://en.wikipedia.org/wiki/List_of_router_or_firewall_distributions

m0n0wall is a small router dist: http://m0n0.ch/wall/screenshots.php

Regards, Tobias
0
 

Author Comment

by:Thyagaraj03
ID: 35785141
Hi,
Not having much time to check
0
 

Author Closing Comment

by:Thyagaraj03
ID: 35785168
It's taking too long giving them a try
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

#Citrix #XenApp #Citrix Scout #Citrix Insight Services #Microsoft VMMAP #Microsoft ADEXPLORE #Microsoft RAMMAP #Microsoft TCPVIEW #Microsoft AUTORUNS #Microsoft PROCESS EXPLORER #Microsoft PROCESS MONITOR
In this article, I will show you HOW TO: Perform a Physical to Virtual (P2V) Conversion the easy way from a computer backup (image).
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…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses

618 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