Last active
March 14, 2022 21:29
-
-
Save kevin39/3db2cb05e79fb752c80d to your computer and use it in GitHub Desktop.
HAProxy ldap-check compatible with Windows Server / Active Directory
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Note : Found somewhere on internet... Source lost | |
backend ldap_balancer | |
mode tcp | |
balance roundrobin | |
server SERVER_NAME SERVER_ADDR:389 maxconn 100 check | |
option tcpka | |
timeout server 2s | |
timeout connect 1s | |
# Below, ldap check procedure : | |
option tcp-check | |
tcp-check connect port 389 | |
tcp-check send-binary 300c0201 # LDAP bind request "<ROOT>" simple | |
tcp-check send-binary 01 # message ID | |
tcp-check send-binary 6007 # protocol Op | |
tcp-check send-binary 0201 # bind request | |
tcp-check send-binary 03 # LDAP v3 | |
tcp-check send-binary 04008000 # name, simple authentication | |
tcp-check expect binary 0a0100 # bind response + result code: success | |
tcp-check send-binary 30050201034200 # unbind request |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment