You can modify the LDAP port or the LDAPS secure port number of your user directory server by using DSCC or by using the dsconf set-server-prop command.
If you change a port number, be aware of the following:
If you set a non-privileged port number and Directory Server is installed on a machine to which other users have access, you might expose the port to a hijack risk by another application. In other words, another application can bind to the same address/port pair. This rogue application might then be able to process requests intended for Directory Server. That is, the rogue application could be used to capture passwords used in the authentication process, to alter client requests or server responses, or to produce a denial of service attack. To avoid this security risk, use the listen-address or secure-listen-address properties to specify the interface (address) on which Directory Server listens.
If you change the port number by using the command line, be aware of the following:
If the Directory Server is referenced in replication agreements that are defined on other servers, the replication agreements must be updated to use the new port number.
If you have used DSCC previously to manage the server, the server will be temporarily unable to be viewed after the change in port number. To view the server again, you must unregister the server and then register it again in DSCC using the new port number.
You can use DSCC to perform this task. For information, see Directory Service Control Center Interface and the DSCC online help.
Once you make your modifications, you must restart the server for the changes to take effect.
Verify the existing settings for your port.
$ dsconf get-server-prop -h host -p port port-type |
Where port-type is one of the following:
LDAP default port
LDAPS secure port
DSML default port
DSML secure port
For example, to display the LDAPS secure port, type:
$ dsconf get-server-prop -h host1 -p 2501 ldap-secure-port Enter "cn=Directory Manager" password: ldap-secure-port : 2511 |
If the returned result is an integer, the port is enabled. If the returned result is disabled, the port is disabled.
You can also list the LDAP default port and LDAPS secure port using the dsadm
If required, modify a port number or enable a port.
$ dsconf set-server-prop -h host -p port port-type:new-port |
For example, to change the LDAP port number from 1389 to 1390, use this command:
$ dsconf set-server-prop -h host1 -p 1389 ldap-port:1390 |
To enable the DSML secure port on port number 2250, use this command:
$ dsconf set-server-prop -h host1 -p 1389 dsml-secure-port:2250 |
If required, disable a port.
$ dsconf set-server-prop -h host -p port port-type:disabled |
For example, to disable the DSML secure port, use the command:
$ dsconf set-server-prop -h host1 -p 1389 dsml-secure-port:disabled |