How to set up username and password for .ovpn (VPN) file?

I did a search for a method to create a password file, but did not find anything that worked for me. I am uploading a .ovpn file from a paid VPN service. The upload is succesfull. I created a /etc/openvpn/credentials.auth with just the openvpn username and password. I tried ".auth" like described in the .ovpn "Overview" menu and also ".txt" at the end of the file. There is a window "Section to add an optional 'auth-user-pass' file with your credentials (/etc/openvpn/credentials.auth)" to input data into and I put just username and password then pressed "Save". I also modified the .ovpn file itself to try and include this detail. So far, nothing is working. What is the correct method of creating this password file?

If you're working directly with an .ovpn file (as is often supplied by a paid VPN service), within that file you need the line:
auth-user-pass /etc/openvpn/credentials.auth
This is on one line.

If you were starting OpenVPN manually from the command line, auth-user-pass alone will prompt you to type your username and password every time. When starting OpenVPN automatically as a service that is not possible, so you need to modify the configuration to use a user-pass file.

When running from an .ovpn file, the only LuCI option you can set is to point configuration to that file. Make all configuration settings by editing the .ovpn file. Do not mix UCI / LuCI settings with a .ovpn file.

Thanks, I have it all entered. My VPN (tun0) interface is not enabled. I have tried a few times. I'm new with OpenWRT. I have:

Protocol: Unmanaged
RX: 0 B (0 Pkts.)
TX: 0 B (0 Pkts.)
Error: Network device is not present

I'm using my router as a client only. Can you point me to a link to just get started with a VPN for a newbie? Thanks.

Read the System Log. OpenVPN logs lots of messages to help diagnose a failure to start and connect. The tun0 interface will only exist if connection to the server was completely successful.

Ok. I'll look into this. Thanks.

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