Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TLS false. Help me!! #66

Open
N-LamTruong opened this issue May 29, 2023 · 3 comments
Open

TLS false. Help me!! #66

N-LamTruong opened this issue May 29, 2023 · 3 comments

Comments

@N-LamTruong
Copy link

N-LamTruong commented May 29, 2023

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:
- NET_ADMIN
volumes:
- '.config:/config'
- '/etc/openvpn:/etc/openvpn'
- '/lib/modules:/lib/modules'
environment:
- 'USE_CLIENT_CERTIFICATE=false'
- 'LDAP_ENCRYPT_CONNECTION=off'
- 'LDAP_TLS_VALIDATE_CERT=false'
- 'OVPN_SERVER_CN=openvpn.xxx.com'
- 'LDAP_URI=ldap://xxx.xxx.xxx.xxx'
- 'LDAP_BASE_DN=dc=xxx,dc=com'
- 'LDAP_BIND_USER_DN=admin'
- 'LDAP_BIND_USER_PASS=xxx'
- 'OVPN_PROTOCOL=udp'
- 'OVPN_NAT=true'
- 'OVPN_NETWORK=172.31.32.0 255.255.240.0'
- 'OVPN_INTERFACE_NAME=tun'
- 'OVPN_DNS_SERVERS=8.8.8.8,8.8.4.4'
ports:
- '1194:1194/udp'

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
Copy link
Owner

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

@N-LamTruong
Copy link
Author

N-LamTruong commented May 30, 2023

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

No, I just use http
image

@wheelybird
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants