Page 3 of 15 FirstFirst 1234513 ... LastLast
Results 21 to 30 of 150

Thread: HOWTO VirtualBox Host networking

  1. #21
    Join Date
    Oct 2005
    Location
    Southeast Asia
    Beans
    Hidden!
    Distro
    Ubuntu 7.04 Feisty Fawn

    Re: HOWTO VirtualBox Host networking

    Guys, redo the instructions but use tap0 instead of tap1. That's how I 've always gotten it to work. Also this method may not work with wireless.
    Shuttle XPC | Intel 865g | P4 3.2Ghz | ATI 9800 Pro | Corsair 1.5gig DDR | Ubuntu 6.10
    ~~~~~~~~~~~~~~~~~~
    PowerBook G4 15" Al | 1.33 GHz | 1 GB DDR PC2700 | ATI 9700 | Ubuntu 7.04

  2. #22
    Join Date
    May 2005
    Beans
    68

    Re: HOWTO VirtualBox Host networking

    This will be quick, and I can get into more detail later this afternoon, but I have to get my son to swimming lessons

    First thing's first: When all is said and done, you should ifconfig and see an ip address on your bridge and your tap.. NOT your ethernet (if you see it on your ethernet, you didn't follow the directions completely.. or there is a different way of doing it . That is the purpose of your bridge.

    Second, as domino mentioned.. and in my second post on how to get 2 of them working at the same time, wireless didn't work for me in host networking. I have no idea why?? In principle, it should, they are all the same commands, thus my hate of wireless

    I can get more specific later if someone has a more direct question (that I can answer, of course)..

    Hang in there.. and follow the directions to a tee! Posting your history always helps me!

  3. #23
    Join Date
    Jun 2006
    Beans
    9
    Distro
    Kubuntu 7.04 Feisty Fawn

    Question Re: HOWTO VirtualBox Host networking

    Three little thoughts:
    1. Anyone any ideas how and where to tackle the wireless issue - i.e.: that it does not work.
    2. I am quite and boscumdibulated about the br0 interface on the host. Does setting up a bridge still allow the host to continue communicating via the gateway? I would certainly expect it to.
    3. Would xen be an alternative http://www.xensource.com/products/xe...ess/index.html I am thinking of trying that too.

  4. #24
    Join Date
    Dec 2006
    Beans
    2

    Re: HOWTO VirtualBox Host networking

    Works for me, thanks. Just had to alter firewall to allow traffic to/from guest address. Also assigned static address for guest. Now with shared directory working and host networking working, all is well.

  5. #25
    Join Date
    Aug 2006
    Beans
    97

    Re: HOWTO VirtualBox Host networking

    hi there all - as there is no solution for the reboot issue (tap not persistent after reboot) i guess i will have to keep manually inputting the list of commands every reboot to create the bridge and tap interface.
    at the moment i copy from a text file and pasted into a terminal but was wandering how i can make the text file run as an excecutable script rather than the copy/paste process.
    any ideas?
    cheers
    michel

  6. #26
    Join Date
    Dec 2006
    Location
    Bristol, UK
    Beans
    66
    Distro
    Ubuntu 7.04 Feisty Fawn

    Re: HOWTO VirtualBox Host networking

    Quote Originally Posted by ipguru99 View Post
    Some things to make this easier to read. My eth0 on my host is 192.168.0.45. My tap0 is going to get 192.168.0.94 (totally arbitrary.. ping it first, just to make sure it isn't in use). The "user" in the first command is the user you login with.

    Code:
    sudo tunctl -t tap0 -u user
    sudo chmod 666 /dev/net/tun
    sudo /usr/sbin/brctl addbr br0
    sudo /sbin/ifconfig eth0 0.0.0.0 promisc
    sudo /usr/sbin/brctl addif br0 eth0
    sudo /sbin/dhclient br0
    sudo /usr/sbin/brctl addif br0 tap0
    sudo ifconfig tap0 192.168.0.94 up
    sudo bash -c 'echo 1 > /proc/sys/net/ipv4/conf/tap0/proxy_arp'
    sudo route add -host 192.168.0.45 dev tap0
    sudo arp -Ds 192.168.0.45 eth0 pub
    Those first 7 commands are from the help.ubuntu.com page I listed above (bottom of that page.. long page.. but good!). The rest of the commands are actually in the man page for 'tunctl' (man tunctl at a prompt). I just stumbled on them because the first 7 commands alone were NOT doing it for me (Dapper).
    I am a recent newbie and I've fallen at the first hurdle
    I get "sudo: tunctl: command not found" after the first line - why should that be? (running dapper)

    Thanks,
    David

  7. #27
    Join Date
    Dec 2006
    Beans
    2

    Re: HOWTO VirtualBox Host networking

    Quote Originally Posted by David Floyd View Post
    I am a recent newbie and I've fallen at the first hurdle
    I get "sudo: tunctl: command not found" after the first line - why should that be? (running dapper)
    tunctl is part of the uml-utilities package.

  8. #28
    Join Date
    Dec 2006
    Location
    Bristol, UK
    Beans
    66
    Distro
    Ubuntu 7.04 Feisty Fawn

    Re: HOWTO VirtualBox Host networking

    Quote Originally Posted by Keyed View Post
    tunctl is part of the uml-utilities package.
    Well, as I mentioned, I'm a relative newbie (3 weeks), so could you please expand on yor answer as it doesn't mean much to me. Is it something I need to install - if so, where do I get it.

    Thanks
    David

  9. #29
    Join Date
    Jan 2007
    Location
    Ireland
    Beans
    269
    Distro
    Xubuntu 6.10 Edgy

    Re: HOWTO VirtualBox Host networking

    David install the two packages listed halfway down this.. https://help.ubuntu.com/community/Vi...3c109de1143a03


    has ANYONE got this working with wireless nics & routers..?

    ve played around here for hours.. ve nearly no hair left ..
    Conal Mullan. Derry. Liverpool. Ireland. - http://fxr.me.uk -
    | W/S PC | UbuntuStudio 8.10 | Pentium D 820 : 2gb : NVIDIA 7100 |
    | HTPC | MythDora 4.0 | AMD Athlon 2800+ : 756mb : ATI 9200 |
    | LAPTOP | ZenWalk 5.0 | P3 Viao : 512mb : ATI M6 LY|

  10. #30
    Join Date
    Jan 2007
    Location
    Ireland
    Beans
    269
    Distro
    Xubuntu 6.10 Edgy

    Re: HOWTO VirtualBox Host networking

    Success..

    i did the following..

    post host reboot & clear ifconfig (just my wireless card & loopback)

    Code:
    sudo apt-get install uml-utilities
    sudo modprobe tun 66.202.65.50
    mkdir /dev/net    #may already exist
    mknod /dev/net/tun c 10 200
    #Create the tap0 interface using tunctl

    Code:
    sudo tunctl
    sudo ifconfig tap0 192.168.100.1 netmask 255.255.255.0 up
    
    sudo modprobe ip_tables
    sudo modprobe iptable_nat
    sudo modprobe ip_nat_ftp
    sudo modprobe ip_nat_irc

    i then created a file setupnat with this in it

    Code:
    #!/bin/sh
    echo "1" > /proc/sys/net/ipv4/ip_forward
    /sbin/iptables -t nat -A POSTROUTING -o ra0 -j MASQUERADE
    echo 1024 > /proc/sys/dev/rtc/max-user-freq
    
    #---> ra0 is the name of my wireless card
    then from su console

    Code:
    chmod a+x ./setupnat
    ./setupnat

    In VirtualBox os details i set it use HOST interface & entered the MAC address of tap0 (from ifconfig)

    then in guestOS i set:

    Code:
    ipaddress : 192.1.100.2
    subnet mask: 255.255.255.0
    default gateway 192.1.100.1
    
    dns: 192.168.1.1 my router
    alternative: my isp dns server address   (i dunno which of these is doing the translating)

    these threads are wher i cut this fix up from:
    http://www.ubuntuforums.org/showthre...ht=routing+tap
    http://www.ubuntuforums.org/showthre...t=qemu+network


    ll tidy this up later & make sure shares etc are available.. after i get a shower.. i just wanted to get this wriiten down incase anything goes wrong... i might even make this a HOWTO..

    also i believe you make the tap0 config persistant by adding it to: /etc/network/interfaces, ll have a look at this later..
    Last edited by ffxr; February 9th, 2007 at 11:19 PM. Reason: for completiveness i have added the full method.
    Conal Mullan. Derry. Liverpool. Ireland. - http://fxr.me.uk -
    | W/S PC | UbuntuStudio 8.10 | Pentium D 820 : 2gb : NVIDIA 7100 |
    | HTPC | MythDora 4.0 | AMD Athlon 2800+ : 756mb : ATI 9200 |
    | LAPTOP | ZenWalk 5.0 | P3 Viao : 512mb : ATI M6 LY|

Page 3 of 15 FirstFirst 1234513 ... LastLast

Tags for this Thread

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
  •