Wanted: Help configuring Windows Sockets

Discussions related to using VirtualBox on Windows hosts.
Post Reply
siegfried
Posts: 13
Joined: 3. Mar 2011, 07:11
Primary OS: MS Windows 7
VBox Version: OSE other
Guest OSses: Ubuntu/FreeBSD

Wanted: Help configuring Windows Sockets

Post by siegfried »

I just downloaded VirtualBox-4.1.18-78361-Win.exe and installed it on Windows 7.
I'm been experimenting with various guests: most recently fedora 17. I cannot get any linux guest to work.
With Fedora 17 I cannot get ssh to work. (I've also tried samba and shared folders but I'll discuss those in a different posting).

I know that sshd is running because "service sshd status" says it is running and I can "ssh 127.0.0.1" just fine on my fedora guest. However, when I use cygwin's ssh client on windows 7 it times out. I have been google searching for solutions I have set up adapter 1 as "host only adapter" and adapter 2 as "internal network" and adapter 3 as "bridged adapter" and adapter 4 as "NAT".

I've been experimenting with changing the order of the adapters and nothing seems to work except "yum install emacs" so apparently I can access the public internet.

I think the problem is with my windows 7.
My fedora guest keeps popping up error windows "Network interface". Unfortunately, the window does not stay up long enough for me to copy down the rest of the error message. It is something about wired connection error.
"ping 192.168.1.134" from windows to my guest works.
I cannot figure out how to ping from my guest to my host.

I think the problem is with windows 7, however. This windows "ipconfig" does not look correct. Is this where my problem is? What is the fix?
  • ipconfig

    Windows IP Configuration


    Ethernet adapter Local Area Connection* 9:

    Media State . . . . . . . . . . . : Media disconnected
    Connection-specific DNS Suffix . :

    Ethernet adapter Local Area Connection:

    Connection-specific DNS Suffix . : lan
    Link-local IPv6 Address . . . . . : fe80::9921:f63f:825e:554%10
    IPv4 Address. . . . . . . . . . . : 192.168.1.112
    Subnet Mask . . . . . . . . . . . : 255.255.255.0
    Default Gateway . . . . . . . . . : 192.168.1.1

    Ethernet adapter VirtualBox Host-Only Network:

    Connection-specific DNS Suffix . :
    Link-local IPv6 Address . . . . . : fe80::7141:64c7:cf78:4fe0%18
    IPv4 Address. . . . . . . . . . . : 192.168.56.1
    Subnet Mask . . . . . . . . . . . : 255.255.255.0
    Default Gateway . . . . . . . . . :

    Ethernet adapter VirtualBox Host-Only Network #2:

    Connection-specific DNS Suffix . :
    Link-local IPv6 Address . . . . . : fe80::9476:76b1:bb5a:f3bd%28
    IPv4 Address. . . . . . . . . . . : 192.168.15.1
    Subnet Mask . . . . . . . . . . . : 255.255.255.0
    Default Gateway . . . . . . . . . :

    Tunnel adapter isatap.{63121886-4565-433A-B372-5795C85A1A9B}:

    Media State . . . . . . . . . . . : Media disconnected
    Connection-specific DNS Suffix . :

    Tunnel adapter Local Area Connection* 12:

    Media State . . . . . . . . . . . : Media disconnected
    Connection-specific DNS Suffix . :

    Tunnel adapter isatap.{088CE871-FB12-4C50-BA26-D6DE032BFA97}:

    Media State . . . . . . . . . . . : Media disconnected
    Connection-specific DNS Suffix . :

    Tunnel adapter isatap.lan:

    Media State . . . . . . . . . . . : Media disconnected
    Connection-specific DNS Suffix . : lan

    Tunnel adapter isatap.{68A9EFEC-55D0-4A44-AEAB-62728AD45034}:

    Media State . . . . . . . . . . . : Media disconnected
    Connection-specific DNS Suffix . :

    Compilation finished at Fri Aug 17 12:14:42
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Wanted: Help configuring Windows Sockets

