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

[Epic] VPN support #1087

Closed
gbraad opened this issue Mar 10, 2020 · 14 comments
Closed

[Epic] VPN support #1087

gbraad opened this issue Mar 10, 2020 · 14 comments
Assignees
Labels
kind/enhancement New feature or request os/windows status/pinned Prevents the stale bot from closing the issue vsock

Comments

@gbraad
Copy link
Contributor

gbraad commented Mar 10, 2020

No description provided.

@jlynchMicron
Copy link

jlynchMicron commented Apr 20, 2020

@gbraad is this a coming fix for crc in the immediate future? I have cisco anyconnect installed by my company that I cannot disable, and I think it is causing me issues during "crc start" similar to this issue #908

@gbraad
Copy link
Contributor Author

gbraad commented Apr 21, 2020

No timeframe is given as issues are encountered while implementing

@stale stale bot added the status/stale Issue went stale; did not receive attention or no reply from the OP label Jun 20, 2020
@anjannath anjannath added kind/enhancement New feature or request os/windows and removed status/stale Issue went stale; did not receive attention or no reply from the OP labels Jun 23, 2020
@gbraad
Copy link
Contributor Author

gbraad commented Jul 14, 2020

Planned to be reviewed again.

@crc-org crc-org deleted a comment from stale bot Jul 14, 2020
@gbraad gbraad added the status/pinned Prevents the stale bot from closing the issue label Jul 14, 2020
@gbraad
Copy link
Contributor Author

gbraad commented Jul 14, 2020

@guillaumerose Do you have any suggestions on how to tackle this?

@guillaumerose
Copy link
Contributor

Docker Desktop solves this by using vpnkit.

vpnkit runs as user on the host and connects to a small daemon inside the VM using named pipes/vsock. The daemon in the VM is in fact a tap interface. The daemon transfers all the traffic to vpnkit so that vpnkit handles all the traffic as the user.

In this architecture, vpnkit is a client because of issue with vsock on older version of Windows. It could be reversed now.

@gbraad gbraad changed the title Spike: VPN support (Windows) [Spike] VPN support (Windows) Jul 15, 2020
@guillaumerose
Copy link
Contributor

I started an experiment in https://github.com/guillaumerose/gvisor-tap-vsock. It reproduces vpnkit without ocaml code. For the moment, it's more a toolkit to solve the VPN issue than the solution itself.

@guillaumerose guillaumerose self-assigned this Sep 14, 2020
@gbraad
Copy link
Contributor Author

gbraad commented Oct 7, 2020

We should break down work in new tasks as the spike has concluded.

Some time ago we noted what was needed:

  • Make the client more reliable: retry loop if connection fails + automatic setup of the network (ip addr etc.) [side note: how to give network configuration/dhcp? how to disable it when not needed? ignition ?]
  • Package the client part as a container, add it in snc. [side note: how to patch a bundle without having to relaunch the full snc process?]
  • Add the needed registry key for Windows in crc setup
  • Create a a new crc subcommand that will run the host part OR make crc start --with-experimental-networking a never ending running task [side note: 2nd option is probably easier for user]
  • Add services if required (dns, transparent proxy)

I know it is boring, but let's break up tasks and assign to platforms. This will aid in testing, as we know what is implemented and perhaps even handover some of the work.

@guillaumerose
Copy link
Contributor

crc-org/snc#234 addresses the first two points.
For the 4th point, the host part is part of the daemon and the config to enable it is network-mode=vsock #1526

@gbraad gbraad changed the title [Spike] VPN support (Windows) [Epic] VPN support (Windows) Oct 7, 2020
@gbraad gbraad changed the title [Epic] VPN support (Windows) [Epic] VPN support Oct 7, 2020
@guillaumerose
Copy link
Contributor

guillaumerose commented Nov 12, 2020

First bits are in master branch. It can be used on the 3 platforms.

How to test it:

  • cleanup everything, ~/.crc and hosts file
  • crc config set network-mode vsock
  • run crc setup
  • run crc daemon in a second terminal
  • run crc start as usual.

What is still missing:

What can be improved:

@cfergeau
Copy link
Contributor

cfergeau commented Nov 12, 2020

cleanup everything, ~/.crc and hosts file

which means crc delete; crc cleanup; rm -rf ~/.crc, and finally remove all xxx.crc.testing entries from /etc/hosts

@fasho
Copy link

fasho commented Mar 22, 2021

bump

@gbraad
Copy link
Contributor Author

gbraad commented Mar 22, 2021

@guillaumerose
Copy link
Contributor

VPN support is available by default on macOS and Linux.
It will be activated by default by the MSI on Windows in the next release. Until then, please refer to https://github.com/code-ready/crc/wiki/VPN-support--with-an--userland-network-stack

Still, we are missing end-to-end tests for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement New feature or request os/windows status/pinned Prevents the stale bot from closing the issue vsock
Projects
Status: No status
Development

No branches or pull requests

6 participants