OpenVPN / OpenVPN/openvpn

how to disable keepalive function?

Open
#378 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

cannotreproduce moreinformationneeded
Dominant language
C
Stars
14.6k
Forks
3.4k
PR merge metrics
No merged PRs in 30d

Description

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the server configuration's keepalive 0 0 setting and comparing it with the client configuration on Debian, Red Hat, and OpenWrt. Reproduce the 40–60 minute failure with OpenVPN 2.4.7, then establish whether the documented configuration can keep the tunnel persistent when the remote machine is down.

Written by the indexing model from the issue text.

Assessment

Tech stack
linux
Domain
networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.