Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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
add comment

1 Answer

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 (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.

share|improve this answer
add comment

Your Answer

 
discard

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.