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

Unable to start the vpn-client with the test enviroment #941

Closed
Senyoret1 opened this issue Oct 18, 2021 · 1 comment
Closed

Unable to start the vpn-client with the test enviroment #941

Senyoret1 opened this issue Oct 18, 2021 · 1 comment
Labels
bug Something isn't working

Comments

@Senyoret1
Copy link
Contributor

Describe the bug
The vpn-client app does not start in, at least, visorB from the skywire-services test enviroment. This could be a problem with my testing config, but I can not be sure about that.

Environment information:

  • OS: Linux

Steps to Reproduce
Steps to reproduce the behavior:

  • Use the steps from VPN UI not opening issue #932 to add the vpn-client app to the visors of the skywire-services test enviroment.
  • Start the test enviroment with integration-run-generic
  • Open the VPN UI for visorB with https://localhost:4200/#/vpn/0348c941c5015a05c455ff238af2e57fb8f914c399aab604e9abb5b32b91a4c1fe/status
  • Open the network tab of the browser dev tools, select a valid server and press the connect button, to start the VPN.
  • The VPN will never be shown as connected. In the browser dev tools, you will see calls periodically made to /api/visors/{pk}/summary. In those calls, the API returns 2 as the status of the vpn-client app, meaning that there was an error, but the detailed_status property is empty, so there is no way to known what the error was.

Actual behavior
The console shows this:

Got default network gateway IP: 192.168.0.1
RTNETLINK answers: Operation not permitted
Adding direct route to 192.168.0.109, via 192.168.0.1Failed to serve VPN: error setting up direct routes: error adding direct route to 192.168.0.109: error running command "ip r add 192.168.0.109/32 via 192.168.0.1": exit status 2: RTNETLINK answers: Operation not permitted

If I start an additional visor and use it as vpn client, it works well.

@Senyoret1 Senyoret1 added the bug Something isn't working label Oct 18, 2021
@ersonp
Copy link
Contributor

ersonp commented Oct 21, 2021

If you want to test a vpn connection within local visors then you need to do a two things

  • Run visorB as sudo from tmux and start vpn-server either by having the auto_start:true in the config or do it from the UI.
  • Run sudo setcap 'cap_net_admin+p' ./bin/apps/vpn-client in skywire-services

detailed_status being empty when there is an error is fixed here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants