Score:1

OpenVPN cannot connect as client

cn flag

I installed and configured OpenVPN on my Ubuntu 18.04 machine. When I test the status of the VPN, I see that it is active but when I use the .ovpn file on my client and try to connect VPN, it does not connect.

What can I do and where should I look?

Client Log:

⏎[Sep 1, 2021, 17:21:07] Frame=512/2048/512 mssfix-ctrl=1250
⏎[Sep 1, 2021, 17:21:07] UNUSED OPTIONS
4 [resolv-retry] [infinite]
5 [nobind]
6 [persist-key]
7 [persist-tun]
11 [ignore-unknown-option] [block-outside-dns]
12 [verb] [3]
⏎[Sep 1, 2021, 17:21:07] EVENT: RESOLVE ⏎[Sep 1, 2021, 17:21:07] Contacting 76.158.145.102:1194 via UDP
⏎[Sep 1, 2021, 17:21:07] EVENT: WAIT ⏎[Sep 1, 2021, 17:21:07] WinCommandAgent: transmitting bypass route to 76.158.145.102
{
    "host" : "76.158.145.102",
    "ipv6" : false
}

⏎[Sep 1, 2021, 17:21:07] Connecting to [76.158.145.102]:1194 (76.158.145.102) via UDPv4
⏎[Sep 1, 2021, 17:21:17] Server poll timeout, trying next remote entry...
⏎[Sep 1, 2021, 17:21:17] EVENT: RECONNECTING ⏎[Sep 1, 2021, 17:21:17] EVENT: RESOLVE ⏎[Sep 1, 2021, 17:21:17] Contacting 76.158.145.102:1194 via UDP
⏎[Sep 1, 2021, 17:21:17] EVENT: WAIT ⏎[Sep 1, 2021, 17:21:17] WinCommandAgent: transmitting bypass route to 76.158.145.102
{
    "host" : "76.158.145.102",
    "ipv6" : false
}

⏎[Sep 1, 2021, 17:21:17] Connecting to [76.158.145.102]:1194 (76.158.145.102) via UDPv4
⏎[Sep 1, 2021, 17:21:27] Server poll timeout, trying next remote entry...
⏎[Sep 1, 2021, 17:21:27] EVENT: RECONNECTING ⏎[Sep 1, 2021, 17:21:27] EVENT: RESOLVE ⏎[Sep 1, 2021, 17:21:27] Contacting 76.158.145.102:1194 via UDP
⏎[Sep 1, 2021, 17:21:27] EVENT: WAIT ⏎[Sep 1, 2021, 17:21:27] WinCommandAgent: transmitting bypass route to 76.158.145.102
{
    "host" : "76.158.145.102",
    "ipv6" : false
}

⏎[Sep 1, 2021, 17:21:27] Connecting to [76.158.145.102]:1194 (76.158.145.102) via UDPv4
⏎[Sep 1, 2021, 17:21:37] Server poll timeout, trying next remote entry...
⏎[Sep 1, 2021, 17:21:37] EVENT: RECONNECTING ⏎[Sep 1, 2021, 17:21:37] EVENT: RESOLVE ⏎[Sep 1, 2021, 17:21:37] Contacting 76.158.145.102:1194 via UDP
⏎[Sep 1, 2021, 17:21:37] EVENT: WAIT ⏎[Sep 1, 2021, 17:21:37] WinCommandAgent: transmitting bypass route to 76.158.145.102
{
    "host" : "76.158.145.102",
    "ipv6" : false
}

⏎[Sep 1, 2021, 17:21:37] Connecting to [76.158.145.102]:1194 (76.158.145.102) via UDPv4
⏎[Sep 1, 2021, 17:21:47] Server poll timeout, trying next remote entry...
⏎[Sep 1, 2021, 17:21:47] EVENT: RECONNECTING ⏎[Sep 1, 2021, 17:21:47] EVENT: RESOLVE ⏎[Sep 1, 2021, 17:21:47] Contacting 76.158.145.102:1194 via UDP
⏎[Sep 1, 2021, 17:21:47] EVENT: WAIT ⏎[Sep 1, 2021, 17:21:47] WinCommandAgent: transmitting bypass route to 76.158.145.102
{
    "host" : "76.158.145.102",
    "ipv6" : false
}

⏎[Sep 1, 2021, 17:21:47] Connecting to [76.158.145.102]:1194 (76.158.145.102) via UDPv4
⏎[Sep 1, 2021, 17:21:57] Server poll timeout, trying next remote entry...
⏎[Sep 1, 2021, 17:21:57] EVENT: RECONNECTING ⏎[Sep 1, 2021, 17:21:57] EVENT: RESOLVE ⏎[Sep 1, 2021, 17:21:57] Contacting 76.158.145.102:1194 via UDP
⏎[Sep 1, 2021, 17:21:57] EVENT: WAIT ⏎[Sep 1, 2021, 17:21:57] WinCommandAgent: transmitting bypass route to 76.158.145.102
{
    "host" : "76.158.145.102",
    "ipv6" : false
}

⏎[Sep 1, 2021, 17:21:57] Connecting to [76.158.145.102]:1194 (76.158.145.102) via UDPv4
⏎[Sep 1, 2021, 17:22:07] EVENT: CONNECTION_TIMEOUT  BYTES_OUT : 3240
 PACKETS_OUT : 60
 CONNECTION_TIMEOUT : 1
 N_RECONNECT : 5
⏎[Sep 1, 2021, 17:22:07] EVENT: DISCONNECTED ⏎
user535733 avatar
cn flag
Look up how to get your VPN client (not server) to emit debug output or logs. Those will tell you exactly why it's not connecting.
TheCeylann avatar
cn flag
@user535733 I added Log can you check please
user535733 avatar
cn flag
What does the client output `Server poll timeout` and `CONNECTION_TIMEOUT` suggest to you?
Organic Marble avatar
us flag
Do you have the proper port forwarding set up in your router to allow incoming connections to access the server?
Score:-1
cn flag

Reconfiguration of OpenVPN File might be the answer of your Question.

sudo openvpn --config whateverthename.ovpn
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.