LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud
User Name
Password
Linux - Virtualization and Cloud This forum is for the discussion of all topics relating to Linux Virtualization and Linux Cloud platforms. Xen, KVM, OpenVZ, VirtualBox, VMware, Linux-VServer and all other Linux Virtualization platforms are welcome. OpenStack, CloudStack, ownCloud, Cloud Foundry, Eucalyptus, Nimbus, OpenNebula and all other Linux Cloud platforms are welcome. Note that questions relating solely to non-Linux OS's should be asked in the General forum.

Notices


Reply
  Search this Thread
Old 09-19-2012, 08:00 AM   #1
\/4A
Member
 
Registered: Aug 2012
Posts: 118

Rep: Reputation: Disabled
Virtual Machine cannot access the internet


Hello,

I've setup a virtual machine on VirtualBox. The virtual machine is an Ubuntu Server 12.04

While I can access this virtual machine from the LAN, the virtual machine cannot seem to access the internet. Even if I try
Code:
:~$ ping google.com
ping: unknown host google.com
Same thing with any IP number.

From any PC on the LAN I can ping into the virtual machine and I can even SSH into the virtual machine.

Would really appreciate some help on this, pls.
 
Old 09-19-2012, 08:47 AM   #2
/dev/random
Member
 
Registered: Aug 2012
Location: Ontario, Canada
Distribution: Slackware 14.2, LFS-current, NetBSD 6.1.3, OpenIndiana
Posts: 319

Rep: Reputation: 112Reputation: 112
Hi, \/4A
Are you using a NAT or bridged connection? If it's NAT then the external interface (it needs to be told to forward the traffic to and from the internal interface (VM interface in our case).
If you use bridged connection it should just work unless your router is told to block the packets.
 
1 members found this post helpful.
Old 09-19-2012, 09:02 AM   #3
\/4A
Member
 
Registered: Aug 2012
Posts: 118

Original Poster
Rep: Reputation: Disabled
Virtualbox is setup to use a bridged connection and I very much doubt the router is told to block any packets (how would I know?)When you say router, do you refer to the physical router that my PC is connected to, or some virtual type of router in VirtualBox?
 
Old 09-19-2012, 02:39 PM   #4
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,978

Rep: Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624
ping: unknown host google.com

Then you usually go to the next command either dig or nslookup to test that your name resolves.

I assume you need your isp's or opendns ip dns number in the mix.

I doubt this but in rare cases you may need to add in the www to some addresses but this should resolve to google.com
 
Old 09-19-2012, 09:52 PM   #5
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,841

Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
Try
Quote:
dhclient eth0
Also
Quote:
ping www.google.com

Last edited by EDDY1; 09-19-2012 at 09:54 PM.
 
1 members found this post helpful.
Old 09-20-2012, 01:48 AM   #6
\/4A
Member
 
Registered: Aug 2012
Posts: 118

Original Poster
Rep: Reputation: Disabled
I think I know where the problem started.
The Ubuntu Server 12.04 installation on VirtualBox was initially set to DHCP, so I modified the /etc/network/interfaces file. Looks like I hadn't put references to gateway and broadcast.

I've done so and all seems OK now.

Thanks everyone for your help.
 
Old 09-20-2012, 01:59 AM   #7
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,841

Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
Congratulations please mark thread as solved using the "Thread Tools" above your first post.
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
remote can't access local virtual machine flreey Linux - Desktop 2 09-19-2011 10:23 PM
[SOLVED] Cannot access Internet from ubuntu 9.10. Can connect from windows virtual machine archShade Linux - Networking 12 01-25-2010 04:24 PM
Isolating a VMware virtual machine from it's host but still alowing internet access JoeShearn Linux - Networking 1 10-31-2009 06:24 PM
internet access from linux operating system on virtual machine manindergrewal1 Linux - Newbie 1 04-04-2009 06:58 PM
Internet Access from Guest virtual machine on Fedora 8 pigwig Linux - Newbie 5 03-06-2008 11:22 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud

All times are GMT -5. The time now is 03:39 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration