<---- template headericclude ----->
Bridging on Fedora hosts cant works for vbox
FedoraForum.org - Fedora Support Forums and Community
Page 1 of 2 12 LastLast
Results 1 to 15 of 21

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Hades0523 Guest

    Bridging on Fedora hosts cant works for vbox

    I installed XP in vbox,and I need to create a bridge on Fedora,I`ve installed the bridge-utils package as user manual shows.here is my setting:

    cat /etc/sysconfig/network-scripts/ifcfg-wlan0
    Code:
    # Atheros Communications, Inc. AR5212 802.11abg NIC
    DEVICE=wlan0
    ONBOOT=yes
    BOOTPROTO=static
    HWADDR=00:11:f5:55:0a:76
    NETMASK=255.255.255.0
    DHCP_HOSTNAME=
    IPADDR=192.168.1.100
    GATEWAY=192.168.1.1
    DOMAIN=
    TYPE=Wireless
    USERCTL=no
    IPV6INIT=no
    PEERDNS=yes
    ESSID=Kamui
    CHANNEL=6
    MODE=
    RATE=
    BRIDGE=br0
    cat /etc/sysconfig/network-scripts/ifcfg-br0
    Code:
    DEVICE=br0
    TYPE=Bridge
    BOOTPROTO=dhcp
    ONBOOT=yes
    #IPADDR=192.168.1.100
    #NETMASK=255.255.255.0
    #GATEWAY=192.168.1.1
    Code:
    VBoxAddIF vbox0 kamui0523 br0
    and I told VirtualBox to use this interface (vbox0) for my virtual machine,(using "Settings", "Network", "Attached to" and enter "vbox0") .
    then I start XP but network cant works,cant get ip address by dhcp or manually(NAT mode is ok).can anybody tell me whats wrong with my setting or can find way out to solve it?

  2. #2
    linuxpcmancn Guest
    It seems as if following the VirtualBox User Manual's bridging way on Fedora doesn't work.There should be a another way to do the job.

  3. #3
    scottro's Avatar
    scottro is offline Retired Community Manager -- Banned from Texas by popular demand.
    Join Date
    Sep 2007
    Location
    NYC
    Posts
    8,120
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yeah, it doesn't work.

    http://home.nyc.rr.com/computertaijutsu/vboxbridge.html

    Whoever wrote the Fedora section seems to be an Ubuntu user.
    So, don't feel badly.

    The link above is my version of how I get it working with Fedora.

    If any of it isn't clear, post again.

  4. #4
    linuxpcmancn Guest
    Nice work,man!Very useful info for me!

  5. #5
    scottro's Avatar
    scottro is offline Retired Community Manager -- Banned from Texas by popular demand.
    Join Date
    Sep 2007
    Location
    NYC
    Posts
    8,120
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Trite as it sounds, comments like that are what make it worthwhile making those pages.

  6. #6
    Hades0523 Guest
    hello scottro,thanks for help frist
    unfortunately,It still cant works,here is my step below:
    1./usr/sbin/usermod -G vboxusers -a kamui0523
    2.KERNEL=="tun", NAME="net/%k", GROUP="vboxusers", MODE="0660"
    3.install parprouted for RHEL 5 on Fedora 8
    4.sysctl net.ipv4.ip_forward=1
    5.VBoxTunctl -b -u john
    6.ip link set tap0 up
    6.ip addr add 192.168.1.105/24 dev tap0
    7.parprouted wlan0 tap0
    8.iptables -t nat -A POSTROUTING -o wlan0 -j MASQUERADE
    9. put in tap0 at Interface Name section

    Code:
    wlan0
    ip:192.168.1.100
    mask:255.255.255.0
    gw:192.168.1.1
    
    tap0
    ip:192.168.1.105
    mask:255.255.255.0
    
    guest OS(XP)
    ip:192.168.1.110
    mask:255.255.255.0
    gw:192.168.1.1
    Last edited by Hades0523; 1st March 2008 at 03:02 PM.

  7. #7
    scottro's Avatar
    scottro is offline Retired Community Manager -- Banned from Texas by popular demand.
    Join Date
    Sep 2007
    Location
    NYC
    Posts
    8,120
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    As I say somewhere in that article, I've never been able to get it to work with iptables. I didn't try that hard, though when it didn't work, I googled for a few minutes. So, for the moment, when I use wireless, I just do iptables -F.
    Not ideal, of course.

    One thing you can try is to run parprouted in debug mode--I believe I mention doing that too. (Makes quick check). Yup, you can call parprouted with a -d flag, which will run it in the foreground.

    FWIW, many people do get it working with the iptables line that I mention there, but I haven't been one of them.

  8. #8
    Hades0523 Guest
    Perfect!I disabled firewall and it works now,thanks for your great help,and I`ll find the way about iptables.
    btw:My Desktop can do ssh or telnet to my laptop when I enable firewall.thats weird.

  9. #9
    scottro's Avatar
    scottro is offline Retired Community Manager -- Banned from Texas by popular demand.
    Join Date
    Sep 2007
    Location
    NYC
    Posts
    8,120
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If you find something that works with iptables, please post it. I'm glad it's not JUST me who can't get that working (though I'm sorry that it didn't work for you, of course.)

  10. #10
    Hades0523 Guest
    I can get it works by firewall enable,here`s the setps,hope it can be help for you
    1:run command "system-config-firewall"
    2:choose tab Masquerading and pick interface wlan0 on.
    is there any difference between this way and "iptables -t nat -A POSTROUTING -o wlan0 -j MASQUERADE"?
    I dont know,but it really works for my vbox

  11. #11
    scottro's Avatar
    scottro is offline Retired Community Manager -- Banned from Texas by popular demand.
    Join Date
    Sep 2007
    Location
    NYC
    Posts
    8,120
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Great, I'll try it later when I get back.

    I forget the exact way to see the output, it uses iptables save > whatever.
    I'll do it with both and see if your way works for me, then post the difference.
    (Probably not till tonight though.)
    Thanks for the tip, and let me see if that works for me.

  12. #12
    Hades0523 Guest
    hi scottro,did you make yours works?
    I disabled firewall and write a new iptables that both network of guest and host can work,here as follow:
    192.168.1.110 for guest and 192.168.1.100 for host
    Code:
    iptables -t nat -P POSTROUTING DROP #cant make any network works just this line
    iptables -t nat -A POSTROUTING -s 192.168.1.110 -o wlan0 -j ACCEPT
    iptables -t nat -A POSTROUTING -s 192.168.1.100 -o wlan0 -j ACCEPT
    #same effect with line 2,3 as below two,is that means parameter ACCEPT same with MASQUERADE?
    #iptables -t nat -A POSTROUTING -s 192.168.1.110 -o wlan0 -j MASQUERADE 
    #iptables -t nat -A POSTROUTING -s 192.168.1.100 -o wlan0 -j MASQUERADE
    Code:
    [root@localhost ~]# iptables -L -n -t nat
    Chain PREROUTING (policy ACCEPT)
    target     prot opt source               destination         
    
    Chain POSTROUTING (policy DROP)
    target     prot opt source               destination         
    ACCEPT    all  --  192.168.1.110        0.0.0.0/0           
    ACCEPT    all  --  192.168.1.100        0.0.0.0/0
    Chain OUTPUT (policy ACCEPT)
    target     prot opt source               destination

  13. #13
    scottro's Avatar
    scottro is offline Retired Community Manager -- Banned from Texas by popular demand.
    Join Date
    Sep 2007
    Location
    NYC
    Posts
    8,120
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Shucks, I didn't answer this? (Or maybe I got distracted and never posted--sigh, yet another senior moment.)

    Ahh--now I remember, I added the info to my page and never posted back here.

    Yes, it worked.
    The difference that I saw was this. When I did it the command line way, the Masquerade lines (and the other ones you post) showed up at the top of the file when I did iptables-save.

    When I did it your way, the lines showed up at the end of the file.
    When I did command line, regardless of whether I did -I as in Insert or -A as in append, the lines, when I ran iptables-save, the lines showed up at top of the file. I'm not even sure how iptables processes--I'm much more familiar with OpenBSD's pf, which I much prefer--of course, I"m sure part of that is because I'm much more used to it..

    At any rate, I want to thank you for providing me the answer to this puzzle.

  14. #14
    Join Date
    Sep 2004
    Posts
    2,006
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    see this is where virtualbox just isn't polished enough for me - vmware server does this out of the box without shonky scripts.

    why are people using virtualbox instead of vmware, i don't see a performance gain or other features - am i missing some unique selling point?

  15. #15
    scottro's Avatar
    scottro is offline Retired Community Manager -- Banned from Texas by popular demand.
    Join Date
    Sep 2007
    Location
    NYC
    Posts
    8,120
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well, the seamless thingie is pretty cool. Basically, you get your Linux desktop and a Windows taskbar.

    For some people, it's a case of preferring Vbox's licensing and somewhat non-commerical (though not entirely) attitude. (This might change now that they've been bought by Sun.)

    In a thread from a few months ago, I agreed with what you say above. Someone else posted that they found noticieable performance improvement. I tried it again and was quite impressed--it really does, these days, seem much faster to me than VMWare server.

    Also, (this may no longer be true, I haven't used VMWare server for a month or two) you might have noted the thread is about wireless bridging. (I don't know if this was obvious--I picked it up because I've been doing it, and I knew that parprouted is only needed with wireless.) At one point, at least, you needed the vmware-any-any patch to get VMWare working on Fedora. That patch broke wireless. (However, soon afterwards, someone else made another patch that fixed that problem--still, one had to dig around to find the various necessary patches.) So, it became non-trivial with VMWare too.

    Still, as you say, the scripts are a nuisance--for me at least, however, there really is a performance gain.

    Also, the VBox installation has a much lighter footprint than the VMWare one. I don't have VMWare running, so can't give an accurate comparision, but it is smaller (and apparently uses less resources as well. I think I tested this some time ago.)

    Lastly, I think a lot of people, including myself, rather dislike the way the VMWare beta 2.0 is requiring a web interface. (However, that's not relevant for the still readily available 1.4)

    So, to sum up this long-winded reply, in my case, the main selling point was that I did see major performance improvements, especially on marginal hardware.

Page 1 of 2 12 LastLast

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
[[template footer(Guest)]]