Problem Connect to guest

Discussions about using Windows guests in VirtualBox.
uzytkownik1989
Posts: 12
Joined: 4. Dec 2016, 11:20

Problem Connect to guest

Post by uzytkownik1989 »

First i want to say hello i am new here, i have a problem can someone tell me how to connect host to guest
i am using Kali Linux (host) windows 7(guest) for connection to internet i am using mobile 3g usb modem (no cable network) (in NAT on guest system internet work) what i want is guest have own ip (like separate system) connected to host the point is i want to ping beetwen host and guest (and have opportunity to connect the internet from guest like separate pc) sorry for my english and complicated post but i hope someone understand what i want regards thanks.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Problem Connect to guest

Post by mpack »

I don't think a separate IP is possible using the setup you describe. You only have one IP, actually assigned to the USB dongle, so that IP will only be usable in the PC to which the dongle has been plugged. USB devices are 1 to 1, they are not shared. Nor can you bridge to it, because it isn't a NIC.

One way to get around this problem is to plug the dongle into a router which accepts USB dongles. Several companies make these. Then multiple devices can talk to the router (including VMs).

That said, I have found that kind of USB dongled router to be very unreliable. I found it more reliable to take the SIM out of the dongle and put it into a proper router - e.g. Huawei makes some decent ones which accept a SIM. Some are mobile (battery powered), some not - depending on your requirements.
uzytkownik1989
Posts: 12
Joined: 4. Dec 2016, 11:20

Re: Problem Connect to guest

Post by uzytkownik1989 »

Ok thanks for help but there is way to connect host to guest without usb 3g (offline) to ping each other and guest have own ip (like separate pc)?
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Problem Connect to guest

Post by mpack »

Host and guest can be connected in several ways. Chapter 6 of the user manual describes them. "Host-only" would be an obvious choice. You would create two NICs, one providing your NAT connection and internet access, a second NIC would be used for host-only networking but not Internet.

I have to say that a setup like this is usually unsatifactory in my experience. Guest OS's get confused (or just don't know) which connection leads to the Internet and which to (say) your host printer. If you have a 3G router as I originally suggested then there is no confusion - and it also doesn't matter if the router doesn't have a 2G/3G connection at the moment, as it can still route messages between nodes on the home side of your network.
uzytkownik1989
Posts: 12
Joined: 4. Dec 2016, 11:20

Re: Problem Connect to guest

Post by uzytkownik1989 »

i think it is that what i want but can You tell me step by step what i need to do i will be very grateful thanks for help
uzytkownik1989
Posts: 12
Joined: 4. Dec 2016, 11:20

Re: Problem Connect to guest

Post by uzytkownik1989 »

i now have something like this (When i connect 3g modem i have internet on guest Win7)
01.JPG
01.JPG (64.93 KiB) Viewed 3010 times
02.JPG
02.JPG (54.4 KiB) Viewed 3012 times
03.JPG
03.JPG (35.72 KiB) Viewed 3003 times
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Problem Connect to guest

Post by mpack »

If you are determined to use the two adapter approach then naturally the second adapter needs to enabled, not disabled as shown in your screenshot.

There's no need to hide the MAC address. It's a completely random number and reveals nothing about you or the host PC. Even if it revealed your host MAC address (it doesn't) it would still tell me nothing. The MAC address is only useful if I had physical access to your PC - and even then only useful if I was a router.
uzytkownik1989
Posts: 12
Joined: 4. Dec 2016, 11:20

Re: Problem Connect to guest

Post by uzytkownik1989 »

Yes i now;P i just want to show You how it looks now ok i need 2 adepters but wich type on Adapter 1 is needed (NAT , Bridged etc) and on Adapter 2 (NAT, Bridged etc) second think do i need create some connection in linux host (as You can see on screenshot 3 there is no connetcion i am right?) thanks
uzytkownik1989
Posts: 12
Joined: 4. Dec 2016, 11:20

Re: Problem Connect to guest

Post by uzytkownik1989 »

If anyone can help me to set up step by step, I'm already mad trying a few days I will be very grateful only think what i make is create host only adpter in virtualbox on my host linux ifconfig show vbox0 but when i set adpter in virtual machine to host only vbox0 i cant ping each other host to guest madness
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Problem Connect to guest

Post by mpack »

Adapter 1 should be enabled and left on NAT.

Adapter 2 should be enabled and set to "Host-only Adapter".

Hopefully the guest OS will pick up the secondary network automatically.

p.s. Moving this topic to "Windows Guests", since the host OS choice seems to have little to do with the discussion.
uzytkownik1989
Posts: 12
Joined: 4. Dec 2016, 11:20

Re: Problem Connect to guest

Post by uzytkownik1989 »

Ok Thank you very much now its work i need to manualy set the ip etc. Nat (there is Internet on guest) and host-only (ping work with host) I am really sorry for slight confusion in topic but few days for so simple thing its enought ... ps: it is some way to get in to Guest through Host internet browser in this configuration? BTW Thank You.
BillG
Volunteer
Posts: 5105
Joined: 19. Sep 2009, 04:44
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows 10,7 and earlier
Location: Sydney, Australia

Re: Problem Connect to guest

Post by BillG »

You should not need to set either of them manually. They should both receive an IP address automatically (unless you have changed the settings). An adapter set to NAT will automatically get a 10.0.2.x IP and a host only will automatically get 192.168.56.x .
Bill
uzytkownik1989
Posts: 12
Joined: 4. Dec 2016, 11:20

Re: Problem Connect to guest

Post by uzytkownik1989 »

I didnt change ip etc of NAT just need to manually configure the ip in guest system for host-only now from NAT i have internet connection from guest and can ping from host to guest and vice versa. cheers
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Problem Connect to guest

Post by mpack »

uzytkownik1989 wrote:just need to manually configure the ip in guest system
You don't need to do that, at least not based on any information you've given above. Host-only mode includes a DHCP server, just like NAT does. The guest acquires an IP in the same way in both cases.
uzytkownik1989
Posts: 12
Joined: 4. Dec 2016, 11:20

Re: Problem Connect to guest

Post by uzytkownik1989 »

Ok i think problem solved thanks everyone for help.
Post Reply