Routing traffic from MacOS host through OpenWRT inside VirtualBox

Hi. I'm trying to setup OpenWRT router inside VirtualBox, and forward all traffic from my host env (Mac), as well as from external (connected to host) devices through this router.
I was able to setup router VM to cover scenario#2 (external devices), however, I can't achieve the same thing for the host device.

I've found similar problem here (Windows as a host). Solution, that was described there (defining router ip through VB host-only adapter as a default gateway for host) for some reason doesn't work for me.
I have 3 Adapters enabled:

  • Adapter 1 - Host only Adapter to maintain communication between host and VM
  • Adapter 2 - Bridged device to network connection that provided Internet to host
  • Adapter 3 - handle connections from external devices

Router's ip in HostOnly network is 192.168.56.5. I'm able to access LuCI and ssh to this ip. However, once I set it as default gateway on my Mac by

sudo route change default 192.168.56.5

I immedeately lose internet connection on host, ssh connection is being dropped, and LuCI becomes unaccecible. Meanwhile, devices connected to host and routed through VM still have internet.

Here are my interfaces:

test_router is configured as DHCP server to handle external devices and works perfectly. I've introduced corresponding firewall rule for it
I've tried to make similar configurations for mng interface as well -

  • setup it as DHCP server, so it will provide internet for host OS
  • introduce similar firewall rule
    But it didn't work. As I've mentioned, once I change my default gateway on host pointing to router IP in HostOnly network, host looses it's internet conenction.
    I'm incline to think that in can be MAC-related issue, but never succeed to find any solution. Maybe someone here faced similar issue and can help me ? Thanks.