OpenVPN / openvpn3-linux

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

** ERROR ** Configuration profile name "CloudConnexa" already exists #236

Closed deanfourie1 closed 7 months ago

deanfourie1 commented 7 months ago

I'm trying to re deploy a new connector profile from CloudConnexa to a linux client, I cannot for the life of me get it to deploy once a previous profile has been installed.

Installing via the provided script debian_12.sh

How can I remove the previous profiles? Profiles do not show under openvpn3 configs-list

Thanks

dsommers commented 7 months ago

OpenVPN 3 Linux is "user aware". So if the profile was imported as root and you run openvpn3 configs-list as another user, then it won't show up unless that user is granted access to this profile (via openvpn3 config-acl).

I would try to run openvpn3 configs-list as root and see what that shows.

deanfourie1 commented 7 months ago

OpenVPN 3 Linux is "user aware". So if the profile was imported as root and you run openvpn3 configs-list as another user, then it won't show up unless that user is granted access to this profile (via openvpn3 config-acl).

I would try to run openvpn3 configs-list as root and see what that shows.

Yes thank you, that worked! I now see the profile listed as CloudConnexa.

Could you tell me how to deleted it? As I do not know the config path?

Thanks

deanfourie1 commented 7 months ago

When I attempt

openvpn3 config-remove --config CloudConnexa

I get the following error

ERROR more then one configuration profile was found with the given name.

dsommers commented 7 months ago

Use openvpn3 config-lists -v ... and then openvpn3 config-remove --config-path ....

deanfourie1 commented 7 months ago

Sorry but I do not know the config path, the script installed it automatically.

deanfourie1 commented 7 months ago

Oh sorry gotcha! -v gave me what I needed.

Let me try this

deanfourie1 commented 7 months ago

Thank you very much, this has worked! New profile has been installed and connector online.

FYI, I think the documentation really lacks this information.

dsommers commented 7 months ago

Which information do you mean? Cloud Connexa or the man pages in OpenVPN 3 Linux?

https://codeberg.org/OpenVPN/openvpn3-linux/src/branch/master/docs/man/openvpn3-configs-list.1.rst https://codeberg.org/OpenVPN/openvpn3-linux/src/branch/master/docs/man/openvpn3-config-remove.1.rst https://codeberg.org/OpenVPN/openvpn3-linux/src/branch/master/docs/man/openvpn3-config-acl.1.rst

Just to be clear, I'm very much in favour of improving documentation .... no matter which one :slightly_smiling_face:

dsommers commented 7 months ago

I just remembered that the openvpn-connector-setup command does have a --force option too ...

$ openvpn-connector-setup --help
usage: openvpn-connector-setup [options]

OpenVPN Connector Setup utility

optional arguments:
  -h, --help            show this help message and exit
  --mode MODE           Defines how configuration profiles are imported and
                        stored (default: systemd-unit)
  --token TOKEN_VALUE   This value is provided by the CloudConnexa web portal.
  --name NAME           Configuration profile name to use. Default:
                        "CloudConnexa"
  --force               Overwrite configuration profile if it already exists
  --autoload-file-prefix AUTOLOAD_FILE_PREFIX
                        Configuration filename to use. Default: connector.conf
  --no-start            Do not start and configure the profile to start at
                        boot
  --dco                 Use OpenVPN Data Channel Offload (DCO) by default
  --version             Show openvpn-connector-setup version