Hello,
I run a Debian server 6 on which I have already successfully set up OpenLDAP 2.4.23 including phpLDAPadmin. LDAP seems to be working wonderfully so far. An SVN server can easily connect to the OpenLDAP server to authenticate the user. Now I would like to have my OpenVPN to connect to the LDAP DB. I proceeded with the following instructions:
http://www.howtoforge.com/set-up-openvpn-server-with-authentication-against-openldap-on-debian-6.0-squeeze
All the steps I was able to work through problems. But now when I want to build a connection from a client, the server reports:
MULTI: multi_create_instance called
Re-using SSL/TLS context
LZO compression initialized
Control Channel MTU parms [ L:1542 D:138 EF:38 EB:0 ET:0 EL:0 ]
Data Channel MTU parms [ L:1542 D:1450 EF:42 EB:135 ET:0 EL:0 AF:3/1 ]
Local Options hash (VER=V4): '530fdded'
Expected Remote Options hash (VER=V4): '41690919'
TLS: Initial packet from [AF_INET]141.76.185.231:63374, sid=108a515f 74d0ce81
LDAP bind failed immediately: Can't contact LDAP server
Unable to bind as cn=admin,dc=testdomain
LDAP connect failed.
PLUGIN_CALL: POST /usr/lib/openvpn/openvpn-auth-ldap.so/PLUGIN_AUTH_USER_PASS_VERIFY status=1
PLUGIN_CALL: plugin function PLUGIN_AUTH_USER_PASS_VERIFY failed with status 1: /usr/lib/openvpn/openvpn-auth-ldap.so
TLS Auth Error: Auth Username/Password verification failed for peer
Control Channel: TLSv1, cipher TLSv1/SSLv3 DHE-RSA-AES256-SHA
[] Peer Connection Initiated with [AF_INET]141.76.185.231:63374
PUSH: Received control message: 'PUSH_REQUEST'
Delayed exit in 5 seconds
Sat Aug 13 10:41:19 2011 141.76.185.231:63374 SENT CONTROL [UNDEF]: 'AUTH_FAILED' (status=1)
Sat Aug 13 10:41:21 2011 read UDPv4 [ECONNREFUSED]: Connection refused (code=111)
Sat Aug 13 10:41:24 2011 141.76.185.231:63374 SIGTERM[soft,delayed-exit] received, client-instance exiting
According this message may OpenVPN with the data in the auth-ldap.conf ie "cn=admin,dc=testdomain" and produce the specified password is no connection.
Can check them here my /etc/openvpn/auth/auth-ldap.conf
<LDAP>
URL ldap://127.0.0.1
BindDN cn=admin,dc=testdomain
Password {SSHA}<verschiedene zeichen>
Timeout 15
TLSEnable no
FollowReferrals yes
TLSCACertFile /usr/local/etc/ssl/ca.pem
TLSCACertDir /etc/ssl/certs
TLSCertFile /usr/local/etc/ssl/client-cert.pem
TLSKeyFile /usr/local/etc/ssl/client-key.pem
</LDAP>
<Authorization>
BaseDN "ou=people,dc=testdomain"
SearchFilter "(&(uid=%u)(accountStatus=active))"
RequireGroup false
</Authorization>
My SVN server does not require any login credentials to the LDAP server, so I tried the following and changed the auth-ldap.conf:
<LDAP>
URL ldap://127.0.0.1:389
# BindDN cn=admin,dc=testdomain
# Password {SSHA}<verschiedene zeichen>
Timeout 15
TLSEnable no
FollowReferrals yes
TLSCACertFile /usr/local/etc/ssl/ca.pem
TLSCACertDir /etc/ssl/certs
TLSCertFile /usr/local/etc/ssl/client-cert.pem
TLSKeyFile /usr/local/etc/ssl/client-key.pem
</LDAP>
<Authorization>
BaseDN "ou=people,dc=testdomain"
SearchFilter "(&(uid=%u)(accountStatus=active))"
RequireGroup false
</Authorization>
I did not specify a binddn and a password. If I am now back with a user trying to log on. I get the following message from the OpenVPN server:
LDAP search failed: No such object
LDAP user "testuser" was not found.
This user definitely exists, however. Likewise, I can successfully register via SVN. Similarly, the application works on other clients on the network, which rely on the LDAP server.
Do you have an idea where my mistake might be, or where I should look again? If there are any questions just write. Thank you
lakul