Skip to content

Creating LDAP Authentication Rule fails when hostname is used #9116

Description

@Chaos823

PacketFence version
15.1.0

Describe the bug
Using the FQDN of the ldap Server in LDAP or Active Directory Authentication Source results in the Test returning Can't connect to server or bind with '<binduser>' on <ldapserver>:389.

The Logs show the following:

2026-06-19T10:25:21.438229+02:00 srv-pf-v15 pfperl-api-docker-wrapper[648127]: pfperl-api(9) WARN: [mac:[undef]] [ADVerwaltung] <ldapserver> detected as dead, switching to next server (pf::Authentication::Source::LDAPSource::__ANON__)
2026-06-19T10:25:21.438668+02:00 srv-pf-v15 pfperl-api-docker-wrapper[648127]: pfperl-api(9) ERROR: [mac:[undef]] [ADVerwaltung] Unable to connect to any LDAP server, will try while ignoring the dead servers detection (pf::Authentication::Source::LDAPSource::_connect)
2026-06-19T10:25:21.446354+02:00 srv-pf-v15 pfperl-api-docker-wrapper[648127]: pfperl-api(9) ERROR: [mac:[undef]] Resolved <ldapserver> to ip <ipaddress> through pfdns-connector is not part of any pfconnector networks (pf::factory::connector::resolve)
2026-06-19T10:25:21.447986+02:00 srv-pf-v15 pfperl-api-docker-wrapper[648127]: pfperl-api(9) WARN: [mac:[undef]] Use of uninitialized value $dest_ip in concatenation (.) or string at /usr/local/pf/lib/pf/Authentication/Source/LDAPSource.pm line 282.
2026-06-19T10:25:21.452123+02:00 srv-pf-v15 pfperl-api-docker-wrapper[648127]: pfperl-api(9) ERROR: [mac:[undef]] Error binding to <ipaddress>:36431: 'Unexpected EOF' (pf::LDAP::log_error_msg)
2026-06-19T10:25:21.452235+02:00 srv-pf-v15 pfperl-api-docker-wrapper[648127]: pfperl-api(9) WARN: [mac:[undef]] [ADVerwaltung] Unable to connect to <ldapserver> (pf::Authentication::Source::LDAPSource::__ANON__)
2026-06-19T10:25:21.452235+02:00 srv-pf-v15 pfperl-api-docker-wrapper[648127]: pfperl-api(9) ERROR: [mac:[undef]] [ADVerwaltung] Unable to connect to any LDAP server (pf::Authentication::Source::LDAPSource::_connect)
2026-06-19T10:25:21.452797+02:00 srv-pf-v15 pfperl-api-docker-wrapper[648127]: pfperl-api(9) WARN: [mac:[undef]] [ADVerwaltung] Unable to connect to any LDAP server (pf::Authentication::Source::LDAPSource::test)

To Reproduce
Steps to reproduce the behavior:

  1. Go to /admin#/configuration/sources'
  2. Create internal source for LDAP
  3. Use hostname in the host field and configure Bind dn
  4. Click on Test

Expected behavior
The Hostname should be resolved properly or documentation for configuring the pfdns-connector should be added, if needed.

Desktop (please complete the following information):

  • OS: Windows 11
  • Browser Firefox
  • Version [e.g. 22]

Additional context
This still worked with Packetfence 15.0, but that version didn't have the pfdns-connector yet. The LDAP Server is in the same subnet as the management interface.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions