LDAP referrals not working in ipv6

AD 21 Reputation points
2022-06-27T06:48:04.74+00:00

We are trying to make ldap referrals in ipv6 environment. Everything works well in ipv4 environment. But when we try to chase referral using ldp we get this error

Getting 0 entries:

-----------

***Searching...
ldap_search_s(ld, "dc=DC_NAME", 0, "objectclass=CLASS_NAME", attrList, 0, &msg)
Error: Search: Referral. <10>
Server error: 0000202B: RefErr: DSID-0310074A, data 0, 1 access points
ref 1: '[::1]:22389'

Error 0x202B A referral was returned from the server.
Result <10>: 0000202B: RefErr: DSID-0310074A, data 0, 1 access points
ref 1: '[::1]:22389'

Does referral work in ipv6 env? Is there something which can be done to make it work?

Setup: Our application is installed in Windows server 2016.

Active Directory
Active Directory
A set of directory-based technologies included in Windows Server.
6,248 questions
{count} votes

Accepted answer
  1. Gary Reynolds 9,406 Reputation points
    2022-06-28T08:53:06.077+00:00

    Hi @AD ,

    I'm making the assumption that you are using Microsoft AD LDS (ADAM) for your LDAP environment.

    I've tested using LDP with IPv6 binding and connecting to a local LDAP instance without any issues.

    215619-image.png

    and a ldap_search_s command is successful in returning records:

    215715-image.png

    The same is true if I connect remotely as well

    215657-image.png

    and the search works

    215658-image.png

    I'm assuming you change the BaseDN and Objectclass details in your question but to help remove any typos, use the dropdown option on the search dialog to select the base DN of your LDAP instance, as shown below.

    215716-image.png

    From the testing I've done, yes AD LDS is able to support IPv6 connection and searches without issuing a referral for objects that exist in the context. Normally a referral is issue if the object is not within the context, but the LDAP server knows where it exists and provides the referral to the call client for information. You could try enabling referral as Session Option to the LDS server and see if this resolve the issue.

    Within LDP from the Options menu, select Connection Options, and set the option as shown below, this will cause the server to chase the internal referral and return the results if they are within the same context:

    215684-image.png

    You could also try setting the LDAP_OPT_REFERRALS = 64, which will cause the server to chase external referrals.

    215702-image.png

    If that doesn't work maybe if you can share the RootDSE of the LDAP instance, any CrossRef objects that have been created, and the search details you are searching for.

    Gary.

    1 person found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. Limitless Technology 39,521 Reputation points
    2022-06-28T07:37:42.71+00:00

    Hi there,

    In order to support LDAP over an IPv6 network, transport calls have been modified to support both IPv4 and IPv6 based on the server configuration. It's worth checking your DNS and/or the hosts file(s) in use.

    LDAP API which allows connection through IPv6

    https://social.msdn.microsoft.com/Forums/office/en-US/cabead87-6453-4abb-afc9-89dfeef3ea5f/ldap-api-which-allows-connection-through-ipv6?forum=vcgeneral

    LDAP auth doesn't support IPv6 addresses https:// github.com/metabase/metabase/issues/12879

    --If the reply is helpful, please Upvote and Accept it as an answer--

    1 person found this answer helpful.
    0 comments No comments