This forum is for admins who are looking to build or expand their OpenVPN setup.
Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech
-
Akito
- OpenVpn Newbie
- Posts: 17
- Joined: Thu Mar 28, 2019 12:31 am
Post
by Akito » Mon Sep 12, 2022 10:12 am
--ping-exit n
Causes OpenVPN to exit after n seconds pass without reception of a ping or other packet from remote. This option can be combined with --inactive, --ping, and --ping-exit to create a two-tiered inactivity disconnect.For example,
openvpn [options...] --inactive 3600 --ping 10 --ping-exit 60
when used on both peers will cause OpenVPN to exit within 60 seconds if its peer disconnects, but will exit after one hour if no actual tunnel data is exchanged.
https://openvpn.net/community-resources ... envpn-2-4/
What exit code will be emitted by `ping-exit`?
Can it be modified?
-
TinCanTech
- OpenVPN Protagonist
- Posts: 11137
- Joined: Fri Jun 03, 2016 1:17 pm
Post
by TinCanTech » Mon Sep 12, 2022 11:11 am
Akito wrote: ↑Mon Sep 12, 2022 10:12 am
What exit code will be emitted by `ping-exit`?
exit
zero
Akito wrote: ↑Mon Sep 12, 2022 10:12 am
Can it be modified?
By editing the source code.
-
Akito
- OpenVpn Newbie
- Posts: 17
- Joined: Thu Mar 28, 2019 12:31 am
Post
by Akito » Wed Sep 14, 2022 9:34 pm
TinCanTech wrote: ↑Mon Sep 12, 2022 11:11 am
By editing the source code.
Well, that's bad. Should be an option and 0 is the wrong exit code for an exit on failure.
-
TinCanTech
- OpenVPN Protagonist
- Posts: 11137
- Joined: Fri Jun 03, 2016 1:17 pm
Post
by TinCanTech » Wed Sep 14, 2022 10:09 pm
Technically, it is not an ERROR EXIT and therefore not a failure. --ping-exit functioned correctly.
There may be something that you can do to remap SIG* but you would have to read the manual for that.