can i create a bridged network for wsl2

motty mermelstein 16 Reputation points
2021-01-02T21:18:07.187+00:00

I would like to be able to use a bridged network with wsl2. I couldn't find a way to do it.

Hyper-V
Hyper-V
A Windows technology providing a hypervisor-based virtualization solution enabling customers to consolidate workloads onto a single server.
2,560 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Su 16 Reputation points
    2021-03-27T20:27:45.123+00:00

    Hello,

    Sorry for troubling, but .. any kind of port forwarding workaround solution kind of can not fix what is asked here. As having access to the host network is something completely different from network packets / connections forwarded from a port to another port which exists only virtually somewhere in host's memory.

    Is there perhaps any change Ms will reconsider this behavior? As the promoted port forwarding is inconvenient to use and also blocks the wls virtual to interact with the host network directly.

    Best Regards,
    Su

    3 people found this answer helpful.
    0 comments No comments

  2. Mico Mi 1,921 Reputation points
    2021-01-04T07:12:22.46+00:00

    Hi,
    I found a similar thread, you can take a look at edwindijas’s solution and check if it could help at your side:
    https://github.com/microsoft/WSL/issues/4150
    And this thread also may be helpful:
    https://www.reddit.com/r/bashonubuntuonwindows/comments/hdmspt/using_bridged_networking_to_get_outside_access_to/

    Thanks for your time!
    Best Regards,
    Mico Mi

    -----------------------------

    If the Answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.