Routing traffic from Windows host machine to OpenWrt on Virtualbox

Good for noting, this could also be the OP issue; but it seems also they didn't realize the OpenWrt had to be connected to the Internet for what they desire.

My openwrt has always been connected to the Internet. It only lost internet when I tried your configurations.

Exactly. No "regardless".

If your OpenWrt was already connected to the Internet and providing Internet to the Windows machine already, then you simply install the VPN, QoS, etc. and configure them.

To be clear, here is a diagram:

ISP Comcast connection <> OpenWrt Adapter 2 Bridged (WAN) <> OpenWrt LAN Adapter 1 (host-only adapter) <> Windows client

That is the needed setup for VPN, QoS, etc.

Then you'll need to setup your Windows to use OpenWrt as its router.

This is my original question from the first post. How do I do that? Note that the windows machine is the one hosting the router.

Here is an online screenshot from a VirtualBox forum - you should see an interface on Windows that you can select for Adapter 1 - it is named "VirtualBox Host-Only Adapter".

  • Second, I have to test bridging an ISP on a Windows host. In other OSes it's possible to use a and enabled PHY but not assign addresses, etc.

That may take a few days, as I don't simply have Windows machines running VirtualBox. Feel free to simply review the steps and instructions already given.

Here they are in linear form:

  • On a default install of OpenWrt with 2 adapters
    • Adapter 1 LAN - "VirtualBox Host-Only Adapter"
    • Adapter 2 WAN - bridged to Comcast

(At this point you should have internet connectivity thru OpenWrt, I would need the results of all traceroutes as requested previously to assist in troubleshooting. At minimum, you should be able to access the OpenWrt's web GUI at the LAN IP.)

Also, feel free to ask the VirtualBox forum in the meantime - if you prefer. It may be better to inquire with them for an advanced PHY setup. :wink: After it's setup, you can always inquire about VPN, QoS, etc.

I deleted the original openwrt vm and set up a new one accordingly. No internet.

  • You really should provide [extremely] verbose information if you need assistance
  • The screenshot posted provided little information - except showing what I told you should be there
  • It appears you in fact have 2 avaliable PHYs - you noted originally you only had 1
  • Do you have an IP on the VirtualBox Host-Only Adapter from OpenWrt's LAN?!?!

Perhaps you can show screenshots of: your actual setup, the OpenWrt, network setup, status on OpenWrt's console screen, informing us if can you access the web GUI (i.e. things I told you should work and need to know to troubleshoot).

Where are the traceroures I said would be needed if it didn't work (I've mentioned quitea few times they're needed to troubleshoot) ???

If you don't wish to provide needed information and test results, I'm not sure how we can assist you.

:warning: You may have no Internet because Comcast has the MAC of the Windows machine set in their network. Since you won't say if you can access the OpenWrt, only mention "no Internet" each post and won't provide traceroutes, it's hard to continue troubleshooting and determine if the steps worked. You must provde responses to all inquiries, not just yes or no to Internet.

OK, I have setup the device and had success:

I followed these steps:


On the VirtualBox Host-Only Adapter:

  • In VirtualBox, I disabled DHCP server


  • On Windows, I changed to the following:

On the Ethernet connected to Comcast:

  • In Windows - I disabled IPv4 (you may wish to disable IPv6 too)

From Windows:

C:\Program Files\Oracle\VirtualBox>tracert

Tracing route to []
over a maximum of 30 hops:

  1    <1 ms    <1 ms    <1 ms  OpenWrt.lan []
  2    <1 ms    <1 ms    <1 ms []
  3     1 ms     1 ms     1 ms []
  4     2 ms     2 ms     2 ms []
  5     3 ms     2 ms     2 ms []
  6     3 ms     3 ms     3 ms []
  7     3 ms     3 ms     3 ms []
  8     9 ms     9 ms     9 ms []
  9     9 ms     9 ms     9 ms []
 10     8 ms     8 ms     8 ms []
 11     9 ms     9 ms     9 ms []
 12    11 ms    11 ms    11 ms
 13     9 ms     9 ms     9 ms
 14    12 ms    11 ms    11 ms
 15    12 ms    11 ms    11 ms []

Trace complete.

From OprnWrt:

traceroute to (, 20 hops max, 46 byte packets
 1  0.661 ms
 2  *
 3  *
 4  *
 5  *
 6  *
 7  *
 8  *
 9  *
10  *
11  *
12  *
13  9.426 ms

Hope this helps. If you have issues or inquires, please include details.

I will assume this is for the VirtualBox Host-Only Adapter.

Following your setup, I lost internet on host machine too. Here's traceroute:

Tracing route to over a maximum of 30 hops

1 DESKTOP-UAM4C6K [] reports: Destination host unreachable.

Trace complete.


the openwrt vm is a blank slate, I haven't configured anything. The only thing I have typed on the commandline is traceroute.

You didn't have to assume:

Not only that, the default LAN in OpenWrt is - so this clearly is to connect to the OpenWrt on LAN over the VirtualBox Host-Only Adapter.

Correct, it should be - as all you have to do is boot OpenWrt with 2 Adapters - as per my directions. (but I didn't give any instructions to type on OpenWrt's command line - I suggested you have access to the web GUI via the VirtualBox Host-Only adapter and do so from the browser.)

Feel free to:

  • Provide all information previously asked
  • Ask any questions you may have

It's clear the setup works - so feel free to check your setup or:

If you configured the Windows device as - this means you have improperly configured something else on the Windows host (can't guess - provide details, ask questions).

You mean luci? I couldn't install luci because I have no internet on openwrt vm.

I didn't. I turned off ipv4 as instructed. What screenshots or details do you want me to provide? Also I have no idea what you meant by screenshots of "the actual setup" or "network setup". Would you like openwrt's uci show network? Also, I'm curious if your working setup was done on a physical Windows machine or on a Windows vm.

LuCI comes by default ( ; but in any cause it doesn't matter - as you ran the command on the console.

I said no such thing!

Please see again:

First adapter:

VirtualBox Host-Only Adapter

Second Adapter:

Adapter Connected to Comcast

So what is the IP

This is what I did. I unticked ipv4, on the ethernet connected to my modem, not on the VirtualBox Host-Only Adapter if that's what you are wondering.

1 Like

I have no idea. I'm not the expert here. I did what you instructed and gave you screenshots of the results.

Did you or did you not assign

If so where?

  • Then we can check if you have connection to OpenWrt
  • Then check connectivity to Internet

(as I've given in steps)

here. exactly like this.

Then that would be yes, you assigned to Windows.

Ping on Windows


  • I don't need my instructions quoted, as I know they work, your screenshots are preferred to verify.
  • If you don't know why you're making a config, feel free to ask. :bulb:

But you are responsible for your own device.

C:\Program Files\Oracle\VirtualBox>ping

Pinging with 32 bytes of data:
Reply from bytes=32 time<1ms TTL=64
Reply from bytes=32 time<1ms TTL=64
Reply from bytes=32 time<1ms TTL=64
Reply from bytes=32 time=1ms TTL=64

Ping statistics for
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 1ms, Average = 0ms

C:\Program Files\Oracle\VirtualBox>

screenshot of my virtualbox host adapter:

1 Like

You have connection to the OpenWrt.

Open LuCI, provide results...login if you you can see it.


i have it and can login. What do you what me to provide with it?

1 Like