nm-l2tp / NetworkManager-l2tp

L2TP and L2TP/IPsec support for NetworkManager
GNU General Public License v2.0
486 stars 83 forks source link

no label for certificates #151

Closed pawel-zajac90 closed 3 years ago

pawel-zajac90 commented 3 years ago

Hi, I installed NetworkManager-l2tp a few days ago and am still looking for a solution to my problem. I would like to use certificates instead of PSK, but when i'm trying to add new connection, there is no place to add certs. I think i've installed everythingexactly with docs, and i don't know where's the problem. Is NetworkManager-l2tp using /etc/ipsec.conf ? (in my file everything is commented). If i will know where to find config file i could simply use it, what will be even better for me.

I will be very grateful for your help as I have had this problem for some time and I am very keen to get it fixed quickly.

dkosovic commented 3 years ago

You didn't mention which linux distribution or which version of NetworkManager-l2tp you are using.

For certificate support, you need to be using NetworkManager-l2tp >= 1.8.0.

If you are using KDE, for certificate support you need to be using plasma-nm >= 5.19.

As Debian/Ubuntu don't consider OpenSSL a system library, it is a GPL violation for NetworkManger-l2tp to link against OpenSSL <= 3.0.0. So I've created network-manager-l2tp 1.8.2 packages (linked against OpenSSL 3.0.0 alpha) for Ubuntu if you want to use certificates :

Fedora and many other Linux distros consider OpenSSL to be a system library, so have certificate support with NetworkManager-l2tp >= 1.8.0.

dkosovic commented 3 years ago

For the run-time generated config files, see the README.md file :

Those config files normally get deleted at the end of the connection unless you are using debugging mode (i.e. nm-l2tp-service --debug , see the debugging section of the README.md file)

pawel-zajac90 commented 3 years ago

Woooooow it works :D Thank You for Your help :D I've wasted so much time... About config files: they exists only when vpn is running, is somwhere file which is template?

dkosovic commented 3 years ago

No templates are used for the config files. there are too many variations to use template files. If you want to change something in the config file, you would need to modify the source code.

The config files only exist when when the VPN is running, except if started in debug mode.

pawel-zajac90 commented 3 years ago

I am looking for a possibility to automate the addition of a VPN connection by users. Could you please advise me if it is better to do this by adding a new connection in / etc / NetworkManager / system-connections or maybe it is possible to create a file that allows the 'import from file' (ubuntu) option?

dkosovic commented 3 years ago

NetworkManager-l2tp-1.8.6 can directly import config files,

Alternatively with older versions, see the following command-line usage for the VPN connection profile files which are stored under /etc/NetworkManager/system-connections/, in particular the nmcli con reload command :

pawel-zajac90 commented 3 years ago

I'm not sure how to create this config file, so i will use cli ;) thanks a lot!

dkosovic commented 3 years ago

Sorry I meant NetworkManager-l2tp-1.8.6 has native export and import, but the exported files are practically the same as existing files from /etc/NetworkManager/system-connections/.

I'll close this issue.