OpenVPN / OpenVPN/openvpn3

Manually stop ovpncli process and then the DNS configuration could not restore

Open
#151 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
1.2k
Forks
467
PR merge metrics
No merged PRs in 30d

Description

I have tried some test on ovpncli. I found the log:

"netsh interface ip set dnsservers 11 static 10.0.0.3 register=primary validate=no
netsh interface ip add dnsservers 11 8.8.8.8 2 validate=no
NRPT::ActionCreate names=[.] dns_servers=[10.0.0.3,8.8.8.8]
..........
Successfully flushed the DNS Resolver Cache."

and the Openvpn is connected with the dns server updated.
After I manually close the process or directly restarting the computer, there are some issues related to DNS server config that the origin dns server could not be restore.
I found the log

"netsh interface ip delete route ..../..... store=active Ok.
netsh interface ip delete route ..../..... store=active Ok.
netsh interface ip delete route ..../..... store=active Ok.
netsh interface ip delete dnsservers 11 all validate=no"

in the disconnecting flow. So I gress this flow is missed after the process was directly close.

Could I change some setting in the ovpncli or do some action to improve this situation after manually closing the process or directly restarting the computer? I would so appreciate if someone answer my question!

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 reproducing the issue through the ovpncli disconnecting flow, including manual process termination and computer restart, and compare the connection and disconnection logs shown in the report. The fix is complete when the original DNS configuration is restored in those interruption scenarios.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.