Issue Reverting From OpenVPN

I run openwrt 23.05.4 on a netgear R7450. I connect to wan via [OpenWrt Wiki] Connect to client Wi-Fi network. I also run openvpn(Mullvad) per OpenWrt routers and Mullvad VPN. Everything works as expected except for one issue which seems like a bug. I am trying to script the processes of connecting via wifi, connecting to the VPN, and bypassing or disabling the VPN. I have accomplished the first two but there seems to be a bug affecting my ability to disable the VPN. After configuring the wifi client, I back up my configuration via LuCI's generate archive function. I then configure the VPN and back up my configuration again. When I restore the first backup, I cannot regain WAN connectivity, even after rebooting, until I go to LuCI, OpenVPN, and disable and stop the VPN Instance.

/etc/config/openvpn

uci del openvpn.mullvad_client.enabled

It seems that maybe OpenWrt is hanging on to a setting or something and that connectivity should be restored regardless of the openvpn client status, after all, I can start it before configuring the interface and firewall and it does not interrupt connectivity.

Are you using OpenVPN or Wireguard? You mention the former in the body of the post, but the latter in the title.

OpenVPN, corrected

To clarify, the issues is that restoring my configuration archive did not restore connectivity. I had to experiment until I found that disabling openvpn instance restored connectivity. The solution was ultimately:

uci del openvpn.mullvad_client.enabled

which seems unnecessary.

So, solved?

If your problem is solved, please consider marking this topic as [Solved]. See How to mark a topic as [Solved] for a short how-to.
Thanks! :slight_smile: