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?