arkane-systems / genie

A quick way into a systemd "bottle" for WSL
Other
1.85k stars 104 forks source link

Isolation of network of bottle into distinct namespace. #197

Open skvskv opened 3 years ago

skvskv commented 3 years ago

Is your feature request related to a problem? Please describe. I'm always frustrated when I use multiple WSL2 distros simultaneously because all WSL distros share a single network namespace; i.e., network interfaces, addresses, sockets, etc., are all shared between distros. This disallows me to use genie in multiple distros simultaneously.

Describe the solution you'd like It would be lovely to isolate network of bottle into distinct namespace when genie initializes which implies creating a network interface for the bottle in its network namespace. It is very desirable to allow the bottle to participate in WSL2 networking on L2 level e.g. to be able to directly participate in mDNS advertisement. Tricky part is that Hyper-V networking would only communicate with physical address of bare WSL2 (eth0), thus it's not very easy to make the bottle communicate to Internet. Thank God there are several technical solutions to do the trick.

Describe alternatives you've considered One might just enable ip forwarding in bare WSL2 and setup another private network for bottle. It has multiple downsides:

Additional context PoC network isolation set up by hand

Bare WSL can see genie bottle under different IPv4 address by hostname image

Genie bottle can communicate Internet and Windows 10 host image

Windows host addresses the bottle by hostname (using mDNS) image

github-actions[bot] commented 3 years ago

There has been no activity on this issue for over 60 days. If there is no further activity within 7 days from this message, it will be automatically closed.