Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question

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:

ssh -L 10389:yourldapserver:389 username@yourstagingserver 

which will connect port 10389 on your local machine ( 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.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.