Page 2 of 2 FirstFirst 12
Results 11 to 15 of 15

Thread: [SOLVED] Another VBox Networking Issue

  1. #11
    Join Date
    Mar 2008
    Beans
    12
    Distro
    Ubuntu 7.10 Gutsy Gibbon

    Re: Another VBox Networking Issue

    I see siepo and hero. I'm slightly getting myself confused here

    I can't try (again) now but the networks never seem to work for the guestOS, and every time it does seem to work, it kills my wireless.

    I had the same issue with VMWorkstation but a simple user-made patch fixed it =\.

    Thanks for the help though. I just think I gotta keep trying thigns out till it works.

    Then the next thing is the correct IP address in your guest OS
    Wouldnt happen to know what the correct IP is?

  2. #12
    Join Date
    May 2007
    Location
    Netherlands
    Beans
    321
    Distro
    Xubuntu 10.10 Maverick Meerkat

    Re: Another VBox Networking Issue

    Wouldn't happen to know what the correct IP is?
    Simple, it's the same as your network, as you want to connect to your network. I have tried a few things myself, but somehow I can't seem to get the the wifi working inside the bridge. When I'm at home, I can try there as I have static addresses there and now I'm at school with DHCP addresses. If static works, then that is also your solution. I will look into this matter further. The main problem is wifi and bridge equals no network. That has to be fixed somehow.
    Throw Apples out the Windows, but make sure not to hit the Penguin.

  3. #13
    Join Date
    Mar 2008
    Beans
    12
    Distro
    Ubuntu 7.10 Gutsy Gibbon

    Re: Another VBox Networking Issue

    Quote Originally Posted by Hero of Time View Post
    Simple, it's the same as your network, as you want to connect to your network. I have tried a few things myself, but somehow I can't seem to get the the wifi working inside the bridge. When I'm at home, I can try there as I have static addresses there and now I'm at school with DHCP addresses. If static works, then that is also your solution. I will look into this matter further. The main problem is wifi and bridge equals no network. That has to be fixed somehow.
    Finally you see my problem
    It's all setup "right" yet the wireless just doesn't seem to connect/authenticate.
    Thanks for the length your going to with helping me with this. Now I know this is a wireless issue, it should help to narrow those search results down.

    edit I remember reading somewhere that using a different wireless/network connection manager solves this problem. Pity I didn't keep a link to the post... but apparently from what I picked up, nm-applet is alright, but there's better out there. Maybe ther others are more complex, hence why nm-applet is chosen as starnded.
    Last edited by Live-Dimension; March 13th, 2008 at 02:04 PM.

  4. #14
    Join Date
    May 2007
    Location
    Netherlands
    Beans
    321
    Distro
    Xubuntu 10.10 Maverick Meerkat

    Re: Another VBox Networking Issue

    I've done some more research and found a commandline solution. This doesn't involve a bridge, but does use the Host Interface.

    Quote Originally Posted by http://www.scottro.net/vboxbridge.html
    If you don't need bridged networking, the default NAT networking works quite well with wireless in my experience. However, many of us need or at least want, the guest O/S to have its own visible address on the LAN. Thanks to the Hazard's Stuff page I was able to do it quite easily. The technique is different. Rather than use a bridge, we use parprouted to connect the wireless card and tap0 and give tap0 an address.

    I've done this on Fedora, Ubuntu and Arch. There are slight differences. We will need the parprouted program. One can install from source or use the rpm from the Dag repos. I used the one for RHEL 5 on Fedora 8 without problems.

    Ubuntu has a package for it--it might have a slightly different name, do apt-cache search parprouted and intall it. Archers, use the source. (See the ArchLinux section below for links and suggestions about building the package.)

    With wireless and parprouted, we can eliminate the bridge. I left my ethernet card's address alone. The wireless gets its address from DHCP, which is fine. Say that eth1 is my wireless, with its address that works on my network, whether from DHCP or being set manually.

    If you skipped the earlier part of this article about wired networks, we're using a typical 192.168.1.0/24 network. In this example, my wireless card has an address of 192.168.1.105

    We have to make sure that IP forwarding is enabled. You can edit /etc/sysctl.conf in Fedora, changing the variable from 0 to 1, but that requires a reboot. If you want to do it permanently, do it in sysctl.conf, if you just want the change to be temporary, you can do it with the command
    Code:
    sysctl net.ipv4.ip_forward=1
    Now we have to create tap0. Fortunately, the VirtualBox program includes its own version of tunctl, and we can use that. The -u in the next command refers to the user who will be using VirtualBox. In this case, it's a user with the login name of john.
    Code:
    VBoxTunctl -b -u john
    You'll see tap0 echoed to the screen. Now we bring up tap0 and give it an address. One can use ifconfig or ip--in this case, we'll use ip. Archers, please take a moment and refer to the ArchLinux section. You'll have to install the ip command (part of the iproute package) and also symlink it to /sbin. Once you've done that, return to the steps below.
    Code:
    ip link set tap0 up
    ip addr add 192.168.1.108/24 dev tap0
    We are giving tap0 an address on our LAN, which, as we discussed above is a 192.168.1.0/24 LAN. (The /24 is the same as 255.255.255.0)

    Lastly, we use parprouted to bind the wireless card to tap0
    Code:
    parprouted eth1 tap0
    Now we have the wireless card, eth1 with an address of 192.168.1.105 and the tap0 interface with an address of 192.168.1.107. After starting VirtualBox, edit the guest O/S's networking settings, just as we did in the wired setup. Once again we choose Attached to Host Interface and for the Interface Name section, we put in tap0.

    Supposedly, there are iptables rules that work with this. However, so far, I have had to completely flush my iptables rules for it to be able to connect. Oddly, enough, this is only the case at times--otherwise, I can leave my default rules (Fedora defaults, pretty much, allowing ssh and nothing else) and it works. I haven't figured this out yet, nor have the many posts I've found while googling given me the solution. I'm not sure why, apparently their solutions work for the people who have posted them. The most typical one seems to be, if your card was eth1, which is what my wireless is,
    Code:
    iptables -t nat -A POSTROUTING -o eth1 -j MASQUERADE
    It's quite possible I'm missing something though, my experience is more with the BSD pf filtering program. On Fedora Forums, someone pointed out that the command didn't work for him either. However, choosing system-config-firewall, clicking masquerade and then choosing his wireless card worked for him. I tried it and it worked for me as well. In my case, my card wasn't listed, but there is a place to add an interface.

    Running iptables-save with both methods shows that the difference is that when running the command the lines allowing masquerading appear at the top of the listing. When using system-config-firewall, the lines appear at the end of iptables-save. I haven't investigated this yet, when I do, I'll add the information to the page, but at any rate, it seems that you can get it working by using system-config-firewall to have the wireless card masqueraded. When you do that, it automatically does the sysctl setting for you, changing net.ipv4.ip_forward to 1.

    (To digress briefly, I recently received an email from someone who found that though this howto didn't work for them, the IP-Masquerade howto brought them success. Also, note that that howto recommends NOT using the iptables -t nat -A POSTROUTING -o eth1 -j MASQUERADE rule as default. The reader might want to try that howto's scripts for firewalling. As I'm running everything behind other firewalls, I haven't gone through that howto and tested it myself).

    When the guest O/S boots up, you will have to manually assign it an address. Give it an address on the same network, that is, in this case, something like 192.168.1.109 with a netmask of 255.255.255.0 and a default gateway of 192.168.1.1. Use whatever DNS servers you usually use on the host machine.

    When done, you can remove the various changes you've made. After shutting down the host machine, bring down the tap0 interface, remove it and change your sysctl variable back if you choose.
    Code:
    ifconfig tap0 down
    VBoxTunctl -d tap0
    sysctl net.ipv4.ip_forward=0
    pkill parprouted
    That should make it work. I haven't test this. Note that you don't have to use the VBoxTunctl command, as you already have an interface, vbox0. All you have to do, is look for the interface in /etc/vbox/interfaces and remove the bridge name.
    Last edited by Hero of Time; March 13th, 2008 at 02:37 PM.
    Throw Apples out the Windows, but make sure not to hit the Penguin.

  5. #15
    Join Date
    Mar 2008
    Beans
    12
    Distro
    Ubuntu 7.10 Gutsy Gibbon

    Re: Another VBox Networking Issue

    Woohoo! Took another two to three tries (In paticular removing vbox0 and getting the right ip for the guest) but it works.

    Thankyou

Page 2 of 2 FirstFirst 12

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •