Connection Failed

This forum is for general conversation and user-user networking.

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

Post Reply
nothesslero
OpenVpn Newbie
Posts: 2
Joined: Thu Oct 19, 2023 9:51 pm

Connection Failed

Post by nothesslero » Fri Oct 20, 2023 8:43 pm

There was an error attempting to connect to the selected server.

Error message: option_error: Neither 'client' nor both 'tls-client' and 'pull' options declared. OpenVPN3 client only supports --client mode

I need to solve this problems, does someone knows how can I accomplish it?

User avatar
openvpn_inc
OpenVPN Inc.
Posts: 1333
Joined: Tue Feb 16, 2021 10:41 am

Re: Connection Failed

Post by openvpn_inc » Mon Oct 23, 2023 9:21 am

Hello nothesslero,

Looks like your OpenVPN client configuration is a little messed up. Basically the error message is saying that OpenVPN3 library only supports client mode at this time, not server mode. And by not specifying either the combination or 'tls-client' + 'pull', or the shorthand version 'client', you're not telling OpenVPN to be a client. This is an invalid configuration.

You can solve it by either ensuring that you have 'client' in the profile, or the combination of 'tls-client' + 'pull' (as two separate directives on separate lines). Then OpenVPN will be correctly instructed to act as a client, and then it should work fine. But ONLY doing 'tls-client' or ONLY doing 'pull' is not sufficient.

Kind regards,
Johan
Image OpenVPN Inc.
Answers provided by OpenVPN Inc. staff members here are provided on a voluntary best-effort basis, and no rights can be claimed on the basis of answers posted in this public forum. If you wish to get official support from OpenVPN Inc. please use the official support ticket system: https://openvpn.net/support

nothesslero
OpenVpn Newbie
Posts: 2
Joined: Thu Oct 19, 2023 9:51 pm

Re: Connection Failed

Post by nothesslero » Mon Oct 23, 2023 4:10 pm

How can I configure it?

User avatar
openvpn_inc
OpenVPN Inc.
Posts: 1333
Joined: Tue Feb 16, 2021 10:41 am

Re: Connection Failed

Post by openvpn_inc » Tue Oct 24, 2023 8:09 am

Hello nothesslero,

So when we speak of a connection profile or a profile we mean the .conf or .ovpn file that you load into the client app. So find the original file you imported, edit it in a text editor, and make the necessary changes as described. Then save it and then import that into the client app.

Or contact whoever gave you this configuration and inform them of the brokenness in the profile so that they can fix it for you.

Kind regards,
Johan
Image OpenVPN Inc.
Answers provided by OpenVPN Inc. staff members here are provided on a voluntary best-effort basis, and no rights can be claimed on the basis of answers posted in this public forum. If you wish to get official support from OpenVPN Inc. please use the official support ticket system: https://openvpn.net/support

covernet2023
OpenVpn Newbie
Posts: 1
Joined: Fri Nov 03, 2023 1:33 pm

Re: Connection Failed on Xor Patch + OpenVPN

Post by covernet2023 » Fri Nov 03, 2023 1:40 pm

In Iran, we combined the OpenVPN protocol in covernet-vpn in tunneled form using the same things as XOR Patch, but the configured server and its profile could not be connected in the Mac operating system. This problem can be very strange, but it connects easily on all operating systems, including Android, Windows, and iOS, but this does not happen on Mac with the latest version.

mistergsf
OpenVpn Newbie
Posts: 3
Joined: Mon Nov 06, 2023 9:06 pm

Re: Connection Failed

Post by mistergsf » Mon Nov 06, 2023 11:36 pm

openvpn_inc wrote:
Mon Oct 23, 2023 9:21 am
You can solve it by either ensuring that you have 'client' in the profile, or the combination of 'tls-client' + 'pull' (as two separate directives on separate lines). Then OpenVPN will be correctly instructed to act as a client, and then it should work fine. But ONLY doing 'tls-client' or ONLY doing 'pull' is not sufficient.
Novice here. Can you show how to add 'client'? I know how to edit my config file but don't know where to put it and in the correct way. I've read the explanations but need a demo. I would really appreciate it. I've been trying to solve this problem for a few weeks now.

Nigel99
OpenVpn Newbie
Posts: 2
Joined: Sun Dec 24, 2023 11:18 am

Re: Connection Failed

Post by Nigel99 » Sun Dec 24, 2023 11:18 am

Hello.

Did you manage to solve the problem? I have the same error.

The error only appeared yesterday. Everything worked before.

I'm also a newbie, and I don't understand where I need to make changes to the code.

The error repeats on all devices - on Mac, on two iPhones on different profiles. I don't understand how to fix it.

open vpn installed on a remote vps server via ssh

Frostk1
OpenVpn Newbie
Posts: 3
Joined: Tue Dec 26, 2023 5:24 am

Re: Connection Failed on Xor Patch + OpenVPN

Post by Frostk1 » Thu Dec 28, 2023 5:31 am

covernet2023 wrote:
Fri Nov 03, 2023 1:40 pm
In Iran, we combined the OpenVPN protocol in covernet-vpn in tunneled form using the same things as XOR Patch, but the configured server and its profile could not be connected in the Mac operating system. This problem can be very strange, but it connects easily on all operating systems, including Android, Windows, and iOS, but this does not happen on Mac with the latest version.
To troubleshoot, you might want to check for any Mac-specific configurations or settings that could be causing the problem. Also, ensure that you have the latest OpenVPN version compatible with your Mac OS. If the issue persists, reaching out to the OpenVPN community or Mac support forums might provide more insights.

cemyildiz
OpenVpn Newbie
Posts: 1
Joined: Mon May 13, 2024 4:08 am

Re: Connection Failed

Post by cemyildiz » Mon May 13, 2024 4:11 am

Putting that line to beginning of the .ovpn file is enough to solve to problem:

Code: Select all

client
so your .ovpn file should seem like this:

Code: Select all

client
proto udp
remote x.x.x.x 1194
resolv-retry infinite
nobind
persist-key
persist-tun
remote-cert-tls server
auth SHA512
cipher AES-256-CBC
ignore-unknown-option block-outside-dns
verb 3
<ca>
-----BEGIN CERTIFICATE-----
...
-----END CERTIFICATE-----
</ca>
<cert>
-----BEGIN CERTIFICATE-----
...
-----END PRIVATE KEY-----
</key>
<tls-crypt>
-----BEGIN OpenVPN Static key V1-----
...
-----END OpenVPN Static key V1-----
</tls-crypt>
yes, it is that simple.

Post Reply