Changing the server port for LDAP

This section describes how to change to port for the LDAP protocol.

The task and how to accomplish it

By default the LDAP server listens on port 10389 (unencrypted or StartTLS) and 10636 (SSL). It is quite common to run LDAP on 389, which is the well-known port for this protocol. Of course other options are imaginable as well. Changing the LDAP port is a good example for adjusting the existing Spring configuration as introduced in the last section.

Just pick the "ldapServer"-bean from the server.xml file

  <ldapServer id="ldapServer"
            ...>
    <transports>
      <tcpTransport address="0.0.0.0" port="10389" nbThreads="8" backLog="50" enableSSL="false"/>
      <tcpTransport address="localhost" port="10636" enableSSL="true"/>
    </transports>
    ...
  </ldapServer>

and change the values of port to your needs. You have to restart the server afterwards in order to take this change effect.

Due to traditional Unix security restrictions, ports less than 1024 were "trusted". Thus on a Unix-System, a non-root process must listen on a port greater than 1023.

Resources

  • No labels