Page 1 of 1

Client retries infinitely after TLS error

Posted: Fri Jul 24, 2020 1:13 pm
by shamash
I have two UDP OpenVPN servers and it is added in the client configuration file as connection tags.
When the server configurations are modified by other users both the server gives "TLS handshake failed" error and retries infinitely. For us the error is not an issue, because it is expected. Is there a way to exit the process when the second server is also give TLS error?

Basically the configuration should be able to work as follows.
1. Try first server.
2. If tls error, try second server
3. If tls error, exit.

Is there a way to achieve this?

Re: Client retries infinitely after TLS error

Posted: Fri Jul 24, 2020 2:18 pm
by TinCanTech
You may be able to do this by using multiple <connection> blocks.

Re: Client retries infinitely after TLS error

Posted: Fri Jul 24, 2020 2:42 pm
by shamash
Thanks for the reply.

I am already using it. Sorry, may be its not clear for you. The process is keep on looping through these 2 connections. It is not at all exiting.
I need the process to exit immediately after completing the TLS retry for the second connection.

Re: Client retries infinitely after TLS error

Posted: Fri Jul 24, 2020 2:46 pm
by TinCanTech
May be you are using the wrong options ..

Re: Client retries infinitely after TLS error

Posted: Sat Jul 25, 2020 8:22 pm
by TinCanTech

Re: Client retries infinitely after TLS error

Posted: Mon Jul 27, 2020 9:01 am
by shamash
Tried using the "connect-retry-max" option also but didn't work.
Please have a look at my configuration.

Code: Select all

client
dev tap
resolv-retry infinite
nobind
persist-key
comp-lzo
verb 6
reneg-sec 0
<connection>
remote 11.11.11.11 1194
proto udp
</connection>
<connection>
remote 11.11.11.11 1195
proto udp
</connection>
<ca>
-----BEGIN CERTIFICATE-----
---------------------------
-----END CERTIFICATE-----

</ca>

dev-node "DevAdapter"
auth-user-pass
connect-retry-max 1

Re: Client retries infinitely after TLS error

Posted: Mon Jul 27, 2020 9:58 am
by GoNzU88
TinCanTech wrote:
Sat Jul 25, 2020 8:22 pm
https://community.openvpn.net/openvpn/t ... #comment:1

* Resolved *
Good info, I'm going to take a look at it.