내 OpenLDAP 서버에 로컬로 연결할 수 있지만 외부에서는 연결할 수 없습니다.

내 OpenLDAP 서버에 로컬로 연결할 수 있지만 외부에서는 연결할 수 없습니다.

OpenLDAP 서버에 문제가 있습니다. 클라이언트에서 외부적으로 연결할 수 없으며 로컬에서만 작동합니다. 내 OpenLDAP 서버는 Rasbian을 OS로 사용하는 Raspberry Pi에서 실행되고 있습니다.

클라이언트에서 이 ldapsearch를 실행하면 다음과 같습니다.

$ ldapsearch -h ldap://ldap.fast.com -p 389 -D "dc=fast,dc=com" -x -W

나는 얻다:ldap_sasl_bind(SIMPLE): Can't contact LDAP server (-1)

하지만 라즈베리에서 로컬로 수행하면 모든 것이 잘 작동합니다.

iptables가 구성되어 있지 않습니다.

Chain INPUT (policy ACCEPT) 
target     prot opt source               destination

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination

Chain L (0 references)
target     prot opt source               destination

Chain fail2ban-ssh (0 references)
target     prot opt source               destination

이것은 내 /etc/ldap/ldap.conf파일입니다:

# LDAP Defaults


# See ldap.conf(5) for details
# This file should be world readable but not world writable.

BASE     dc=fast,dc=com
URI ldap://ldap.fast.com ldap://ldap.fast.com:666

#SIZELIMIT  12
#TIMELIMIT  15
#DEREF      never

# TLS certificates (needed for GnuTLS)
TLS_CACERT  /etc/ssl/certs/ca-certificates.crt

TLSCipherSuite HIGH:MEDIUM:+TLSv1:!SSLv2:+SSLv3
TLSCACertificateFile /etc/ssl/certs/ldap-cert.pem
TLSCertificateFile /etc/ssl/certs/ldap-cert.pem
TLSCertificateKeyFile /etc/ldap/ldap-ssl.pem
TLSVerifyClient demand

내 FQDN은 다음과 같습니다.ldap.fast.com

내 도메인은 다음과 같습니다:fast.com

서버는 다음 출력에서 ​​두 포트(389 및 636)를 모두 나열하고 있습니다 ss -tuln | grep -E '389|636'.

tcp    LISTEN     0      128                    *:636                   *:*

tcp    LISTEN     0      128                    *:389                   *:*

포트 389 및 636에 텔넷을 연결하면 다음이 제공됩니다.

Trying 192.168.1.5...
Connected to ldap.fast.com.
Escape character is '^]'.

어떤 도움이라도 주시면 감사하겠습니다. 감사합니다.

답변1

"-h"는 호스트 이름에 사용되고 "-H"는 URI에 사용됩니다. 다음과 같이 쿼리를 수행해 보세요.

ldapsearch -H ldap://ldap.fast.com:389 -D "dc=fast,dc=com" -x -W

("-p"는 "-H"와 함께 사용되지 않으며 대신 필요한 경우 URI에 포트를 포함합니다)

관련 정보