openvpn
openvpn copied to clipboard
Feature request - multiple IPs in a --remote hostname while using redirect-gateway and persist-tun
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