This doc will help to connect your internal(VM) LDAP server to any LDAP browser (jx explorer, Apache Directory). Basically, I have installed an application with LDAP server in my Virtual Machine (vmware). After then, I was trying to connect that internal ldap server to Apache Directory in my Host Computer. Thoug I could access application server through my browser, but could not able to make connection of the ldap server into the Apache Directory. Later I found this solution that is the port of that ldap server was not able to communicate with my host computer even after adding that port into the firewall. Actually we have to create a tunnel of the ssh server to connect that port.
bind dn: cn=admin/directory manager server address: localhost/ip:port server password: password
In my case it is: bind dn: cn=directory manager server address: localhost:1636 password: password
Make sure that both side of the machine (host computer and VM) have installed the openssh-server
.
To install openssh server:
sudo apt install openssh-server
To check the ssh status:
sudo service ssh status
We need to configure ssh config file as below:
sudo nano /etc/ssh/sshd_config
From this file remove #
right before PermitRootLogin
and replace *-password
with yes
right after PermitRootLogin
Then reload the ssh server:
sudo systemctl reload ssh
with sudo su -
login as a root user. then set a root password with below command:
sudo passwd
To create tunnel:
ssh -fNL [port to be used in ldap browser]:ldap server address:ldap server port root@internal ldap server ip address
an example:
ssh -fNL 5909:localhost:1636 [email protected]
It may asked a root password just enter the password you have created using sudo passwd
.
That's all.
Select for a new connection and enter like this accroding to your own ldap server value. Please choose SSL connection if your ldap server has ssl connection.
After then enter the bind dn
value and ldap server password and finish it.
Finally you should see as below if it connect succesfully.
Thanks.