virtualbox host-only adapter doesn't work anymore

Discussions related to using VirtualBox on Linux hosts.
Post Reply
jakab
Posts: 1
Joined: 16. Jul 2009, 22:41
Primary OS: Debian Lenny
VBox Version: OSE Debian
Guest OSses: Linux

virtualbox host-only adapter doesn't work anymore

Post by jakab »

Hi

host os: Debian Lenny
guest os: any
virtualbox version: 3.0.2

I have a vodafone usb stick, ok.
I want to make network for the guest os so it could have internet connection, and can see the other guest operating systems.

So:

1) I set the guest os networking to "host-only adapter (vboxnet0)".

2) I give a few iptables rules, etc:

echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -P FORWARD ACCEPT
iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE

3) I boot the guest os, and it get's an ip....but I just can't ping e.g.: google.com.....

Why? It worked fine in VirtualBox 2.2. Is it a bug? Or I'm just missing something?

regards, and thank you: jakab
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: virtualbox host-only adapter doesn't work anymore

Post by Perryg »

Setup a second adapter in the guest using NAT.
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Re: virtualbox host-only adapter doesn't work anymore

Post by Sasquatch »

Or just use only NAT. The Guest needs a DNS server and you probably failed to set one. The Host can't resolve DNS names by default, you have to install a DNS server for that function. So either do that, or provide the Guest with the same DNS server the Host gets from the dial-up connection.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
Post Reply