OpenVPN / openvpn3-linux

OpenVPN 3 Linux client
GNU Affero General Public License v3.0
554 stars 148 forks source link

Using openvpn3 in Gitpod #69

Closed 107ef363-c60f-46fb-a8bc-da8c5f4f6938 closed 2 years ago

107ef363-c60f-46fb-a8bc-da8c5f4f6938 commented 3 years ago

I am trying to connect to an OpenVPN server from Gitpod. Since this client is designed to be run by unprivileged users, it seems like a great fit.

However I get this error when running openvpn3 session-start --config ${MY_CONFIGURATION_FILE}:

** ERROR ** Could not connect to the D-Bus daemon for : Could not connect: No such file or directory

I'm guessing I have to set up a D-Bus daemon manually to get it to work. Can anyone confirm this or correct me if it's something else?

dsommers commented 3 years ago

I've never heard about anyone using it on Gitpod yet. But if you have dbus-daemon or dbus-broker running a system bus, this should work. But you need basic DBus functionality to use openvpn3-linux.

107ef363-c60f-46fb-a8bc-da8c5f4f6938 commented 3 years ago

@dsommers Awesome! I'll link the Gitpod configuration once it's working. Thanks for the quick response!

107ef363-c60f-46fb-a8bc-da8c5f4f6938 commented 3 years ago

@dsommers I installed dbus-broker and systemctl enable dbus-broker.service seems to be working (it successfully creates the link at /etc/systemd/system/dbus.service). But I'm still getting the same error.

** ERROR ** Could not connect to the D-Bus daemon for : Could not connect: No such file or directory

I'm still not sure what file exactly openvpn3-linux is looking for but clearly it's not where it is expecting it to be. Is there a way to point it to the correct location?

dsommers commented 3 years ago

That error is a generic error message from the kernel, where most likely the D-Bus implementation is not able to find the socket applications use to talk with the D-Bus daemon. Can you try to use strace to see which open() calls fail?

107ef363-c60f-46fb-a8bc-da8c5f4f6938 commented 3 years ago

@dsommers These two calls seem to be responsible:

connect(5, {sa_family=AF_UNIX, sun_path="/var/run/dbus/system_bus_socket"}, 110) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/x86_64-linux-gnu/charset.alias", O_RDONLY) = -1 ENOENT (No such file or directory)
dsommers commented 3 years ago

That looks like dbus-broker isn't configured to run a system bus. Or that some symlinks are missing. This is kinda out-of-scope for openvpn3-linux itself, as openvpn3-linux expects basic D-Bus functionality to be present. Try to use various standard d-bus tools (busctl, gdbus, d-feet, etc) to see if you can introspect system services.

dsommers commented 2 years ago

Closing this now, as this is not related to openvpn3-linux itself, but more a generic system issue.

jmls commented 1 year ago

did you ever get this working ? Hitting the same problem

DiStefano8472 commented 1 year ago

I want to use it inside of a docker container. But I am running in the same issue.

ToanLyHoa commented 10 months ago

I want to use it inside of a docker container. But I am running in the same issue.

Did you handle it?

venkatamutyala commented 7 months ago

Any workarounds to use this from docker?