Opened 15 years ago
Last modified 14 years ago
#6323 new defect
Can't get IP Forwarding to work with Host-only adapter
Reported by: | grattemedi | Owned by: | |
---|---|---|---|
Component: | network/hostif | Version: | VirtualBox 3.0.6 |
Keywords: | ip forwarding host only | Cc: | |
Guest type: | Linux | Host type: | Linux |
Description
Hello,
I'm developing a software to demonstrate how Man in the middle works using arp cache poisoning. I can't get ip forwarding to work with Host-only adapter!
I was previously using a bridged network on tun/tap devices that I was creating myself. My network was designed like this :
[*]1 bridge br0
[*]2 tun/tap interfaces tap0 and tap1
Then I add the tap0 and tap1 to the bridge and configure my 2 VMs to use bridged network on tap0 and tap1. With this configuration, ip-forwading works perfectly fine! My bridge br0 can play the role of the attacker and forward ip between my first and second VM.
Now I'm trying to use host-only adapter, so that i could use later in my program the VBoxManage hostonly ipconfig command line. In the configuration I want to be, my 1st VM wants to talk to my 2nd VM but its arp cache has been corrupted so that packets are sent to the host (host-only interface). My problem is packets aren't forwarded by the host, and they normally should be.
I'm enabling ip forwarding on the host-only adapter (vboxnet0), as I was doing before with my bridge br0 :
echo 1 > /proc/sys/net/ipv4/conf/*/forwarding echo 0 > /proc/sys/net/ipv4/conf/*/send_redirects
Unfortunately, even though each machine in this configuration can communicate with one another, the vboxnet0 interface doesn't forward ip packets. Shouldn't host only interface behave like a normal networking interface?
Thank you,
Laurent Sebag