nm-l2tp / NetworkManager-l2tp

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

Connection is down shortly after connecting (ppp0: recursion detected) #97

Closed alexbruy closed 5 years ago

alexbruy commented 5 years ago

Connection to VPN server established successfully, but shortly disconnected with errors

ppp0: recursion detected 

I use Ubuntu 18.04.01 with default kernel

$ uname -a
Linux laptop 4.15.0-38-generic #41-Ubuntu SMP Wed Oct 10 10:59:38 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

NetworkManager 1.10.6-2ubuntu1.1 and network-manager-l2tp-1.2.8-2build1.

Here is the logs https://pastebin.com/K4QsCb1D

Looks like a loop created in the routing table, but I can't find a place in the network manager where to adjust this. Any hint?

dkosovic commented 5 years ago

The only routing table adjustment NetworkManager provides is fairly rudimentary and is in the IPv4 settings of the VPN connections.

I think kernel: ppp0: recursion detected might be a bug in the pppol2tp kernel module. I've seen reports where it sometimes still happens with unreliable 3G or 4G network connections. You could try building xl2tpd without the pppol2tp kernel module support.

First install some required build dependencies, stop the running xl2tpd service and checkout the source code :

sudo apt install build-essential git libpcap0.8-dev
sudo systemctl stop xl2tpd
git clone https://github.com/xelerance/xl2tpd.git
cd xl2tpd

Edit the Makefile and comment out the OSFLAGS+= -DUSE_KERNEL line. Then make and copy over the system xl2tpd

PREFIX=/usr  make
sudo cp xl2tpd /usr/sbin/xl2tpd