What's new

OpenVPN client fails to reconnect automatically "Error connecting - Authentication failed")

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

What I would try is using a domain name rather than an explicit IP (if you're not already doing so), and adding the following to custom config.

Code:
resolv-retry infinite

Most VPN providers will bind multiple public IPs to a given domain name. And w/ each query, the list of public IPs is rotated, creating a crude form of load balancing.

You can see this by issuing the following command, multiple times.

Code:
nslookup <domain-name>

By using the resolve-retry directive w/ infinite, you're forcing the OpenVPN client to re-resolve the domain name every time the connection has to be rebuilt, and thus you're accessing a different OpenVPN server with each attempt.

That's why using an explicit IP rather than a domain name comes w/ some risk. It's leaves you with only that one option.

For now, I would also keep the persist-tun directive commented out. If these changes work, then perhaps you might try using persist-tun again and see if the problems return.
 
Last edited:
Btw, even if this works, it's NOT normal to kick off existing users just because of being overloaded (if that's truly the reason). A good VPN provider will never let that happen. Once a server reaches some threshold, only *new* connections should be prevented. You don't kick off existing users! That's bad practice.

Like most VPNs, OpenVPN wasn't designed to deal w/ this kind of situation. The customer should have the confidence that once a connection is established, it will be maintained, at least until there's a *very* good reason to kill it, for example, maintenance. But that should be extremely rare, and perhaps users should even be notified. But any VPN provider who's killing off connections willy-nilly, as this one appears to be doing, is best avoided. Again, this is NOT normal, and will likely be a continuing source of headaches.

Most likely he's running beyond capacity and giving the shaft to paid customers to keep attracting new ones.
 
Last edited:
I think as has been recommended you should at least try another VPN provider or at least a different server from your current provider. I have had excellent results with PIA & Astrill for both throughput and reliability. Others on this forum have had good experiences with other providers.

Other possibilities, are you running the connmon script on your router so you can monitor how steady your connection is? If your ISP connection glitches then it can result in your VPN tunnel dropping. Also how is the quality of your power? Sags can result in router and/or modem glitches. Plugging my network gear into an UPS made a definite improvement in the reliability of my Internet connection.
 
Turns out my ISP wasn't glitching. It was the router. For some reason I wasn't able to get a stable WAN connection with my RT-AC86U (384.10_2) router. So i replaced it with a RT-AC66U B1 (stock 3.0.0.4.384_45708) and the WAN connection is now completely stable. (I don't know the reason. I think the WAN settings were the same in both routers.)

Furthermore, I connected the WAN port of the AC86U (384.10_2) to one of the LAN ports of the AC66U, and I'm now using it as a dedicated VPN router. The VPN connection is also completely stable now. No glitching. I am also using a new VPN provider. (I use TCP as i got a lot of "bad packet" errors with UDP with the new VPN provider.)

Problem solved i guess, thanks for the help.
 
Uh, maybe i spoke too soon. It's been running stable for days but of course right after i wrote this my main router's WAN connection has dropped three of times again already. Now I get "WAN Connection: ISP's DHCP did not function properly" again. I don't understand what's going on. Maybe my ISP is glitching after all...
 

Similar threads

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top