Routing via bridged interface? (solved)

Discussions related to using VirtualBox on Windows hosts.
H.Z.
Posts: 23
Joined: 28. Dec 2012, 16:41
Primary OS: MS Windows 7
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: linux
Location: Budapest

Re: Routing via bridged interface?

Post by H.Z. »

BillG wrote: Starting a new thread would be a good idea, since this discussion has little or nothing to do with your original post.

If you have only just discovered that the vm emulates a wired Ethernet NIC, you have a fair way to go in understanding how this all works!
You're right, but IMHO it makes no sense starting a new topic/continuing this dialog (I hope, it means what I think ;-) ).
I've tried today: using ethernet device to bridged interface, the VM receives all packets with its own MAC addres, while the bridge with wlan receives the wifi adapter's MAC in packets, as target.
I don't know why, but AFAIK, it can't be changed, so I gave it up.
noteirak
Site Moderator
Posts: 5231
Joined: 13. Jan 2012, 11:14
Primary OS: Debian other
VBox Version: OSE Debian
Guest OSses: Debian, Win 2k8, Win 7
Contact:

Re: Routing via bridged interface?

Post by noteirak »

H.Z. wrote:I've tried today: using ethernet device to bridged interface, the VM receives all packets with its own MAC addres, while the bridge with wlan receives the wifi adapter's MAC in packets, as target.
I am not surprised, you are basically piggybacking the wifi link of the host, and wifi hardware would expect a P2P connection over a wifi link, but then gets 2 clients instead of a single one. I have to say, i am already surprised it works in the first place (the whole bridging on a wifi link), so here your hardware is just replacing the "bad" MAC with the one that made the link, and there you go.
Hyperbox - Virtual Infrastructure Manager - https://apps.kamax.lu/hyperbox/
Manage your VirtualBox infrastructure the free way!
H.Z.
Posts: 23
Joined: 28. Dec 2012, 16:41
Primary OS: MS Windows 7
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: linux
Location: Budapest

Re: Routing via bridged interface? (solved)

Post by H.Z. »

YEAAAH! :-)
It has been solved!!!! :-)
I was set up a bridge (br0) on vm1 which contains interface eth0.
Then...

ebtables -t broute -A BROUTING --protocol IPv4 --ip-dst 172.31.1.0/24 -j redirect

After installing package ebtables, and issue the above command, it started to work.
Hmmmm... resolving this problem, required about 4 days, BUT IT WORKS, AND I'M VERY-VERY HAPPY! :-)
Post Reply