Closed fdebiesse closed 2 years ago
This sounds like the openvpn3-service-sessionmgr
process doesn't start and settle quickly enough.
That said, we are deprecating openvpn3-autoload
. So I would encourage you to use the new systemd unit file approach. In short terms, it means:
Import the configuration file as a persistent config:
$ openvpn3 config-import --persistent --name VPNconfig --config VPNconfig.ovpn
This config may now contain <auth-user-pass>...</auth-user-pass>
with credentials.
If you want to start the session when you login (from a login script) or from the command line, use this line:
$ openvpn3 session-start --config VPNconfig
If you want to start the connection during boot, root
first needs to be granted access to the profile:
$ openvpn3 config-acl --config VPNconfig --show --grant root --lock-down true --transfer-owner-session true
The --lock-down
option means that the root user cannot dump the config file via openvpn3 config-dump
(root
can access the raw file directly, though). The --transfer-owner-session
means that when root
starts this VPN session, the session ownership is transferred to the same owner who owns the configuration file. Which means that the the unprivileged user can manage the running VPN session without root privileges.
Then you can configure systemd to start this profile at boot:
I would recommend you to test this approach and see if that works better. If it doesn't please provide the output of this command line:
# openvpn3-admin version --services
If there are any failures here, then the output from journalctl --since -3m
will be quite helpful.
Hello @dsommers
Thank you for your response ! As recommended, I do not use anymore autoload as it will be deprecated. I'm now using auth-user-pass in the config file and I launch the commands you've mentionned. All seems to be working fine now
Thank you!
Hello,
I'm using
openvpn3-autoload
on a linux machine, through a shell script, but i get this warning:The issue is that the session is not automatically started (which is an issue for my script which will be crontabed)
For now, my script justs launches:
In the
~/.openvpn3/autoload
folder, i have my 2 files:VPNConfig.ovpn
, contains the openvpn client configurationVPNConfig.autoload
, which contains:Context information:
Regards