L2TP VPN problem with F36

Hello,

I just switched from Arch linux to Fedora today. I am trying to setup my company vpn connection but i did fail. Its using L2TP and there is a DUO 2FA authentication. When i try it directly it did not work, and i realized libreswan is installed that’s why i did the following.

sudo rpm -e libreswan
sudo dnf install xl2tpd strongswan NetworkManager-l2tp NetworkManager-l2tp-gnome NetworkManager-openvpn NetworkManager-openvpn-gnome NetworkManager-pptp NetworkManager-pptp-gnome NetworkManager-strongswan NetworkManager-strongswan-gnome

I’m filling Gateway, username, password. In Ipsec Settings selecting “Enable IPsec tunnel to L2TP host” and fillling Pre-shared key area. Like this when i try to connect i’m getting dbus: failure: connect-failed (1) error. I did try lot of different things nothing changed except “Use IKEv2 key exchange” selection on IPsec Properties. When this was enabled i’m getting failed to connect: 'Timeout was reached' this error.
To make sure everything is normal on the other side, I installed Arch in gnome boxes and tried adding and using the vpn again with Kde network-manager and it worked. I really want to use Fedora. But if I can’t fix this problem I will have to go back to Arch + KDE. Before making a decision, I thought of getting help from you.
Many thanks for your help in advance.

Generally, you should never use rpm -e to uninstall things. It will uninstall things without confirmation meaning it might take more than you expect it to and might leave you with a system that no longer has the right dependencies. Always use dnf remove instead.

Double check your gateway. Timeout reached means it looks like it wasn’t able to connect to the gateway.

rpm -e does dependency checking and will fail if there are other packages dependent on the specified package and will be limited to only removing the specified package. You might be thinking of rpm -e --nodeps. The NetworkManager-l2tp RPM has a Recommends: (libreswan or strongswan) dependency.

Fedora blacklists the L2TP kernel modules, the user space L2TP fallback code might be too slow. Try unblacklisting the L2TP kernel modules which also improves interoperability with some VPN servers, see the NetworkManager-l2tp README file: