openvpn icon indicating copy to clipboard operation
openvpn copied to clipboard

how to disable keepalive function?

Open CapBarbossa opened this issue 2 years ago • 1 comments

IMPORTANT NOTE I want to disable keepalive function to keep tunnel regardless of whether remote machine is down.

Describe the bug I set keepalive 0 0 in server configuration, but NOT specified the same in client configuration. After launching server and clients, clients first got private IP as expected, but in following 40~60 minutes, clients kept requesting IP addresses from server, ending with failure, and both server and clients couldn't work anymore. This keepalive 0 0 solution is from chatGPT, which I doubt if it is bullshiting. In official documents, I didn't find any double 0 settings mentioned.

To Reproduce In configuration on server side: keepalive 0 0

Expected behavior The tunnel established persist, can NOT be ended automatically.

Version information (please complete the following information):

  • OS: Debian 10(Server) Redhat 7 and OpenWrt 18.06 for clients.
  • OpenVPN version: 2.4.7
  • Repeat for peer if relevant

Additional context Nothing else.

CapBarbossa avatar Aug 02 '23 13:08 CapBarbossa

This keepalive 0 0 solution is from chatGPT, which I doubt if it is bullshiting.

Relying on ChatGPT for proper information is weird to say the least. Just leaving out keepalive/ping options works just as well.

You also provided no evidence that disabling keepalive is not working. There are other timeouts etc. that will break a connection eventually. keepalive is just designed to detect a broken connection early.

schwabe avatar Aug 02 '23 14:08 schwabe