Este conteúdo não está disponível no idioma selecionado.

1.9. Changing the LDAP and LDAPS Port Numbers


By default, Directory Server uses port 389 for the LDAP and, if enabled, port 636 for the LDAPS protocol. You can change these port numbers, for example, to run multiple Directory Server instances on one host.

Important

The new ports you assign to the protocols for an instance must not be in use by any other service.

1.9.1. Changing the Port Numbers Using the Command Line

To change the port numbers using the command line, update the following parameters:
  • nsslapd-port: Stores the port number the instance uses for the LDAP protocol.
  • nsslapd-secureport: Stores the port number the instance uses for the LDAPS protocol.
To change the port numbers of the LDAP and LDAPS protocol using the command line:
  1. Optionally, display the currently configured port numbers for the instance:
    # dsconf -D "cn=Directory Manager" ldap://server.example.com config get nsslapd-port nsslapd-secureport
    nsslapd-port: 389
    nsslapd-secureport: 636
    Copy to Clipboard Toggle word wrap
  2. To change the LDAP port:
    1. Set the port for the LDAP protocol. For example, to set it to 1389:
      # dsconf -D "cn=Directory Manager" ldap://server.example.com config replace nsslapd-port=1389
      Successfully replaced "nsslapd-port"
      Copy to Clipboard Toggle word wrap
    2. Set the ldap_port_t type for the LDAP port you assigned in the previous step:
      # semanage port -a -t ldap_port_t -p tcp 1389
      Copy to Clipboard Toggle word wrap
  3. To change the LDAPS port:
    1. Set the port for the LDAPS protocol. For example, to set it to 1636:
      # dsconf -D "cn=Directory Manager" ldap://server.example.com config replace nsslapd-secureport=1636
      Successfully replaced "nsslapd-secureport"
      Copy to Clipboard Toggle word wrap
    2. Set the ldap_port_t type for the LDAPS port you assigned in the previous step:
      # semanage port -a -t ldap_port_t -p tcp 1636
      Copy to Clipboard Toggle word wrap
  4. Restart the instance:
    # dsctl instance_name restart
    Copy to Clipboard Toggle word wrap

1.9.2. Changing the Port Numbers Using the Web Console

To change the port numbers of the LDAP and LDAPS protocol using the web console:
  1. Open the Directory Server user interface in the web console. See Section 1.4, “Logging Into Directory Server Using the Web Console”.
  2. Select the instance.
  3. To change the LDAP port:
    1. Open the Server Settings menu.
    2. On the Server Settings tab, fill the new port number into the LDAP Port field.
    3. Click Save.
  4. To change the LDAPS port:
    1. Open the Server Settings menu.
    2. On the General Settings tab, fill the new port number into the LDAPS Port field.
    3. Click Save.
Voltar ao topo
Red Hat logoGithubredditYoutubeTwitter

Aprender

Experimente, compre e venda

Comunidades

Sobre a documentação da Red Hat

Ajudamos os usuários da Red Hat a inovar e atingir seus objetivos com nossos produtos e serviços com conteúdo em que podem confiar. Explore nossas atualizações recentes.

Tornando o open source mais inclusivo

A Red Hat está comprometida em substituir a linguagem problemática em nosso código, documentação e propriedades da web. Para mais detalhes veja o Blog da Red Hat.

Sobre a Red Hat

Fornecemos soluções robustas que facilitam o trabalho das empresas em plataformas e ambientes, desde o data center principal até a borda da rede.

Theme

© 2025 Red Hat