OPNsense Forum

Archive => 18.1 Legacy Series => Topic started by: PimB on July 18, 2018, 06:45:09 pm

Title: [SOLVED] OpenVPN keeps reconnecting every hour
Post by: PimB on July 18, 2018, 06:45:09 pm
I'm sorry, yet another question from me.

OpenVPN is reconnecting exactly every hour while I used reneg 0 in the config and reneg-sec 0; in de advanced config.

How can this be?
Title: Re: OpenVPN keeps reconnecting every hour
Post by: mimugmail on July 18, 2018, 06:54:27 pm
Had similar issue, was broken cable modem at the client Side. Can you check from other location?
Title: Re: OpenVPN keeps reconnecting every hour
Post by: PimB on July 18, 2018, 07:16:27 pm
It's a connection to a VPN provider, shall I check it with a other WAN uplink?
Title: Re: OpenVPN keeps reconnecting every hour
Post by: mimugmail on July 18, 2018, 07:29:18 pm
If possible, yes. LTE Hotspot?
Title: Re: OpenVPN keeps reconnecting every hour
Post by: PimB on July 18, 2018, 07:30:54 pm
I don't know how. If I use a wireless dongle for wifi it's been set up as a AP instead of a client.
Title: Re: OpenVPN keeps reconnecting every hour
Post by: franco on July 18, 2018, 11:38:36 pm
reneg-sec 0; in both client and server?


Cheers,
Franco
Title: Re: OpenVPN keeps reconnecting every hour
Post by: PimB on July 19, 2018, 09:22:21 am
Correct. And the problem isn't the internet connection. But sometimes it's completely frozen and I discovered something weird, A LOT of packets in and out:

(https://preview.ibb.co/gj06Od/Screenshot_20180718_230038.png) (https://ibb.co/gFsxUJ)
Title: Re: OpenVPN keeps reconnecting every hour
Post by: mimugmail on July 19, 2018, 09:53:39 am
What about logs on client and server at the specific time?
Title: Re: OpenVPN keeps reconnecting every hour
Post by: PimB on July 19, 2018, 10:08:24 am
Stupid of me but I didn't save those. You see the connection renegotiating and the internet connection drops for a few seconds. When this happens, it's takes longer and the connection closes and it's trying to reconnect but slowly.

I'll immediately save the log when it happens again. But I do notice this now:
Jul 19 09:16:45   openvpn[73285]: MANAGEMENT: TCP send error: Broken pipe
Strange...

It a connection with a VPN provider by the way, not my own site-to-site.
Title: Re: OpenVPN keeps reconnecting every hour
Post by: PimB on July 19, 2018, 11:51:17 am
This happens every hour

Code: [Select]
Jul 19 11:16:34 openvpn[73285]: Control Channel: TLSv1.2, cipher TLSv1/SSLv3 ECDHE-RSA-AES256-GCM-SHA384, 2048 bit RSA
Jul 19 11:16:34 openvpn[73285]: Incoming Data Channel: Cipher 'AES-256-GCM' initialized with 256 bit key
Jul 19 11:16:34 openvpn[73285]: Outgoing Data Channel: Cipher 'AES-256-GCM' initialized with 256 bit key
Jul 19 11:16:34 openvpn[73285]: VERIFY OK: depth=0, CN=nl307.nordvpn.com
Jul 19 11:16:34 openvpn[73285]: VERIFY EKU OK
Jul 19 11:16:34 openvpn[73285]: ++ Certificate has EKU (str) TLS Web Server Authentication, expects TLS Web Server Authentication
Jul 19 11:16:34 openvpn[73285]: Validating certificate extended key usage
Jul 19 11:16:34 openvpn[73285]: VERIFY KU OK
Jul 19 11:16:34 openvpn[73285]: VERIFY OK: depth=1, C=PA, O=NordVPN, CN=NordVPN CA2
Jul 19 11:16:34 openvpn[73285]: VERIFY OK: depth=2, C=PA, O=NordVPN, CN=NordVPN Root CA
Jul 19 11:16:34 openvpn[73285]: TLS: tls_process: killed expiring key
Title: Re: OpenVPN keeps reconnecting every hour
Post by: mimugmail on July 19, 2018, 12:12:20 pm
Do you have a local AV scanner active? Trendmicro? Kaspersky?
Title: Re: OpenVPN keeps reconnecting every hour
Post by: PimB on July 19, 2018, 12:25:35 pm
Do you have a local AV scanner active? Trendmicro? Kaspersky?

None. But the connection is steady now for longer than one hour after 2 reboots. I guess I'll have to wait and see for now.
Title: Re: OpenVPN keeps reconnecting every hour
Post by: PimB on July 20, 2018, 05:55:57 pm
Thanks for all the fast responses!

The problem is gone... In addition I've used Traffic Shaper to set the max soeed a bit lower and the CPU doesn't go to 100% (and stalling the device) anymore.