Cannot delete OpenVPN instance - bug?

Started by ozpac, April 15, 2024, 12:50:45 AM

Previous topic - Next topic
Hi. The VPN > OpenVPN > Instances GUI page has a 'delete selected' button at the bottom of the list, but the items in the list do not have a 'select' checkbox so  I am unable to delete the instance I have defined there.

Is this a GUI bug perhaps?


N.B. The logs are showing this error:
Error openvpn /usr/local/opnsense/scripts/openvpn/ovpn_service_control.php: The command '/usr/local/sbin/openvpn --config '/var/etc/openvpn/instance-2f5ea79b-4cb0-4e59-bbbf-d87bd9ab72e3.conf'' returned exit code '1', the output was ''

I have the same problem.

I created a broken instance while trying to make sense of the setup guides, and now i cannot delete the instance i created because neither the delete ellipsis button to the right works, nor does the delete selected button due to there being no checkboxes.

So, it turns out that if you open the interface in Firefox, the buttons work. I have a feeling that the margins or something aren't properly set in chrome/edge which leads to the problem of nothing being selectable.

Today at 04:42:34 AM #3 Last Edit: Today at 04:45:27 AM by pankaj
I solved it little differently by logging into the OPNSense console with following steps:

1. grep -n openvpn-server /conf/config.xml | sed 's/:/ /' --> this will give you the line number where OpenVPN server specific line numbers
2. cat -n /conf/config.xml | sed -n '6478,6500p' --> replace line numbers with your machine specific details, this will show you the entire block
3. nano +6478 /conf/config.xml  -> this will open nano at the specified line number
4. CTRL+K --> deletes the line at cursor position, delete the entire block between <openvpn-server> </openvpn-server>
5. Exit from shell and reload all services from command line, you should be able to see from GUI that the openvpn-server instance that you wanted to delete is no longer there.

And before you do any of the above, backup your config.xml file!