VirtualBox Bridged Ethernet Controller Is Causing DNS/IP Leaks!

Hey Everyone!

I'm experiencing a rather severe issue with my virtual OpenWrt router! Currently I have 4 adapters configured for my virtual router in VirtualBox (https://prnt.sc/HttjU0NSNh3k), adapter 1 is eth0, adapter 2 is eth1 and so on.. eth3 is my wan interface device as it's bridged to my laptop wireless adapter, eth1 is my VirtualBox host only network so my laptop can access my router's services, eth0 is my VirtualBox internal network so my virtual machine's can use the router, and these all work perfectly fine, and with eth2 disabled the issue does not occur!

** Eth2 is my bridged ethernet controller which I use to connect devices such as my Raspberry Pi, or a network switch. The issue is that when this adapter is enabled in the virtual router network config (and shows up in ifconfig) then my computer seems to attempt to use the ethernet port as a wan interface or something...

** NOTES

  • Whether or not a device is connect to my laptop via ethernet, if eth2 is enabled in the virtual router then my computer will leak requests, and if a VPN is enabled my computer will attempt to use it.
  • Example of my DNS leaks, my router uses Cloudflare DNS, and my virtual router uses OpenDNS, here's a leak test with eth2 disabled (https://prnt.sc/kjodNaVA-RpK) and here's one with it enabled (https://prnt.sc/s_dN9lFDFWwf)
  • My host machine is running Windows 11, I've tried changing the ethernet adapters metric from automatic to "9999" in my host machines adapter settings but the issue still occurs.
  • I've considered disabling ethernet drivers on my computer, but I'd imagine this would cause it not to work for the virtual machine either. <<< (if I'm wrong about this please let me know!)

Anyone that could help me someone isolate my ethernet adapter to only communicate with the virtual machine and whatever device connect via the port, without the host communicating with the port directly. Thank you!

Network Config:

config interface 'loopback'
        option device 'lo'
        option proto 'static'
        option ipaddr '127.0.0.1'
        option netmask '255.0.0.0'

config device
        option name 'br-lan'
        option type 'bridge'
        list ports 'eth0'

config interface 'lan' # virtualbox host only adapter
        option device 'br-lan'
        option proto 'static'
        option netmask '255.255.255.0'
        option ipaddr '10.71.71.1'
        option ipv6 '0'
        option delegate '0'

config interface 'wan' # WAN (bridged wifi adapter)
        option device 'eth3'
        option proto 'dhcp'
        option peerdns '0'
        option dns '10.71.71.1:5353' # AGH SERVER
        option ipv6 '0'
        option delegate '0'

config interface 'internal_netwk' # virtualbox internal network adapter
        option proto 'static'
        option device 'eth1'
        option netmask '255.255.255.0'
        option ipaddr '10.71.72.1'
        option ipv6 '0'
        option delegate '0'

config interface 'eth_control' # bridged ethernet controller
        option proto 'static'
        option device 'eth2'
        option netmask '255.255.255.0'
        option ipaddr '10.71.73.1'
        option ipv6 '0'
        option delegate '0'

Reference for others:

1 Like

UPDATE:

I've been testing for hour's and am still experiencing no closer... I am now experiencing two different issues so I'll do my best to explain them both in detail!

Issue 1 (Host-Only Adapter Leaking!):

With only the wan adapter and the VirtualBox host-only adapter enabled, which makes easy access to the VM's services so as the LuCI web-page. My host machine still seems to be leaking DNS requests and occasionally appears to be using the IP of the virtual router. I know that this may be a feature of the host only adapter, but in my case I'd like this not to happen while still being able to access the router services, if not I can always live with the host-only adapter disabled which is what I'm forced to do right now.

Issue 2 (Bridged Ethernet Controller Leaking!):

With only the wan adapter and the Bridged Ethernet Controller enabled which is my computers ethernet port. My host machine was at first behaving very obnoxious, when I would connect for example my Raspberry Pi my computer would attempt to use it as a connection, so I modified the adapters "metric" to 9999 in my windows adapters settings for the ethernet controller, and now the raspberry pi seems to work fine, except the bridged ethernet adapter seems to cause my host machine to leak IP and DNS requests ** ONLY WHEN THERES A DEVICE CONNECTED VIA ETHERNET, "leak IP as in I have a VPN enabled on my virtual router and not my host machine and it cause my host machine to attempt to use the VPN which of course causes more issues".

** NOTE

  • I believe in a previous message I said that it was occurring even with no device connected, but I have now realized that was caused from the host-only adapter. ** SO the ethernet controller is only leaking requests when a device is connected!