VirtualBox - Linux - Windows (eth0 no internet)

Discussions related to using VirtualBox on Windows hosts.
Post Reply
JohnSmith
Posts: 12
Joined: 26. Oct 2012, 17:26

VirtualBox - Linux - Windows (eth0 no internet)

Post by JohnSmith »

Hi,

I am using VirtualBox with Linux Red Hat, and when I am connected to the internet using cable (ethernet), an IP on eth0 is generated and, I get connecting from Windows 7 using putty, for example, however, if I am not connected to internet or ethernet, none IP is associated to the eth0, so, I cannot get connecting from Windows. So, does anyone know how to connect from Windows (putty) with no internet / ethernet connection be available?

tks.
noteirak
Site Moderator
Posts: 5231
Joined: 13. Jan 2012, 11:14
Primary OS: Debian other
VBox Version: OSE Debian
Guest OSses: Debian, Win 2k8, Win 7
Contact:

Re: VirtualBox - Linux - Windows (eth0 no internet)

Post by noteirak »

What is on the other end of your cable?
Hyperbox - Virtual Infrastructure Manager - https://apps.kamax.lu/hyperbox/
Manage your VirtualBox infrastructure the free way!
JohnSmith
Posts: 12
Joined: 26. Oct 2012, 17:26

Re: VirtualBox - Linux - Windows (eth0 no internet)

Post by JohnSmith »

Hi,

Sometimes I am not connected to the internet, so, I dont have cable connected to the computer, only when the ethernet (cable) is connected, an IP is generated to eth0 and I can connect from Win to Linux using Putty. It seems that I need IP generated on Linux or from Windows to Linux, such as Loopback, but I am not sure if it is and how to solve it.

tks.
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 - Linux - Windows (eth0 no internet)

Post by Perryg »

Add a second adapter in the guest settings and use the host-only mode. This will set up a special IP address that you can access the host<>guest at any time.
JohnSmith
Posts: 12
Joined: 26. Oct 2012, 17:26

Re: VirtualBox - Linux - Windows (eth0 no internet)

Post by JohnSmith »

Hi,

I added the new adapter as host-only but I am still receiving - at the boot session, the the connection in the eth0 failed. See below what I see when I use ifconfig.

RedHat64 sbin]$ ./ifconfig eth0
eth0 Link encap:Ethernet Address of HW 08:00:27:F4:8B:C5
BROADCASTMULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collision:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)

is there other place that I need to change, what about the advance option, do I need to change anything else?

tks.
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 - Linux - Windows (eth0 no internet)

Post by Perryg »

You have added the adapter but you have not configured it on the guest yet. You will still see nothing on eth0 if you do not have a connection but eth1 would be the host-only connection and is in the 192.168.56.* range by default. See chapter 6 in your users manual.
JohnSmith
Posts: 12
Joined: 26. Oct 2012, 17:26

Re: VirtualBox - Linux - Windows (eth0 no internet)

Post by JohnSmith »

Hi,

If I go to SYSTEM--> Administration --> Network, and try to start eth0, the same message that I see at boot message is arisen at the popup. however, if I change this connection (system --> administration --> network) to static ip, I can start eth0, but on Windows, I am not able to connect from Windows to Linux - connection refused. On this case, eth0 has the address included in the network mask option. on both side has the same mask, but different of trange of ip address.

I also tried to disable firewall and AV, on both environments, in order to check if there is something blocking the connection.

It seems that the solution is very close, but I am not sure how much....

tks.
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 - Linux - Windows (eth0 no internet)

Post by Perryg »

Post the results of the following:

Windows host -> ipconfig /all
Linux guest -> ifconfig -a
Post Reply