OpenVPN client keeps connection after server is unreachable

Hi Everyone,

i have a workin OpenVPN connection with my rutx50 as client to an external server with a dynamic ip-address. It works perfectly until the server side is offline or changes its real ipv4-address.

expected behaviour: the client(rutx50) disconnect automaticly and tries to reconnect multiple times. If no connection possible, the wan-connection works without the vpn-route.

actual behaviour: the client(rutx50) stays connected to an unreachable server and no wan-traffic is possible

For me this is a bug, because the only way to resume wan connection is to login to the rutx50 and stop or restart the OpenVPN connection.

My guess is that the router is trying to reconnect the VPN connection to the old destination address (IPv4) of the dynamic address, which no longer exists when it changes. Before reconnecting, the router would have to go into the WAN without the VPN route and update its DNS table.

Removing the “persist-tun” setting in my ovpn configuration ensures SOMETIMES that I am back on the WAN without a VPN route, but the client can no longer be reconnected afterwards and I need a router restart

Can u reproduce this?

Thanks in advance! :*



The following config in conjunction with disabling config parsing was the solution

client
persist-key
tls-client
auth sha256
cipher AES-256-CBC
dev tun_c_1
keepalive 10 60
port 1196
proto tcp
remote “XXX.XXX.com
nobind
user nobody
group nogroup
verb 3
remote-cert-tls server
resolv-retry infinite
redirect-gateway def1
dhcp-option DNS 8.8.8.8

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.