I have openvpn installed on ubuntu 19.04 and I am using the plugin "openvpn-auth-ldap.so" for authentication, I can authenticate users from an Organization Unit in my active directory in windows server 2012 but by trying to further restrict access only one group is not possible. The configuration used in the archvo: "auth-ldap.conf" is as follows:
<Authorization>
BaseDN "OU=<MyOUWhereisMyGroupWithVPNUsers>,DC=<mydomain>,DC=<local>"
SearchFilter "(CN=%u)"
RequireGroup true
<Group>
BaseDN "OU=<MyOUWhereisMyGroupWithVPNUsers>,DC=<mydomain>,DC=<local>"
SearchFilter "(&(objectClass=top;group)(memberOf=CN=<NameofMyGroupVPNUsers> ,OU=<MyOUWhereisMyGroupWithVPNUsers>,DC=mydomain,DC=local))"
MemberAttribute uniqueMember
</Group>
</Authorization>
Any idea how this configuration should go. I just want a group defined in my Active directory to have access to my OpenVPN server and not an entire OU.
I think you misunderstood how the ldap configuration works.
The first section allows you to search for the users, the second allows you to further filter on the users based on the group membership.
So you should be able to do what you want with either of these two configurations :
or
If the second doesn't work, try like this :