I am trying to find a way to locally access an OID server (via LDAP) that is usually only accessible from my app's staging server. I have login credentials for the staging box. I do not have login credentials on the machine that is running the OID server. If I did I would simply use an ssh tunnel. What I think I want to do is forward my local outgoing LDAP request through the staging server to the OID server. How can this be done? Am I thinking about this correctly?
If you have an SSH server running on your staging box and your LDAP server is reachable via unencrypted LDAP on the standard port, you could try the following:
which will connect port 10389 on your local machine (127.0.0.1) with port 389 on your LDAP server.
yourldapserver is the hostname or IP of your LDAP server as seen by the staging machine, yourstagingserver is the hostname or IP of your staging server as seen by your local machine and username is your login name on that box.