I'm developing website for my school. In that school we authenticate users via LDAP, so there was an idea to do the same via school-site. On that site everything is working perfectly, but during developing I need very often to test if such solution works, of not. In order not to commit my changes so often I want to test this site on my local computer, but for connecting with LDAP i want to use ssh tunnel. In school network we have one server through witch we are connecting with inside of our school network. It's address is phoenix.lo5.bielsko.pl
. Inside this network we have LDAP server with opened 389 and 636 ports. It's address is auth.lo5
. I don't have access to auth.lo5
via SSH, I can only connect with it to get some LDAP entries. So, I've tried to run SSH tunnel by running:
ssh -L 636:auth.lo5:636 [email protected]
Then, I've set in my /etc/hosts
that auth.lo5
is pointing to 127.0.0.1
. I'm connecting to LDAP in PHP in such a way:
ldap_connect('ldaps://auth.lo5', 636);
But I'm getting error Can't contact LDAP server
. I think, that problem might be on phoenix.lo5.bielsko.pl
in its SSH daemon config or in arguments passed to ldap_connect()
function. Can you tell me, what should I set in sshd_config or in arguments passed to ldap_connect
to get it working?
I posted the same question in similar thread, but no one has answered my question.
P.S. In my /etc/ssh/sshd_config
I have line AllowTcpForwarding yes