OpenVPN / OpenVPN/openvpn

Feature request - multiple IPs in a --remote hostname while using redirect-gateway and persist-tun

Open
#282 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

When using redirect-gateway a /32 route gets made for the vpn server that was connected to and then a default route gets made for the internet to flow over. When using persist-tun those routes remain active while trying to reconnect. That means that if there are multiple IPs in the --remote entry or multiple --remote entries that we can not connect to any of them except for the IP that was connected to in the first place. This is a request to handle that situation. After talking to dazo I found that in this situation openvpn3 will add a /32 route for the next IP it is trying to connect to, to bypass the route over the VPN.

This is related to https://github.com/OpenVPN/openvpn/issues/281

Sorry I can not provide patches, I have no C skills, if it were bash I'd happily provide code

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 reading related issue #281 and comparing the described behavior with OpenVPN3's handling of multiple --remote addresses. Trace redirect-gateway, persist-tun, and connection retry handling in the C code, then define tests for reconnecting to each configured address while the prior /32 and default routes remain active. Done means alternate remote IPs can be reached without routing through the VPN.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
networking
Issue type
Feature
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.