Copying openvpn client configs (or generating them from a script)?

Adam Funk a24061 at ducksburg.com
Mon May 23 10:57:25 UTC 2022


On 2022-05-23, Adam Funk wrote:

> I've just done a clean Ubuntu-MATE 22.04 installation on a
> laptop. Among other things, I made a complete backup copy of /etc from
> before. I subscribe to a VPN service that has outlets in a lot of
> countries and I had about 10 different outlet cities set up
> before. The configurations differ only in the name I've assigned and
> in the server used (all the account details are the same).
>
> I don't want to have to type and click all of them by hand. I tried
> copying all the /etc/NetworkManager/system-connections/*.nmconnection
> files from the old /etc to the new one, logged out, rebooted, but they
> don't show up in my network manager.
>
> Is there another trick I can use to make the fresh installation
> recognize those files?
>
> Or is there a command-line way to add VPN connections, so I can script
> the whole process (to C&P the duplicate information)?

OK, I eventually figured out how to get nmcli to do it using these
instructions

<https://www.pbrandwijk.com/2020/07/05/using-nmcli-to-connect-to-vpn.html>

with *.ovpn files from the VPN provider.





More information about the ubuntu-users mailing list