Thanks Emily, those are great ideas!
Now I need to be able to throw custom error codes, if that is possible.
Best Regards
2011/5/26 Emily Backes ebackes@symas.com
I need to simulate 3 OpenLdaps instances. I was thinking about using a
proxy that could listen to 3 different ports and route all the packets to the the standard 389 in which OpenLdap is listening. The proxy should be capable of open/close these ports dinamically and also throw custom error codes.
I would like someone to point me in the right direction to start working.
Why not just look at the -h option to slapd; this lets you listen on multiple LDAP URIs, each potentially on different interfaces or ports. For example:
slapd -h 'ldap://localhost:389/ ldap://0.0.0.0:1389/ ldap://10.1.2.3:2389/ '
If you need different ports to behave with different logical trees, consider just running three slapd processes, each with their own pidfile, database dirs, config files, etc. Worst case you can probably use back-ldap, which is already the most featureful LDAP proxy available.
For custom error codes, see man slapo-retcode for information on retcode overlay.
Emily Backes Symas - The LDAP Guys ebackes@symas.com