1. Store
  2. Apps
  3. Hardware
  4. Support
  5. Solutions

ClearFoundation

Forums
Welcome, Guest
OpenVPN forcing renegotiation every hour
(1 viewing) 1 Guest
Go to bottomPage: 1
TOPIC: OpenVPN forcing renegotiation every hour
#41600
OpenVPN forcing renegotiation every hour 1 Year ago  
I have a client running and OpenVPN server on ClearOS 5.2 SP1. We have set up about 10-15 remote users with no issues at all up until now. Lately the users have been staying logged in for longer and longer sessions. We've recently discovered that everyone is being forced to renegotiate at exactly 60 minutes.

I did a little research and discovered that this is a default for OpenVPN (presumably to limit access to someone who has stolen your system, etc). They would like to extend the time between these forced renegotiations though. I found what appears to be the answer, adding:
Code:

reneg-sec 2880


would adjust that time to 2,880 seconds, or 8 hours. The problem is that there is no server.conf in /etc/openvpn and trying to adjust it on the client side doesn't seem to affect anything.
Jason Burgett
Fresh Boarder
Posts: 17
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#41603
Re: OpenVPN forcing renegotiation every hour 1 Year ago  
Have you tried putting it in /etc/openvpn/clients.conf where a lot (all?) of the configuration info is held. You may need to restart OpenVPN after editing the file.
Nick Howitt
Platinum Boarder
Posts: 4144
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#41611
Re:OpenVPN forcing renegotiation every hour 1 Year ago  
Yes, I tried that already. I also tried making he change right in the client's .ovpn file with no results.
Jason Burgett
Fresh Boarder
Posts: 17
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#41619
Re:OpenVPN forcing renegotiation every hour 1 Year ago  
For it to be effective it looks like the option must be set at both ends at the same time. Did you try that?
Nick Howitt
Platinum Boarder
Posts: 4144
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#41620
Re:OpenVPN forcing renegotiation every hour 1 Year ago  
I would, but I can't seem to find where the server.conf is. I would assume in the /etc/openvpn directory but it's not there. Could I just put one in there with that one entry?
Jason Burgett
Fresh Boarder
Posts: 17
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#41621
Re:OpenVPN forcing renegotiation every hour 1 Year ago  
I would try /etc/openvpn/clients.conf first. That is the configuration file being used by OpenVPN even on the server. Remember to restart OpenVPN.
Nick Howitt
Platinum Boarder
Posts: 4144
graphgraph
User Offline Click here to see the profile of this user
Last Edit: 2012/05/20 09:28 By NickH.
The administrator has disabled public write access.
 
#41625
Re:OpenVPN forcing renegotiation every hour 1 Year ago  
I'll try again on Monday and report back here. Again, it didn't seem to make a difference the first time, but who knows. Is it a sure thing that Openvpn uses the clients.conf even for the server config on ClearOS?
Jason Burgett
Fresh Boarder
Posts: 17
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#41626
Re:OpenVPN forcing renegotiation every hour 1 Year ago  
If you are not worried about password authentication and just want to rely on certificates (so you won't see the renegotiation as it happens in the background), in clients.conf comment out the line:
Code:

plugin /usr/share/openvpn/plugin/lib/openvpn-auth-ldap.so /etc/openvpn/auth-ldap

and in the .ovpn file comment out the line
Code:

auth-user-pass

Like this you can even start OpenVPN as a service so the user does not even know he is connecting.
Nick Howitt
Platinum Boarder
Posts: 4144
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#41677
Re:OpenVPN forcing renegotiation every hour 1 Year ago  
Ok, here's the final verdict. You can just add

Code:

reneg-sec xx



into the clients .ovpn file. Turns out the client I test with was automatically re-authenticating silently like it should so I couldn't reproduce the problem. After I told it to stop doing that I could force the re-authorization to happen whenever I wanted using the reneg-sec option.

My clients are using this client:

openvpn.net/index.php?option=com_content&id=357

and not checking the "Remember password for this session" box. With that box set it does seem to re-auth silently in the background. Just goes to show you that the user is usually the hardest problem to diagnose
Jason Burgett
Fresh Boarder
Posts: 17
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
Go to topPage: 1
  get the latest posts directly to your desktop