Cannot add an OpenVPN profile

Hi guys,
I’ve installed OpenWRT (latest version) on my Raspberry Pi3. Everything works like a dream despite adding an OpenVPN connection profile. Either trying to add a custom one or uploading a config file doesn’t work. It just doesn’t appear in the list afterwards. I tried to uninstall OpenVPN and the Luci app with the same result. Does somebody have an idea what’s going on there?
Thanks in advance

How are you adding the config? For the luci app to work, it needs to be listed in /etc/config/openvpn. That file expects uci formatting. You can either format your OpenVPN config in uci or you can create a uci section that points to the plain conf file.

1 Like

Thanks for the reply. I click on the OpenVPN tab in the Luci web ui. There I have two options:

  1. Creating a new template and filling in the credentials, server etc.
  2. Uploading my own OpenVPN config file (downloaded from the Cyberghost website).

None of the above options are adding a profile. Just nothing happens like I never clicked on one.

let's see your /etc/config/openvpn file. Chances are that there is nothing of interest there, but be sure to redact any private information, if present.

1 Like

That looks very broken. Is it possible that the sd card is corrupted?

That is most certainly not correct. Could be a corrupt card, but try deleting the file and see if it lets you start a new one.

2 Likes

I have deleted the file by hand et voila, now it works. Thank you very much. :slightly_smiling_face:

You're welcome. Glad you're up and running now!

1 Like

I played around a bit and I managed to upload the provided config file. Now a new problem came up:
it always says "Insufficient permissions to read UCI configuration." I've read about that problem somewhere else already, but there wasn't a solution, they only said that it's a bug.

Thank you.

This will happen, afaik, if the OpenVPN configuration is not uci formatted and/or if the uci formatted configuration is actually pointing to a plain text config file.

For a variety of reasons, I just moved from uci formatted to plain text and the uci file simply points to the plain text. I see the “error” but I also see the plain text file in luci and everything is functional. So I don’t think it is a bug, or at least not one of consequence.

Edit: I see that it is indeed a bug. I may try that patch, but I also may simply not worry about it since things otherwise are working as expected.

1 Like

I tried the patch and it indeed seems to work theoretically now, but I’m nowhere in the position for getting it to work. It now gives me this on the System log:

neither stdin nor stderr are a tty device and you have neither a controlling tty nor systemd - can't ask for 'Enter Auth Username:'. If you used --daemon, you need to use --askpass to make passphrase-protected keys work, and you can not use --auth-nocache.

After that it exits with a fatal error.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.