wheelybird / openvpn-server-ldap-otp

A dockerised OpenVPN server using LDAP for authentication, with optional 2FA via Google Authenticator
MIT License
171 stars 74 forks source link

TLS false. Help me!! #66

Open N-LamTruong opened 1 year ago

N-LamTruong commented 1 year ago

I don't know where I went wrong

1. Docker-compose.yml version: '3.8' services: openvpn-ldap-otp: image: 'wheelybird/openvpn-ldap-otp:latest' container_name: openvpn-ldap-otp cap_add:

2. FIle config client: client tls-client dev tun persist-key persist-tun remote-cert-tls server key-direction 1 auth SHA512 auth-nocache proto udp reneg-sec 0 redirect-gateway def1 auth-user-pass verb 3

remote openvpn.xxx.com 1194 udp float nobind -----BEGIN CERTIFICATE----- xxx -----END CERTIFICATE----- # # 2048 bit OpenVPN static key # -----BEGIN OpenVPN Static key V1----- xxx -----END OpenVPN Static key V1-----

key-direction 1

3. Logs client: Mon May 29 09:39:07 2023 TLS Error: TLS key negotiation failed to occur within 60 seconds (check your network connectivity) Mon May 29 09:39:07 2023 TLS Error: TLS handshake failed Mon May 29 09:39:07 2023 SIGUSR1[soft,tls-error] received, process restarting Mon May 29 09:39:07 2023 Restart pause, 5 second(s)

wheelybird commented 1 year ago

Hi. Does your LDAP server expect TLS to be enabled?

N-LamTruong commented 1 year ago

Hi. Does your LDAP server expect TLS to be enabled?

No, I just use http image

wheelybird commented 1 year ago

I meant the LDAP server itself (not any kind of web GUI). You've got the LDAP URI set as ldap://xxx.xxx.xxx.xxx; it's possible that the server doesn't accept non-encrypted connections. You might need to enable TLS or connect with ldaps.