MyNicknameX
MyNicknameX

Reputation: 31

Disable auto-reconnect

I am using AWS VPN endpoint, and open vpn client. From aws cli I can trigger disconnection of every client, however openvpn reconnects all automatically. How could I disable that? In options manual I found only "connection retry time". These are my options:

client

dev tun

proto udp

remote-random-hostname

resolv-retry infinite

nobind

auth-nocache

remote-cert-tls server

cipher AES-256-GCM

verb 3

Removing resolv-retry infinite does not solve the problem.

Upvotes: 2

Views: 1365

Answers (1)

Mason G. Zhwiti
Mason G. Zhwiti

Reputation: 6540

Not exactly what you're looking for, but you can define an inactive setting in the .ovpn file that disconnects the VPN client on the client side if inactivity is detected. Then the user should need to manually reconnect.

Format is inactive n [bytes], e.g. for a timeout after 10 minutes with less than 1000 bytes of activity, you'd use:

inactive 600 [1000]

The [bytes] portion is optional, but gives you some leeway on "how active" someone needs to be to maintain a connection.

Found this documented in the OpenVPN docs in the section on "--inactive" setting.

Upvotes: 1

Related Questions