OPNsense Forum

English Forums => General Discussion => Topic started by: interfaSys on January 17, 2016, 09:25:38 pm

Title: How to duplicate OpenVPN client configs?
Post by: interfaSys on January 17, 2016, 09:25:38 pm
The first step would be to duplicate all the config files located in `/var/etc/openvpn`, but is the next step to manually edit config.xml or will it be picked up by the GUI as-is and added to the config when we hit "save".
Title: Re: How to duplicate OpenVPN client configs?
Post by: franco on January 18, 2016, 07:54:27 am
The obvious solution would be to add a "clone" button to the OpenVPN client listing like we have in the firewall section. Is that what you're looking for? Or are you interested in client export features for clients?
Title: Re: How to duplicate OpenVPN client configs?
Post by: interfaSys on January 18, 2016, 11:04:33 am
Quote
The obvious solution would be to add a "clone" button to the OpenVPN client listing like we have in the firewall section.

Indeed and that's the reason I opened this :)
https://github.com/opnsense/core/issues/676

But I was wondering if, in the mean time, there was an easy way to do this via the shell.
Title: Re: How to duplicate OpenVPN client configs?
Post by: franco on January 18, 2016, 03:07:15 pm
You could edit the /conf/config.xml and duplicate the responsible config, but no guarantees that'll work (ID mismatch, syntax error, etc.). There's no use copying directories as they are set up by the code directly from the XML.
Title: Re: How to duplicate OpenVPN client configs?
Post by: interfaSys on January 19, 2016, 10:47:11 am
Thanks!