Client retries infinitely after TLS error

Need help configuring your VPN? Just post here and you'll get that help.

Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech

Forum rules
Please use the [oconf] BB tag for openvpn Configurations. See viewtopic.php?f=30&t=21589 for an example.
Post Reply
shamash
OpenVpn Newbie
Posts: 3
Joined: Fri Jul 24, 2020 12:51 pm

Client retries infinitely after TLS error

Post by shamash » Fri Jul 24, 2020 1:13 pm

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?

TinCanTech
OpenVPN Protagonist
Posts: 11139
Joined: Fri Jun 03, 2016 1:17 pm

Re: Client retries infinitely after TLS error

Post by TinCanTech » Fri Jul 24, 2020 2:18 pm

You may be able to do this by using multiple <connection> blocks.

shamash
OpenVpn Newbie
Posts: 3
Joined: Fri Jul 24, 2020 12:51 pm

Re: Client retries infinitely after TLS error

Post by shamash » Fri Jul 24, 2020 2:42 pm

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.

TinCanTech
OpenVPN Protagonist
Posts: 11139
Joined: Fri Jun 03, 2016 1:17 pm

Re: Client retries infinitely after TLS error

Post by TinCanTech » Fri Jul 24, 2020 2:46 pm

May be you are using the wrong options ..

TinCanTech
OpenVPN Protagonist
Posts: 11139
Joined: Fri Jun 03, 2016 1:17 pm

Re: Client retries infinitely after TLS error

Post by TinCanTech » Sat Jul 25, 2020 8:22 pm


shamash
OpenVpn Newbie
Posts: 3
Joined: Fri Jul 24, 2020 12:51 pm

Re: Client retries infinitely after TLS error

Post by shamash » Mon Jul 27, 2020 9:01 am

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

User avatar
GoNzU88
OpenVpn Newbie
Posts: 1
Joined: Mon Jul 27, 2020 9:54 am

Re: Client retries infinitely after TLS error

Post by GoNzU88 » Mon Jul 27, 2020 9:58 am

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.

Post Reply