Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Isolation of network of bottle into distinct namespace. #197

Open
skvskv opened this issue Aug 31, 2021 · 1 comment
Open

Isolation of network of bottle into distinct namespace. #197

skvskv opened this issue Aug 31, 2021 · 1 comment
Assignees
Labels
enhancement New feature or request on-hold

Comments

@skvskv
Copy link
Contributor

skvskv commented Aug 31, 2021

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:

  • the bottle cannot advertise mDNS to Windows host
  • to reach the bottle Windows host needs dedicated routing table entry set up manually every time
  • nearly impossible to automate the setup

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

@skvskv skvskv added the enhancement New feature or request label Aug 31, 2021
@github-actions
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request on-hold
Projects
None yet
Development

No branches or pull requests

2 participants