Having a second internet connection thanks to a VM ?

This is for discussing general topics about how to use VirtualBox.
Post Reply
ithaque
Posts: 6
Joined: 6. Aug 2010, 21:45
Primary OS: MS Windows 7
VBox Version: OSE other
Guest OSses: Win XP

Having a second internet connection thanks to a VM ?

Post by ithaque »

Hello,

currently, my main computer in connected to internet through an ethernet connection.

i'm using virtual box, and i'd like to know if it would be possible to connect a virtual machine to internet through a connection different from the one of my main computer ? with a wifi connection for instance ?
Thus, i would have 2 IP adress on the same computer ...

thanks in advance for your responde
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: Having a second internet connection thanks to a VM ?

Post by Sasquatch »

If you bridge the VM to your physical interface, it will become like a separate computer on the network. If you have two different networks at your house, one wifi and one LAN, and you want for example to separate the VM from the Host with that, you can give the VM the LAN adapter and the Host will use the wifi. Make sure you disable all other options in the interface properties so that the Host won't use the adapter for anything. Of course, the VirtualBox Bridged adapter needs to be enabled for the Guest to use it.

If you have a USB wifi stick, you can pass it to the VM to give it it's own dedicated interface and connect to a wifi network with that.
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.
ithaque
Posts: 6
Joined: 6. Aug 2010, 21:45
Primary OS: MS Windows 7
VBox Version: OSE other
Guest OSses: Win XP

Re: Having a second internet connection thanks to a VM ?

Post by ithaque »

in fact , i would like to keep my computer connected to internet through an ethernet connection, and to connect a virtual box through a wifi connection (i have a Wifi internal card)

what do you mean by a bridge ?
could you explain me how to proceed in details please ?
thx
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: Having a second internet connection thanks to a VM ?

Post by Sasquatch »

Read the manual, chapter 6, and you know all about the network options in VB.

If you need to use bridged because the wifi isn't a USB adapter, then you can just disable the TCP protocols on the adapter properties on the Host side. Connect to the access-point with it and let the Guest obtain an IP address through the bridged 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.
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: Having a second internet connection thanks to a VM ?

Post by BillG »

As Sasquatch said, you need to read up on the different networking options.

I would like to comment on your statement that "you would have two IP addresses on the one machine". In fact that is not what happens. You need to get used to the fact that the vm is not the same machine as the host.

If you set this up properly it will certainly work. But the host will not have two IP addresses. The host and the guest will each have its own IP address. Each OS will use one physical NIC of the host machine.
Bill
ithaque
Posts: 6
Joined: 6. Aug 2010, 21:45
Primary OS: MS Windows 7
VBox Version: OSE other
Guest OSses: Win XP

Re: Having a second internet connection thanks to a VM ?

Post by ithaque »

Sasquatch wrote:Read the manual, chapter 6, and you know all about the network options in VB.
thx i didn't think to read the manuel help ....
BillG wrote: I would like to comment on your statement that "you would have two IP addresses on the one machine". In fact that is not what happens. You need to get used to the fact that the vm is not the same machine as the host.

If you set this up properly it will certainly work. But the host will not have two IP addresses. The host and the guest will each have its own IP address. Each OS will use one physical NIC of the host machine.
no i don't want to have two IP address on the host machine, but i would like that guest and host have their own ip adress, and that's seems to be possible ;)
Catsrules
Posts: 5
Joined: 11. Oct 2010, 04:26
Primary OS: MS Windows 7
VBox Version: OSE other
Guest OSses: Windowes and Linux

Re: Having a second internet connection thanks to a VM ?

Post by Catsrules »

[/quote]
no i don't want to have two IP address on the host machine, but i would like that guest and host have their own ip adress, and that's seems to be possible ;)[/quote]

Yeah, the is what bridge option does. gives everyone there own IP, so other device on your network can see you Guest.
You will in fact be using up 3 of your network's IP addresses, You Host will have both eathernet and WiFi and your Guest will have one as well, with its one network card.
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: Having a second internet connection thanks to a VM ?

Post by Sasquatch »

Catsrules wrote:Yeah, the is what bridge option does. gives everyone there own IP, so other device on your network can see you Guest.
You will in fact be using up 3 of your network's IP addresses, You Host will have both eathernet and WiFi and your Guest will have one as well, with its one network card.
Unless you disable the TCP/IP section on the Host side so it doesn't request an IP on that interface. Then you use 2, one on the Host, and one on the Guest with it's separate adapter/network.
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