After 30 minutes I am wanting to kick the user from our VPN network, this is because we get charged for every connection open and people leave their connections open on their laptops. I can add a client-side configuration to remove them from our server, but the user can modify their OpenVPN conf file and remove these 4 lines (which are shown below).
auth-nocache
inactive 900
ping 10
ping-exit 60
Is there a way on the server side, that kicks the user off after 30 minutes? Or checks to see if they modified their config file?
Any information would be much appreciated
Kicking a user off after 30 minutes idle (server side)?
Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech
Forum rules
Please use the [oconf] BB tag for openvpn Configurations. See viewtopic.php?f=30&t=21589 for an example.
Please use the [oconf] BB tag for openvpn Configurations. See viewtopic.php?f=30&t=21589 for an example.
-
- OpenVPN User
- Posts: 21
- Joined: Wed Aug 29, 2018 8:20 am
-
- OpenVPN Protagonist
- Posts: 11137
- Joined: Fri Jun 03, 2016 1:17 pm
Re: Kicking a user off after 30 minutes idle (server side)?
Try using --inactive 900 in the server config ..
No.
-
- OpenVPN User
- Posts: 21
- Joined: Wed Aug 29, 2018 8:20 am
Re: Kicking a user off after 30 minutes idle (server side)?
I tried putting inactive 900 in /etc/openvpn/server.conf but to no avail - is that correct? I put it at the bottom of the .conf file and restart MySQL connected on a new PC and waited.
Also, if I do the inactive 900 on the client side, I don't need the 4 other lines in my CLIENT conf file (the lines mentioned in my original post)
Thanks for the response too!
-
- OpenVPN Protagonist
- Posts: 11137
- Joined: Fri Jun 03, 2016 1:17 pm
Re: Kicking a user off after 30 minutes idle (server side)?
-
- OpenVPN Protagonist
- Posts: 11137
- Joined: Fri Jun 03, 2016 1:17 pm
Re: Kicking a user off after 30 minutes idle (server side)?
In fact, you can push --inactive, which is almost what you need but the client can filter that out.
So, this
is still the only way sure way.
-
- OpenVPN User
- Posts: 21
- Joined: Wed Aug 29, 2018 8:20 am
Re: Kicking a user off after 30 minutes idle (server side)?
Sorry, I meant restart my OpenVPN server.. not MySQL lolTinCanTech wrote: ↑Wed Aug 29, 2018 2:46 pmRestart you openvpn server ....
Please see:
HOWTO: Request Help !
I will include inactive 900 in the server.conf file and remove the other stuff from the client config file (being those 4 lines in my original post).
Thank you very much. It wont reconnect automatically will it?
-
- OpenVPN User
- Posts: 21
- Joined: Wed Aug 29, 2018 8:20 am
Re: Kicking a user off after 30 minutes idle (server side)?
viewtopic.php?f=4&t=27216&p=81692#p81692
Can you help at all with that? Been stuck for weeks. Thanks