I am currently trying to configure an OpenVPN server on my Raspberry Pi 3B+. I opened port 1194 via IPTables :
iptables -A INPUT -i $local -m state --state NEW,ESTABLISHED,RELATED -p udp --dport 1194 -j ACCEPT
iptables -A OUTPUT -i $local -m state --state ESTABLISHED,RELATED -p udp --sport 1194 -j ACCEPT
and I redirected that same port to the box from my house to the rasp. Unfortunately, the error you see in the title of this post happens every time and I don't understand the reason. I've already searched on a lot of posts but nothing worked. Here are my complete logs during a connection attempt:
Sat Jun 01 18:26:15 2019 OpenVPN 2.4.7 x86_64-w64-mingw32 [SSL (OpenSSL)] [LZO] [LZ4] [PKCS11] [AEAD] built on Feb 21 2019
Sat Jun 01 18:26:15 2019 Windows version 6.2 (Windows 8 or greater) 64bit
Sat Jun 01 18:26:15 2019 library versions: OpenSSL 1.1.0j 20 Nov 2018, LZO 2.10
Sat Jun 01 18:26:15 2019 MANAGEMENT: TCP Socket listening on [AF_INET]127.0.0.1:25341
Sat Jun 01 18:26:15 2019 Need hold release from management interface, waiting...
Sat Jun 01 18:26:15 2019 MANAGEMENT: Client connected from [AF_INET]127.0.0.1:25341
Sat Jun 01 18:26:15 2019 MANAGEMENT: CMD 'state on'
Sat Jun 01 18:26:15 2019 MANAGEMENT: CMD 'log all on'
Sat Jun 01 18:26:15 2019 MANAGEMENT: CMD 'echo all on'
Sat Jun 01 18:26:15 2019 MANAGEMENT: CMD 'bytecount 5'
Sat Jun 01 18:26:15 2019 MANAGEMENT: CMD 'hold off'
Sat Jun 01 18:26:15 2019 MANAGEMENT: CMD 'hold release'
Sat Jun 01 18:26:19 2019 MANAGEMENT: CMD 'password [...]'
Sat Jun 01 18:26:19 2019 Outgoing Control Channel Encryption: Cipher 'AES-256-CTR' initialized with 256 bit key
Sat Jun 01 18:26:19 2019 Outgoing Control Channel Encryption: Using 256 bit message hash 'SHA256' for HMAC authentication
Sat Jun 01 18:26:19 2019 Incoming Control Channel Encryption: Cipher 'AES-256-CTR' initialized with 256 bit key
Sat Jun 01 18:26:19 2019 Incoming Control Channel Encryption: Using 256 bit message hash 'SHA256' for HMAC authentication
Sat Jun 01 18:26:19 2019 MANAGEMENT: >STATE:1559406379,RESOLVE,,,,,,
Sat Jun 01 18:26:19 2019 TCP/UDP: Preserving recently used remote address: [AF_INET]x.x.x.x:1194
Sat Jun 01 18:26:19 2019 Socket Buffers: R=[65536->65536] S=[65536->65536]
Sat Jun 01 18:26:19 2019 UDP link local: (not bound)
Sat Jun 01 18:26:19 2019 UDP link remote: [AF_INET]x.x.x.x:1194
Sat Jun 01 18:26:19 2019 MANAGEMENT: >STATE:1559406379,WAIT,,,,,,
Sat Jun 01 18:27:19 2019 TLS Error: TLS key negotiation failed to occur within 60 seconds (check your network connectivity)
Sat Jun 01 18:27:19 2019 TLS Error: TLS handshake failed
Sat Jun 01 18:27:19 2019 SIGUSR1[soft,tls-error] received, process restarting
Sat Jun 01 18:27:19 2019 MANAGEMENT: >STATE:1559406439,RECONNECTING,tls-error,,,,,
Sat Jun 01 18:27:19 2019 Restart pause, 5 second(s)
I should point out that I tried to change the default iptables policy from Drop to ACCEPT to verify that it was not a firewall problem but the same error still appears. If you have any ideas, I'll take them.
Thank you in advance.