Fedora Linux Support Community & Resources Center
  #1  
Old 1st March 2008, 11:20 AM
Hades0523 Offline
Registered User
 
Join Date: Jan 2008
Posts: 56
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?
Reply With Quote
  #2  
Old 1st March 2008, 11:51 AM
linuxpcmancn Offline
Registered User
 
Join Date: Dec 2007
Location: /China/BeiJing
Age: 27
Posts: 252
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.
__________________
An alternative way of life is to love or be loved…

#what's to love > /dev/null

#what's be loved > /trash

:D :D
Reply With Quote
  #3  
Old 1st March 2008, 12:19 PM
scottro Offline
Retired Community Manager -- Banned from Texas by popular demand.
 
Join Date: Sep 2007
Location: NYC
Posts: 8,142
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.
Reply With Quote
  #4  
Old 1st March 2008, 12:37 PM
linuxpcmancn Offline
Registered User
 
Join Date: Dec 2007
Location: /China/BeiJing
Age: 27
Posts: 252
Nice work,man!Very useful info for me!
__________________
An alternative way of life is to love or be loved…

#what's to love > /dev/null

#what's be loved > /trash

:D :D
Reply With Quote
  #5  
Old 1st March 2008, 01:01 PM
scottro Offline
Retired Community Manager -- Banned from Texas by popular demand.
 
Join Date: Sep 2007
Location: NYC
Posts: 8,142
Trite as it sounds, comments like that are what make it worthwhile making those pages.
Reply With Quote
  #6  
Old 1st March 2008, 01:58 PM
Hades0523 Offline
Registered User
 
Join Date: Jan 2008
Posts: 56
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 02:02 PM.
Reply With Quote
  #7  
Old 1st March 2008, 02:54 PM
scottro Offline
Retired Community Manager -- Banned from Texas by popular demand.
 
Join Date: Sep 2007
Location: NYC
Posts: 8,142
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.
Reply With Quote
  #8  
Old 1st March 2008, 03:22 PM
Hades0523 Offline
Registered User
 
Join Date: Jan 2008
Posts: 56
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.
Reply With Quote
  #9  
Old 1st March 2008, 03:56 PM
scottro Offline
Retired Community Manager -- Banned from Texas by popular demand.
 
Join Date: Sep 2007
Location: NYC
Posts: 8,142
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.)
Reply With Quote
  #10  
Old 1st March 2008, 04:14 PM
Hades0523 Offline
Registered User
 
Join Date: Jan 2008
Posts: 56
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
Reply With Quote
  #11  
Old 1st March 2008, 04:56 PM
scottro Offline
Retired Community Manager -- Banned from Texas by popular demand.
 
Join Date: Sep 2007
Location: NYC
Posts: 8,142
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.
Reply With Quote
  #12  
Old 2nd March 2008, 01:13 AM
Hades0523 Offline
Registered User
 
Join Date: Jan 2008
Posts: 56
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
Reply With Quote
  #13  
Old 2nd March 2008, 02:57 AM
scottro Offline
Retired Community Manager -- Banned from Texas by popular demand.
 
Join Date: Sep 2007
Location: NYC
Posts: 8,142
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.
Reply With Quote
  #14  
Old 2nd March 2008, 10:06 AM
sej7278 Offline
Registered User
 
Join Date: Sep 2004
Posts: 2,008
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?
Reply With Quote
  #15  
Old 2nd March 2008, 11:44 AM
scottro Offline
Retired Community Manager -- Banned from Texas by popular demand.
 
Join Date: Sep 2007
Location: NYC
Posts: 8,142
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.
Reply With Quote
Reply

Tags
bridging, fedora, hosts, vbox, works

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


Current GMT-time: 07:00 (Friday, 24-10-2014)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat
Degtyarsk Instagram Photos - Pindiga Travel Photos on Instagram - Hadleigh Photos