OpenVPN client does not connect

I have setup a openvpn server on a raspberry pi . I have made several config files for different users. When I try and use these config files on android (openvpn app by Arne Schwabe) the connection is made well.
On a windows laptop and OpenVPN client (by OpenVPN) the connection is made well.
I did change the udp port to 1195 on my openvpn server
On my GL.iNet GL-AR300m travel router (firmware 2.261) however i cannot make the connection to the server with the .ovpn file provided.
I’ll get this error:
OpenVPN 2.4.3 mips-openwrt-linux-gnu [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [MH/PKTINFO] [AEAD] library versions: OpenSSL 1.0.2g 1 Mar 2016, LZO 2.08 neither stdin nor stderr are a tty device and you have neither a controlling tty nor systemd - can’t ask for ‘Enter Private Key Password:’. If you used --daemon, you need to use --askpass to make passphrase-protected keys work, and you can not use --auth-nocache. Exiting due to fatal error
any thoughts?

Below is my .ovpn file where I replaced ipadress and key with XXX

client
dev tun
proto udp
remote X.X.X.X 1195
resolv-retry infinite
nobind
persist-key
persist-tun
key-direction 1
remote-cert-tls server
tls-version-min 1.2
verify-x509-name server name
cipher AES-256-CBC
auth SHA256
comp-lzo
verb 1

-----BEGIN CERTIFICATE-----
XXX
-----END CERTIFICATE-----

-----BEGIN CERTIFICATE-----
XXXX-----END CERTIFICATE-----

-----BEGIN ENCRYPTED PRIVATE KEY-----
XXX
-----END ENCRYPTED PRIVATE KEY-----

2048 bit OpenVPN static key

-----BEGIN OpenVPN Static key V1-----
XXXX
-----END OpenVPN Static key V1-----

Be sure to have newest firmware v2.261 and add “askpass” as a separate line.

1 Like

Still the same error. I edit it like this :

clientdev
askpass
tunproto
udpremote X.X.X.X 1195
resolv-retry infinitenobindpersist-keypersist-tunkey-direction 1
remote-cert-tls
servertls-version-min 1.2
verify-x509-name server namecipher AES-256-CBC
auth SHA256
comp-lzo
verb 1

—–BEGIN CERTIFICATE—–
XXX
—–END CERTIFICATE—–

—–BEGIN CERTIFICATE—–
XXXX—–END CERTIFICATE—–

—–BEGIN ENCRYPTED PRIVATE KEY—–
XXX
—–END ENCRYPTED PRIVATE KEY—–

2048 bit OpenVPN static key

—–BEGIN OpenVPN Static key V1—–
XXXX
—–END OpenVPN Static key V1—–

Does the UI ask for a “private key passphase” when you upload?

Can you send me your ovpn privately so that I can connect to your server and test?

I just send it by email.

It does not ask for a password by the way

How do you fix this?

This thread is two years ago. The info should be outdated.

What is the problem you have now?

I’m running version 3.009. When I try to connect it just says _

OpenVPN 2.4.5 mips-openwrt-linux-gnu [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [MH/PKTINFO] [AEAD]

library versions: OpenSSL 1.0.2o 27 Mar 2018, LZO 2.10

NOTE: the current --script-security setting may allow this configuration to call user-defined scripts

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

Exiting due to fatal error

Using solution of askpass worked for me in getting my ovpn file to work for connecting back to a pivpn server. I just added a line to my config, uploaded it and it worked.