[Solved] TLS error: Auth Username/Password was not provided by peer

Official client software for OpenVPN Access Server and OpenVPN Cloud.
Locked
Proxin
OpenVpn Newbie
Posts: 4
Joined: Thu May 10, 2012 4:14 pm

[Solved] TLS error: Auth Username/Password was not provided by peer

Post by Proxin » Wed Jan 18, 2017 10:13 pm

Hi,
I've configured OpenVPN on my Asus router to act as a server. I'm trying to connect from my Android phone, but I keep getting the following errors on the server's log:

Code: Select all

TLS Error: Auth Username/Password was not provided by peer
TLS Error: TLS handshake failed
SIGUSR1[soft,tls-error] received, client-instance restarting
My server's config is as follows:

Code: Select all

daemon
server 10.8.0.0 255.255.255.0
proto udp
port 1194
dev tun21
cipher AES-256-CBC
comp-lzo yes
keepalive 15 60
verb 3
push "route 192.168.1.0 255.255.255.0 vpn_gateway 500"
duplicate-cn
push "dhcp-option DNS 192.168.1.250"
push "redirect-gateway def1"
tls-auth static.key 0
plugin /usr/lib/openvpn-plugin-auth-pam.so openvpn
ca ca.crt
dh dh.pem
cert server.crt
key server.key
status-version 2
status status 10
And client config:

Code: Select all

client
dev tun
proto udp
remote [host here] 1194
float
cipher AES-256-CBC
comp-lzo yes
keepalive 15 60
auth-user-pass
ns-cert-type server
<ca>
-----BEGIN CERTIFICATE-----
ca cert contents
-----END CERTIFICATE-----
</ca>
<cert>
client cert contents
</cert>
<key>
client key contents
</key>
<tls-auth>
-----BEGIN OpenVPN Static key V1-----
ta key contents
-----END OpenVPN Static key V1-----
</tls-auth>
key-direction 1
resolv-retry infinite
nobind
The version of OpenVPN on this router is 2.3.2, with OpenSSL version 1.0.2j.
This router seems to require username/password authentication in its OpenVPN configuration, even though I have it set to optional username/password. Regardless, it gives errors that the peer did not provide the username/password even when OpenVPN Connect shows I've entered them correctly.

Is something in my config wrong? Could someone point me in the right direction?

TinCanTech
OpenVPN Protagonist
Posts: 11139
Joined: Fri Jun 03, 2016 1:17 pm

Re: TLS error: Auth Username/Password was not provided by peer

Post by TinCanTech » Thu Jan 19, 2017 11:44 am

Proxin wrote:This router seems to require username/password authentication in its OpenVPN configuration, even though I have it set to optional username/password.
First, you have not set optional user/pass in your server config.
  • See --auth-user-pass-optional in The Manual v23x
    Perhaps you can add that manually.
Second, if you do not want to use user/pass then comment out the plugin from your config:
  • Code: Select all

    ### plugin /usr/lib/openvpn-plugin-auth-pam.so openvpn
As for why it is not working .. you need to check your router manual.

Proxin
OpenVpn Newbie
Posts: 4
Joined: Thu May 10, 2012 4:14 pm

Re: TLS error: Auth Username/Password was not provided by peer

Post by Proxin » Thu Jan 19, 2017 6:00 pm

TinCanTech wrote:
Proxin wrote:This router seems to require username/password authentication in its OpenVPN configuration, even though I have it set to optional username/password.
First, you have not set optional user/pass in your server config.
  • See --auth-user-pass-optional in The Manual v23x
    Perhaps you can add that manually.
Second, if you do not want to use user/pass then comment out the plugin from your config:
  • Code: Select all

    ### plugin /usr/lib/openvpn-plugin-auth-pam.so openvpn
As for why it is not working .. you need to check your router manual.
The auth-user-pass-optional setting fixed it, I was able to successfully connect and log in -- shame on me to have missed that in the server config. Thank you!

Locked