3

I have set up an OpenWRT x86-64 virtual machine with VirtualBox. The VM has two network interface, one for LAN and the other for WAN, all bridged to Wi-Fi interface of the host (Macbook). I want the VM to be the gateway for devices in the same LAN of the host.

If I change my host's IP to the OpenWRT VM's IP range and change host's gateway to OpenWRT VM, then my host will be able to surf the Internet and I can verify the traffic is through OpenWRT VM.

The same holds for other VMs on the host.

However, for other devices in the same LAN of the host, after configuring their IP and gateway, I find that they can access the OpenWRT VM (for example, access the LuCI), but they cannot access the Internet.

I have been working on this for hours and still cannot figure out why. I don't think it is the problem of OpenWRT configuration because the host and other VMs on the host work well. Any ideas?

1 Answer 1

0

The fact that both both the WAN and LAN vNICs are bridged to the same physical interface could cause a number of issues. I would recommend bridging the LAN adapter to your wired Ethernet adapter so that traffic comes in the LAN NIC, and goes out the Wi-Fi adapter, and then testing again.

I'm not sure about OpenWRT specifically; however, most firewalls will drop traffic that arrives on an interface that is not configured for the subnet that the traffic claims to be on as 'spoofed', 'illegal', etc. All of your traffic to the VM from the LAN hosts might fall into this category.

Also, you didn't mention the subnet details; you'll need to be sure that these are correctly configured (i.e. non overlapping, correct mask, etc.) so the VM can route the traffic properly.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .