# OpenVPN with client certificate verification + LDAP authentication

**URL:** <https://community.ipfire.org/t/openvpn-with-client-certificate-verification-ldap-authentication/11906>\
**Category:** OpenVPN\
**Created:** [26 July 2024 14:56 UTC](https://community.ipfire.org/t/openvpn-with-client-certificate-verification-ldap-authentication/11906 "2024-07-26T14:56:12Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![nodeejay](https://community.ipfire.org/user_avatar/community.ipfire.org/nodeejay/32/12964_2.png) [@nodeejay](https://community.ipfire.org/u/nodeejay)\
**Post date:** [26 July 2024 14:56 UTC](https://community.ipfire.org/t/openvpn-with-client-certificate-verification-ldap-authentication/11906/1 "2024-07-26T14:56:12Z")

</div>

Hello!

I tried to get OpenVPN to authenticate against AD following the manual here: [OpenVPN auth-user-pass to Active Directory](https://community.ipfire.org/t/openvpn-auth-user-pass-to-active-directory/9172)

When configured as documented the first error you run into is  
`Options error: --auth-user-pass-verify script fails with '/var/ipfire/`ovpnldapauth.sh`': No such file or directory (errno=2)`

This seems to be correctable by changing:  
`auth-user-pass-verify /var/ipfire/`ovpnldapauth`.sh via-env`  
to  
`auth-user-pass-verify /var/ipfire/ovpnldapauth.sh via-env`

resulting in:  
`openvpnserver[4686]: auth_user_pass_verify_script = '/var/ipfire/ovpnldapauth.sh'`

Next hurdle is the OVPN Authentication script missing the closing round brackets in the RES call. The script itself also needs some small optimizations, the search user and password should be surrounded by quotation marks to allow spaces in DN and password, otherwise you run into “Too many arguments”.

Also, the user of the script must be nobody, otherwise OpenVPN seems to be unable to call the script, which leads to using -W and moving the password for the binding user over to another file.

I edited the Wiki with my findings, does anyone of you mind to check it if things are correct?

Thanks,  
Alex

---

<div class="post-metadata">

**Author:** ![emptythevoid](https://community.ipfire.org/user_avatar/community.ipfire.org/emptythevoid/32/15379_2.png) [@emptythevoid](https://community.ipfire.org/u/emptythevoid)\
**Post date:** [24 August 2024 02:59 UTC](https://community.ipfire.org/t/openvpn-with-client-certificate-verification-ldap-authentication/11906/2 "2024-08-24T02:59:52Z")

</div>

It’s been a very long while since I was even thinking about this. I don’t currently have the set up to test, but the wiki page you made _looks_ amazing. I’m sorry that my script caused difficulties for you. It’s been so long, I can’t even begin to justify why I did anything.

---

<div class="post-metadata">

**Author:** ![nodeejay](https://community.ipfire.org/user_avatar/community.ipfire.org/nodeejay/32/12964_2.png) [@nodeejay](https://community.ipfire.org/u/nodeejay)\
**Post date:** [24 August 2024 08:52 UTC](https://community.ipfire.org/t/openvpn-with-client-certificate-verification-ldap-authentication/11906/3 "2024-08-24T08:52:32Z")

</div>

without you Greg, I would not be able to get it running in first instance. I really appreciated your pioneering here. I will replicate the installation to other systems and maybe fiddle with the password file to get this also incorporated and documented. I am at the moment struggling with VTI and routing w/o NAT, let’s see, maybe I will update another manual soon 🙂

Cheers,  
Alex

---

<div class="post-metadata">

**Author:** ![christg74](https://community.ipfire.org/user_avatar/community.ipfire.org/christg74/32/14118_2.png) [@christg74](https://community.ipfire.org/u/christg74)\
**Post date:** [19 November 2025 08:00 UTC](https://community.ipfire.org/t/openvpn-with-client-certificate-verification-ldap-authentication/11906/4 "2025-11-19T08:00:21Z")

</div>

Where is that wiki page gone? I always get “Page not found” for every page linked here.

---

<div class="post-metadata">

**Author:** ![nodeejay](https://community.ipfire.org/user_avatar/community.ipfire.org/nodeejay/32/12964_2.png) [@nodeejay](https://community.ipfire.org/u/nodeejay)\
**Post date:** [20 November 2025 08:23 UTC](https://community.ipfire.org/t/openvpn-with-client-certificate-verification-ldap-authentication/11906/5 "2025-11-20T08:23:44Z")

</div>

You are right. It’s missing.

I do not recall having a copy, and it seems the webarchive is down at the moment. I have the solution in use and can bring it back together, but I also would appreciate when the page returns.

---

<div class="post-metadata">

**Author:** ![tphz](https://community.ipfire.org/user_avatar/community.ipfire.org/tphz/32/16551_2.png) [@tphz](https://community.ipfire.org/u/tphz)\
**Post date:** [20 November 2025 09:06 UTC](https://community.ipfire.org/t/openvpn-with-client-certificate-verification-ldap-authentication/11906/6 "2025-11-20T09:06:37Z")

</div>

I saw this page saved on [web.archive.org](http://web.archive.org)

but today “Internet Archive services are temporarily offline.”

Regards

---

<div class="post-metadata">

**Author:** ![nodeejay](https://community.ipfire.org/user_avatar/community.ipfire.org/nodeejay/32/12964_2.png) [@nodeejay](https://community.ipfire.org/u/nodeejay)\
**Post date:** [20 November 2025 09:18 UTC](https://community.ipfire.org/t/openvpn-with-client-certificate-verification-ldap-authentication/11906/7 "2025-11-20T09:18:45Z")

</div>

can we get it back from the documents, or backup? Will the information be replaced by something newer? Will we get a page to configure AD lookup? Other than that it does not make sense to remove it.

---

<div class="post-metadata">

**Author:** ![tphz](https://community.ipfire.org/user_avatar/community.ipfire.org/tphz/32/16551_2.png) [@tphz](https://community.ipfire.org/u/tphz)\
**Post date:** [20 November 2025 22:25 UTC](https://community.ipfire.org/t/openvpn-with-client-certificate-verification-ldap-authentication/11906/8 "2025-11-20T22:25:14Z")

</div>

I hope I managed to print the entire page to a PDF file.

[www.ipfire.org-OpenVPN-LDAP-Auth-copy.pdf](https://community.ipfire.org/uploads/short-url/xz9008vgm9oArpZgpDen2F4adhl.pdf) (75,3 KB)

Regards
