Client: Update static route to Server when local default GW changes
Posted: Tue Apr 18, 2023 1:43 pm
Hello!
I use the Windows client on my Notebook (2.6.2), and the server is configured with:
So, everthing works fine, until my Notebook changes the Wifi Network and receives a new default-gateway (by DHCP). From that moment on, the client can not reach the server anymore, as the static route to the openvpn server still has the old default-gateway as next-hop. So, this static route needs to be replaced by a static route with the new default-gateway as next-hop.
So, I always have to reconnect openvpn to get the static route updated.
I think the client would have to watch the local default-route, and if this gets updated with a new default-gateway, the openvpn client should replace the static route. I have not found any client that is capable of that, or other utilities that could do that.
Are you aware of any tricks/workarounds/config-option to update the local static route whenever the local default gateway changes? Thanks
I use the Windows client on my Notebook (2.6.2), and the server is configured with:
Code: Select all
push "redirect-gateway def1 bypass-dhcp"
So, I always have to reconnect openvpn to get the static route updated.
I think the client would have to watch the local default-route, and if this gets updated with a new default-gateway, the openvpn client should replace the static route. I have not found any client that is capable of that, or other utilities that could do that.
Are you aware of any tricks/workarounds/config-option to update the local static route whenever the local default gateway changes? Thanks