OPNsense Forum

Archive => 20.1 Legacy Series => Topic started by: Fright on August 06, 2020, 08:10:30 AM

Title: [SOLVED]OpenVPN: wrong timestamps in status
Post by: Fright on August 06, 2020, 08:10:30 AM
Hi.
The first connection after starting the service shows the correct time.
Every next connection shows the wrong time.
Time runs out by about 30 minutes every 2 hours.
This is not a php parsing error or something. If I connect to management socket it shows the same wrong time.
example:
openvpn log:
2020-08-06T09:04:59   openvpn: user '*****' authenticated using 'DC1'
connection status:
connected since: 2020-08-06 13:11:33
Title: Re: OpenVPN: wrong timestamps in status
Post by: banym on August 06, 2020, 08:37:09 AM
What hardware do you use?

Is NTP setup and working?
Title: Re: OpenVPN: wrong timestamps in status
Post by: Fright on August 06, 2020, 08:39:03 AM
Its Hyper-V VM.
NTP is working.
All other logs shows right time with right time zone
Title: Re: OpenVPN: wrong timestamps in status
Post by: Fright on August 06, 2020, 10:50:30 AM
Additional info: turn verb 4 on and log shows something like:
2020-08-06T11:42:44   openvpn[35212]: user/ip.ip.ip.ip:55798 PID_ERR replay
Title: Re: OpenVPN: wrong timestamps in status
Post by: Fright on August 06, 2020, 01:37:47 PM
banym, thanks for the hint!
I disable clock sync from host to VM (VM host unsynced and it was constant 2min difference with ntp servers) and clock drift in verbose log now is always (3 hours at this moment) "[ 0 ]" and "Connected Since" shows the correct time!
i still don't understand why clock drift continued to grow in OpenVPN with Hyper-V clock-sync turned on.
And why clock drift is considered in logging and not considered in status.
But this is not opnsense problem )
Thanks!
Title: Re: OpenVPN: wrong timestamps in status
Post by: banym on August 06, 2020, 05:27:13 PM
Thank you very much for sharing the solution and information! You are welcome.
If you could mark the first post as solved this helps others to find your solution. Have fun with your firewall!