Post by Perryg »

I have set up adapter 1 as "host only adapter" and adapter 2 as "internal network" and adapter 3 as "bridged adapter" and adapter 4 as "NAT".
You don't need but one or maybe two adapters.
Use Bridged (if you have a router in the LAN)
Or use Host-only with a second adapter set to NAT if there is no router.

These two interfaces will have different subnets and will not interfere with one another. However you will not be able to connect to the guest via NAT, you would use the subnet for host-only.

You may need to edit the /etc/udev/rules.d/70-persistent-net.rules or you can delete the rules and Linux will configure it on the next boot to fix what you have already done to get it to work now (on the guest).

You should also make sure that you have allowed external access if the iptables are enabled on the Fedora guest.
siegfried
Posts: 13
Joined: 3. Mar 2011, 07:11
Primary OS: MS Windows 7
VBox Version: OSE other
Guest OSses: Ubuntu/FreeBSD

Re: Wanted: Help configuring Windows Sockets

Post by siegfried »

Perryg wrote:You should also make sure that you have allowed external access if the iptables are enabled on the Fedora guest.
Can you guide me on how to do this?

Also: what harm is there in defining superfluous adapters? I figured it would be easier to experiment if I tried a different option for each of the 3 adapters I am allowed.

Since I am on a LAN, I want a single bridge adapter?

Now what subnets should I be using to connect from guest to host and host to guest?
My linksys assigns addresses in the range of 192.168.1.x;
I see virtual box creates some adapters in the range 10.x.x.x

Which subnet do I use to connect from guest to host and host guest? I think it is 10.x.x.x? That does not work for me. As you can see, that (10.x.x.x) is not showing up in the bridges or tunnels in my windows host "ipconfig" display. Should it?
Thanks
Siegfried
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Wanted: Help configuring Windows Sockets

Post by Perryg »

Bridged = same subnet as your LAN
Vbox NAT = 10.0.2.*
Host-only = 192.168.56.*

Its not so much that you can't set up all of the adapters at once, its that you need to know how to handle this in Linux. Most will probably be in the down state and that's why you don't see them.

Have you tried the suggestions I have already made?

Don't worry about iptables for now.
siegfried
Posts: 13
Joined: 3. Mar 2011, 07:11
Primary OS: MS Windows 7
VBox Version: OSE other
Guest OSses: Ubuntu/FreeBSD

Re: Wanted: Help configuring Windows Sockets

Post by siegfried »

Perryg wrote: You may need to edit the /etc/udev/rules.d/70-persistent-net.rules or you can delete the rules and Linux will configure it on the next boot to fix what you have already done to get it to work now (on the guest).
There is no such file:
  • pushd /etc/udev/rules.d
    ls
    60-fprint-autosuspend.rules 60-vboxadd.rules 90-alsa-tools-firmware.rules
What do you suggest I do? Delete those files?
Thanks for your help!
Siegfried
siegfried
Posts: 13
Joined: 3. Mar 2011, 07:11
Primary OS: MS Windows 7
VBox Version: OSE other
Guest OSses: Ubuntu/FreeBSD

Re: Wanted: Help configuring Windows Sockets

Post by siegfried »

OK, rebooted and just tried the bridge socket only. Now I don't get those semi-translucent pop-ups indicating errors.

I can ping from my windows host to my fedora guest and vice versa.

However, when I use cygwin ssh in my windows host it times out.

service sshd status indicates it works fine... I can ssh to myself inside my fedora guest and it works fine.

So what do you think? Is it a firewall problem? I think I need to run iptables and turn off the blocking on port 22. Can someone guide me?
Thanks
Siegfried
siegfried
Posts: 13
Joined: 3. Mar 2011, 07:11
Primary OS: MS Windows 7
VBox Version: OSE other
Guest OSses: Ubuntu/FreeBSD

Re: Wanted: Help configuring Windows Sockets

Post by siegfried »

I finally discovered that I need to turn the firewall off using the GUI.
Please see
for a partial remedy to this problem.
Post Reply