Search code examples
javaldapunboundid-ldap-sdk

Allow remote login to LDAP server



I installed LDAP server on my virtual machine(centOS) running on windows, now I want to access it from windows

So how do I enable remote access to LDAP server.

I tried installing 389 Directory Server (which is actually meant for fedora), on some forum I heard its a easy GUI to do the command line jobs easily, but I did not find the option to enable the remote login or any ip filters.

Note:

  • I am trying to use Java to login the LDAP server for authentication and authorization, for that I am using unboundid api
  • You can suggest which api should I use, I am just a beginner.

Update:
my java code

 LDAPConnection ldap = new LDAPConnection("http://xxx.xx.xx.xxx", 9830);

error

an error occurred while attempting to connect to server http://xxx.xx.xx.xxx:9830:  java.io.IOException: An error occurred while attempting to establish a connection to server http://xxx.xx.xx.xxx:9830:  java.net.UnknownHostException: http://xxx.xx.xx.xxx')

I also tried ldap://xxx.xx.xx.xxx instead of http://xxx.xx.xx.xxx


Solution

  • Don't specify the server address as a URL. Just specify the address as either an IP address or resolvable name. So instead of "http://xxx.xx.xx.xxx" just use "xxx.xx.xx.xxx".