0

In organization we have setup ldap using openldap, i access it with GUI phpldapadmin.

we have one requirement to allow access some user from specific IPAddress.

I searched but still not able to get the exact solution.

example.ldif

dn: cn=xyz,ou=Person,dc=example,dc=com

cn: xyz

gidnumber: 570

homedirectory: /home/users/xyz

iphostnumber: 10.10.0.0

loginshell: /sbin/nologin

mail: [email protected]

objectclass: inetOrgPerson

objectclass: posixAccount

objectclass: top

objectclass: ipHost

postaladdress: 123xyz

sn: XYZ

uid: xyz

uidnumber: 1012

so we want xyz user should able to access openldap from iphostnumber: 10.10.0.0

1 Answer 1

2

You can do this by creating appropriate ACLs in your directory. Take a look at this forum thread in which the OP wants to have an IP address-based (and also filter based) access control to the directory. There are examples for IP-based ACLs which might help you. Perhaps, something like this:

access to *
       by peername.ip=10.10.0.0 read
       by * none

Of course, don't forget to read the OpenLDAP slapd.access manual.

1
  • Thanks...after reading slapd.access manual it is more clear how to do restriction on openldap. Commented May 24, 2018 at 9:18

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .