Network for a VM

Discussion in 'Linux Networking' started by Paulo da Silva, Oct 2, 2015.

  1. Hi all!

    I usually use a VM (virtualbox) with all default net configurations.
    It works fine.
    ifconfig reports its IP address as 10.0.2.15.
    This works fine for VM to outside world.

    Now I need to run a server in that VM.
    How do I configure it (and its host) in order to make it accessible from
    the host or other machines of my network (192.168.1.x).

    I don't know too much of networking except for the very basic.

    BTW, all OS are kubuntu 14.04.

    Thanks for any help.
     
    Paulo da Silva, Oct 2, 2015
    #1
    1. Advertisements

  2. Paulo da Silva

    Jorgen Grahn Guest

    If all you need is one TCP port, a simple solution is port forwarding.
    You can tell Virtualbox that "a packet to port X on host should be
    passed on to the VM's port Y".

    /Jorgen
     
    Jorgen Grahn, Oct 2, 2015
    #2
    1. Advertisements

  3. Às 06:09 de 02-10-2015, Paulo da Silva escreveu:

    In the meanwhile I could see that VBOX has an option to bridge.
    This has an advantage to not have to create another network and so avoid
    firewall complications.

    I was searching for network "special" configurations but VBOX bridging
    works out of the box!!!

    Thank you.
    Paulo
     
    Paulo da Silva, Oct 2, 2015
    #3
  4. Às 08:03 de 02-10-2015, Jorgen Grahn escreveu:
    As I said (see my 2nd post please), bridging from VBOX solved my problem.

    Anyway, thank you very much.
     
    Paulo da Silva, Oct 2, 2015
    #4
  5. Speaking of bridging, has anyone else had problems with wifi? I've never
    been able to bridge the wireless adapter to my Windows virtual machine,
    although the Ethernet port works just fine.
     
    Charlie Gibbs, Oct 2, 2015
    #5
  6. I think that many, if not most, wireless access points will refuse to
    communicate over the wireless link with an IP host that has not
    associated with the AP on the wireless level. The more tweakable APs
    have a setting to defeat this (maybe as a list of static routes). So
    you should explore your AP/router settings.

    Btw, why? Are you really running a server on a Windows VM?
     
    Ian Zimmerman, Oct 3, 2015
    #6
  7. No, I have a laptop running Debian Jessie, and to do Windows stuff
    needed for work I run a Windows VM under VirtualBox. It works great
    in every respect except for wifi. The native Linux OS can use both
    Ethernet and wifi with no problems. VirtualBox can bridge the Ethernet
    port to the Windows VM, which queries my DHCP server for its own IP
    address distinct from that for the native Linux Ethernet interface.
    However, the wireless adapter will not bridge; the Windows VM only has
    network access when the Ethernet cable is plugged in.

    I did a bit of googling on this a while ago, and from other people's
    posts I got the impression that this is a known problem, so I haven't
    worried about it too much. But it sounds sufficiently close to the
    subject of this thread that I thought I'd throw it out again.
     
    Charlie Gibbs, Oct 5, 2015
    #7
  8. If you don't run a server on the VM, why do you need bridging? Can't
    VirtualBox do a virtual routed network with NAT? KVM certainly can.

    Here is the real snafu, in addition to the picky AP one:

    http://v.gd/UkTM1Y
     
    Ian Zimmerman, Oct 7, 2015
    #8
  9. Perhaps. Bridging is just so darned convenient, though - and it
    works perfectly on an Ethernet connection.
    Ouch. I'll check out your other suggestions if I find the time.
    It's a low priority, though, since most of the time I'm either
    within reach of an Ethernet cable, or can work offline.
     
    Charlie Gibbs, Oct 7, 2015
    #9
  10. Charlie Gibbs a écrit :
    The ability to bridge a wireless interface in managed mode has been
    disabled some time ago because it just does not work. The standard
    802.11 frame header format does not have room for both the wireless
    client MAC address and the host MAC adress behind the bridge. This
    requires specific WDS or 4-address mode.
     
    Pascal Hambourg, Oct 9, 2015
    #10
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.