I have tuned OpenConnect client to connect via anyconnect protocol with VPN for a work.
VPN requires 2FA (Google authenticator) so I use Password2 field in LUCI to enter it.
When there are connection issues so OpenConnect can disconnect.
netifd endlessly retries to restore OpenConnect connection. But it uses old 2FA key so VPN rejects.
And as a result VPN can block my creds due to many unsuccessful attempts.
Pls help with question(s):
Is there any way to tell netifd:
- for this particular connection pls do not retry to reconnect?
- kind of timeout to restore OpenConnect?
- number of retires to restore OpenConnect?
Or in other words I'd like to netifd to stop reconnecting if OpenConnect connection is down.
Just in case I've read about reconnect-timeout parameter for OpenConnect. But the only idea comes to my head is to set as high value as possible. So if there is VPN connection issue I can turn off OpenConnect myself.
One more thing to give a picture. Below are logs when I unplug WAN cable. So netifd tries to restore OpenConnect forever:
...
Wed Feb 4 19:04:07 2026 user.notice openconnect: executing 'openconnect 'vpn.server.address' '-i' 'vpn-OpenConnect' '--non-inter' '--syslog' '--protocol' 'anyconnect' '--authgroup' 'VPN_AUTH_GROUP' '-u' 'user.name' '--passwd-on-stdin''
Wed Feb 4 19:04:07 2026 daemon.notice netifd: OpenConnect (5824): POST https://vpn.server.address/
Wed Feb 4 19:04:07 2026 daemon.notice netifd: OpenConnect (5824): Failed to connect to VPN_IP:VPN_PORT: Network unreachable
Wed Feb 4 19:04:07 2026 daemon.notice netifd: OpenConnect (5824): Failed to connect to host vpn.server.address
Wed Feb 4 19:04:07 2026 daemon.notice netifd: OpenConnect (5824): Failed to open HTTPS connection to vpn.server.address
Wed Feb 4 19:04:07 2026 daemon.notice netifd: OpenConnect (5824): Failed to complete authentication
Wed Feb 4 19:04:07 2026 user.notice openconnect: bringing down openconnect
Wed Feb 4 19:04:07 2026 daemon.notice netifd: Interface 'OpenConnect' is now down
Wed Feb 4 19:04:07 2026 daemon.notice netifd: Interface 'OpenConnect' is setting up now
Wed Feb 4 19:04:07 2026 user.notice openconnect: initializing...
Wed Feb 4 19:04:07 2026 user.notice openconnect: executing 'openconnect 'vpn.server.address' '-i' 'vpn-OpenConnect' '--non-inter' '--syslog' '--protocol' 'anyconnect' '--authgroup' 'VPN_AUTH_GROUP' '-u' 'user.name' '--passwd-on-stdin''
Wed Feb 4 19:04:07 2026 daemon.notice netifd: OpenConnect (5844): POST https://vpn.server.address/
Wed Feb 4 19:04:07 2026 daemon.notice netifd: OpenConnect (5844): Failed to connect to VPN_IP:VPN_PORT: Network unreachable
Wed Feb 4 19:04:07 2026 daemon.notice netifd: OpenConnect (5844): Failed to connect to host vpn.server.address
Wed Feb 4 19:04:07 2026 daemon.notice netifd: OpenConnect (5844): Failed to open HTTPS connection to vpn.server.address
Wed Feb 4 19:04:07 2026 daemon.notice netifd: OpenConnect (5844): Failed to complete authentication
Wed Feb 4 19:04:07 2026 user.notice openconnect: bringing down openconnect
Wed Feb 4 19:04:07 2026 daemon.notice netifd: Interface 'OpenConnect' is now down
Wed Feb 4 19:04:07 2026 daemon.notice netifd: Interface 'OpenConnect' is setting up now
Wed Feb 4 19:04:07 2026 user.notice openconnect: initializing...
...