OpenVPN problem

  • I am hoping that someone else has connected a Raspberry Pi running LibreElec to another Raspberry Pi running PiVPN and can tell me what I have not done correctly as I cannot connect Kodi to my VPN server

    My PiVPN server is in the UK and my Raspberry Pi Kodi is in Portugal.

    My PiVPN server works fine as I have other devices connected to it.

    I have installed Zomboided VPN Manager to the Kodi

    I have chosen the "User Defined VPN" when setting up VPN Manager

    I have the user.ovpn file generated by PIVPN

    When I use the user.ovpn as generated by the PiVPN I get an error message generated that .........................................

    "you have neither a controlling tty nor systemd -cant ask for "Enter private key password" and can not use "auth-no cache."

    After changing the line in the .ovpn configuration to "auth-ask-pass" -------I then get an error message which says

    "unrecognised option, or missing or extra parameter, /storage/kodi/addons/service.vpn.manager/user defined/user.openvpn:12:auth-ask-pass(2.5.8)"

    I now have no idea what I need to change to make this work.

    Can anyone help me please?

    Has any other person connected Kodi on a Raspberry Pi to their own VPN server, rather than one of the many paid for ones?

    Thanks

    Jim

  • I think the root issue is that certs were created with passwords and thus you need to authenticate them to use them, but LE runs OpenVPN as a daemon (non-interactive) process so the correct option is "askpass /path/to/<filename>" so the required certificate password is read from a static file: edit the path to reflect somwhere on /storage where you created the file (plaintext file containing only the cert password). IIRC the "auth-ask-pass" option is used with connections that require interactive user:pass authentication, which is not the same as authenticating the certificate. There's lots of overlapping terminology though so it's easy to get confused.

  • Hi chewitt,

    Many thanks for your reply to my post. It is indeed confusing made worse by the fact I am easily confused.

    I have added a line to the .ovpn file which is ..... askpass /storage/.kodi/userdata/addon-data/service.vpn.manager/UserDefined/user.txt.

    When I installed previously installed the .ovpn file using the "UserDefined Import Wizard" the Import Wizard Log told me the .ovpn (JimH.ovpn) file had been copied to

    /storage/.kodi/userdata/addon-data/service.vpn.manager/UserDefined/JimH.ovpn

    I presumed this was where the .ovpn file got installed for me to write the extra line .

    So I then installed the user.txt file containing the password to same location.

    When I tried to connect I then got the error message "askpass failure --no such file or directory"

    I have checked there are no typos.

    Perhaps I have just not understood where you were telling me to write the "askpass" line.

    One thing I am puzzled by is why, if I use the file manager in System to look at the files I see that the location is

    special://profile/addon-data/service.vpvn.manager/UserDefined.

    I did try writing this location instead, but it does not work either.

    I apologize if I am being dumb

  • The "special://" URI prefix maps to the root of where Kodi writes data, e.g. /storage/.kodi .. but that's a Kodi internal thing so firstly OpenVPN doesn't understand it, and second askpass doesn't accept URIs as input only paths.

    If an absolute /path/to/the/file isn't working it might be relative, e.g. if JimH.ovpn and user.txt are in the same folder, only add the filename alongside 'askpass' and don't add the path.

    If that's not it you probably need to look into (or share) the OpenVPN log. I've never used that add-on but I'd guess it generates a log somewhere and that might have more info.