Score:0

PPTP and L2TP VPN stop working on Ubuntu 22.04.1 LTS

gd flag

I use VPN to access a server to work on.

The server runs in the university network, and I need to use a VPN from home to connect to the university network and access the server.

The problem is that I have moved out the city to spend holidays (so I'm using other network, provider etc), and in this network the VPN is not connecting anymore (at least using Linux), it just says "activation of the network failed" after some waiting.

I do have a dual boot, with Windows 11 the VPN connects as usual, so it's not a problem from my router/network but from some Ubuntu configuration.

The VPN is PPTP IPV4: Automatic (DHCP) IPV6: Automatic

Error: activation of the network failed

sudo lshw -C network

*-network

description: Wireless interface
product: Dual Band Wireless-AC 3165 Plus Bluetooth
vendor: Intel Corporation
physical id: 0
bus info: pci@0000:07:00.0
logical name: wlp7s0
version: 99
serial: 5c:cd:5b:93:76:eb
width: 64 bits
clock: 33MHz
capabilities: pm msi pciexpress bus_master cap_list ethernet physical wireless
configuration: broadcast=yes driver=iwlwifi driverversion=5.15.0-56-generic firmware=29.4063824552.0
7265D-29.ucode ip=192.168.0.117 latency=0 link=yes multicast=yes
wireless=IEEE 802.11
resources: irq:138 memory:b3300000-b3301fff *-network
description: Ethernet interface
product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
vendor: Realtek Semiconductor Co., Ltd.
physical id: 0
bus info: pci@0000:08:00.0
logical name: enp8s0
version: 10
serial: 64:1c:67:c4:06:54
capacity: 1Gbit/s
width: 64 bits
clock: 33MHz
capabilities: pm msi pciexpress msix vpd bus_master cap_list ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
configuration: autonegotiation=on broadcast=yes driver=r8168 driverversion=8.049.02-NAPI latency=0 link=no multicast=yes port=twisted pair
resources: irq:126 ioport:3000(size=256) memory:b3204000-b3204fff memory:b3200000-b3203fff

I have tried using cable connection, same error.

I have tried this tutorial: https://www.cyberithub.com/error-activation-of-network-connection-failed-on-linux/

results:

sudo nmcli connection up "VPN" --ask

You need to authenticate to access the Virtual Private Network “VPN”.
Password (vpn.secrets.password):
••• Error: Connection activation failed: Unknown reason Hint: use 'journalctl -xe NM_CONNECTION=80□□□□□□->3□□□□-4□□□□-8□□□-527□□□□□□□ + NM_DEVICE=wlp7s0' to get more details.

journalctl -xe NM_CONNECTION=80□□□□□□-3□□□□-4□□□□-84□□-52□□□□□□□□ + NM_DEVICE=wlp7s0

jan 01 04:01:00 user NetworkManager[657]: [1672556460.9554] device (wlp7s0): supplicant interface state: 4way_handshake -> completed jan 01 04:01:00 user NetworkManager[657]: [1672556460.9554] device (wlp7s0): Activation: (wifi) Stage 2 of 5 (Device Configure) successful. Connected to wireless network "Wifi_name" jan 01 04:01:00 user NetworkManager[657]: [1672556460.9555] device (wlp7s0): state change: config -> ip-config (reason 'none', sys-iface-state: 'managed') jan 01 04:01:00 user NetworkManager[657]: [1672556460.9565] dhcp4 (wlp7s0): activation: beginning transaction (timeout in 45 seconds) jan 01 04:01:03 user NetworkManager[657]: [1672556463.0378] dhcp4 (wlp7s0): state changed new lease, address=192.168.0.117 jan 01 04:01:03 user NetworkManager[657]: [1672556463.0423] device (wlp7s0): state change: ip-config -> ip-check (reason 'none', sys-iface-state: 'managed') jan 01 04:01:03 user NetworkManager[657]: [1672556463.0447] device (wlp7s0): state change: ip-check -> secondaries (reason 'none', sys-iface-state: 'managed') jan 01 04:01:03 user NetworkManager[657]: [1672556463.0449] device (wlp7s0): state change: secondaries -> activated (reason 'none', sys-iface-state: 'managed') jan 01 04:01:03 user NetworkManager[657]: [1672556463.0469] device (wlp7s0): Activation: successful, device activated. jan 01 05:01:02 user NetworkManager[657]: [1672560062.9865] dhcp4 (wlp7s0): state changed new lease, address=192.168.0.117 jan 01 05:54:43 user NetworkManager[657]: [1672563283.9751] dhcp4 (wlp7s0): state changed new lease, address=192.168.0.117 jan 01 06:50:16 user NetworkManager[657]: [1672566616.9754] dhcp4 (wlp7s0): state changed new lease, address=192.168.0.117 jan 01 07:43:07 user NetworkManager[657]: [1672569787.9774] dhcp4 (wlp7s0): state changed new lease, address=192.168.0.117 jan 01 08:36:19 user NetworkManager[657]: [1672572979.9758] dhcp4 (wlp7s0): state changed new lease, address=192.168.0.117 jan 01 09:29:58 user NetworkManager[657]: [1672576198.9751] dhcp4 (wlp7s0): state changed new lease, address=192.168.0.117 jan 01 10:22:40 user NetworkManager[657]: [1672579360.9751] dhcp4 (wlp7s0): state changed new lease, address=192.168.0.117 jan 01 10:36:21 user NetworkManager[657]: [1672580181.1833] vpn[0x560c□□□□□□□□,80a□□□□□-36□□-4□□□-8□□□-52□□□□□□□□□,"VPN"]: starting pptp jan 01 10:36:21 user NetworkManager[657]: [1672580181.2288] vpn[0x560c□□□□□□□□,80a□□□□□-36□□-4□□□-8□□□-52□□□□□□□□□,"VPN"]: secrets: failed to request VPN secrets #3: No agents were available for thi> jan 01 10:36:30 user NetworkManager[657]: [1672580190.9402] vpn[0x560c□□□□□□□□,80a□□□□□-36□□-4□□□-8□□□-52□□□□□□□□□,"VPN"]: starting pptp jan 01 10:37:06 user NetworkManager[657]: [1672580226.5451] vpn[0x560c□□□□□□□□,80a□□□□□-36□□-4□□□-8□□□-52□□□□□□□□□,"VPN"]: dbus: failure: connect-failed (1)

sudo tail -f /var/log/syslog

it says LCP Timeout sending Config-Requests

Jan 1 11:02:15 user kernel: [79916.378096] Lockdown: systemd-logind: hibernation is restricted; see man kernel_lockdown.7
Jan 1 11:02:16 user NetworkManager[657]: [1672581736.7718] vpn[0x560c□□□□□□□□,80a□□□□□-36□□-4□□□-8□□□-52□□□□□□□□□,"VPN"]: starting pptp
Jan 1 11:02:16 user NetworkManager[657]: [1672581736.7722] audit: op="connection-activate" uuid="80a□□□-36□□-4□□□-8□□□-52□□□□□□" name="VPN" pid=1758 uid=1000 result="success"
Jan 1 11:02:16 user pppd[1138750]: Plugin /usr/lib/pppd/2.4.9/nm-pptp-pppd-plugin.so loaded.
Jan 1 11:02:16 user NetworkManager[1138750]: Plugin /usr/lib/pppd/2.4.9/nm-pptp-pppd-plugin.so loaded.
Jan 1 11:02:16 user pppd[1138750]: pppd 2.4.9 started by root, uid 0
Jan 1 11:02:16 user pppd[1138750]: Using interface ppp0
Jan 1 11:02:16 user NetworkManager[1138750]: Using interface ppp0
Jan 1 11:02:16 user NetworkManager[1138750]: Connect: ppp0 <--> /dev/pts/2
Jan 1 11:02:16 user pppd[1138750]: Connect: ppp0 <--> /dev/pts/2
Jan 1 11:02:16 user pptp[1138756]: nm-pptp-service-1138745 log[main:pptp.c:353]: The synchronous pptp option is NOT activated
Jan 1 11:02:16 user NetworkManager[657]: [1672581736.8685] manager: (ppp0): new Ppp device (/org/freedesktop/NetworkManager/Devices/12)
Jan 1 11:02:16 user systemd-udevd[1138755]: Using default interface naming scheme 'v249'.
Jan 1 11:02:16 user pptp[1138767]: nm-pptp-service-1138745 log[ctrlp_rep:pptp_ctrl.c:258]: Sent control packet type is 1 'Start-Control-Connection-Request'
Jan 1 11:02:16 user pptp[1138767]: nm-pptp-service-1138745 log[ctrlp_disp:pptp_ctrl.c:781]: Received Start Control Connection Reply
Jan 1 11:02:16 user pptp[1138767]: nm-pptp-service-1138745 log[ctrlp_disp:pptp_ctrl.c:815]: Client connection established.
Jan 1 11:02:17 user pptp[1138767]: nm-pptp-service-1138745 log[ctrlp_rep:pptp_ctrl.c:258]: Sent control packet type is 7 'Outgoing-Call-Request'
Jan 1 11:02:17 user pptp[1138767]: nm-pptp-service-1138745 log[ctrlp_disp:pptp_ctrl.c:900]: Received Outgoing Call Reply.
Jan 1 11:02:17 user pptp[1138767]: nm-pptp-service-1138745 log[ctrlp_disp:pptp_ctrl.c:938]: Outgoing call established (call ID 50121, peer's call ID 60626).
Jan 1 11:02:47 user pppd[1138750]: LCP: timeout sending Config-Requests
Jan 1 11:02:47 user NetworkManager[1138750]: LCP: timeout sending Config-Requests
Jan 1 11:02:47 user NetworkManager[1138750]: Connection terminated.
Jan 1 11:02:47 user pppd[1138750]: Connection terminated.
Jan 1 11:02:47 user charon: 13[KNL] interface ppp0 deleted
Jan 1 11:02:47 user NetworkManager[657]: [1672581767.8919] vpn[0x560c□□□□□□□□,80a□□□□□-36□□-4□□□-8□□□-52□□□□□□□□□,"VPN"]: dbus: failure: connect-failed (1)
Jan 1 11:02:47 user gnome-shell[1758]: Removing a network device that was not added
Jan 1 11:02:47 user pptp[1138756]: nm-pptp-service-1138745 warn[decaps_hdlc:pptp_gre.c:226]: short read (-1): Input/output error
Jan 1 11:02:47 user NetworkManager[1138750]: Terminating on signal 15
Jan 1 11:02:47 user NetworkManager[1138750]: Modem hangup
Jan 1 11:02:47 user NetworkManager[1138750]: Child process /sbin/pptp 150.162.0.66 --nolaunchpppd --loglevel 0 --logstring nm-pptp-service-1138745 (pid 1138753) terminated with signal 15
Jan 1 11:02:47 user pppd[1138750]: Terminating on signal 15
Jan 1 11:02:47 user pptp[1138756]: nm-pptp-service-1138745 warn[decaps_hdlc:pptp_gre.c:238]: pppd may have shutdown, see pppd log
Jan 1 11:02:47 user pppd[1138750]: Modem hangup
Jan 1 11:02:47 user pptp[1138767]: nm-pptp-service-1138745 log[callmgr_main:pptp_callmgr.c:245]: Closing connection (unhandled)
Jan 1 11:02:47 user pptp[1138767]: nm-pptp-service-1138745 log[ctrlp_rep:pptp_ctrl.c:258]: Sent control packet type is 12 'Call-Clear-Request'
Jan 1 11:02:47 user pptp[1138767]: nm-pptp-service-1138745 log[call_callback:pptp_callmgr.c:84]: Closing connection (call state)
Jan 1 11:02:47 user pppd[1138750]: Child process /sbin/pptp 150.162.0.66 --nolaunchpppd --loglevel 0 --logstring nm-pptp-service-1138745 (pid 1138753) terminated with signal 15
Jan 1 11:02:47 user pppd[1138750]: Exit.


My PPTP VPN is still not working, but I have a workaround with L2TP

Upgrading xl2tpd 1.3.12 to 1.3.16 breaks VPN connection

https://github.com/xelerance/xl2tpd/issues/230

1- Download: xl2tpd_1.3.12-1.1_amd64.deb from https://ubuntu.pkgs.org/20.04/ubuntu-universe-amd64/xl2tpd_1.3.12-1.1_amd64.deb.html

2- Go to the folder you have download the file and install the package with: sudo dpkg -i xl2tpd_1.3.12-1.1_amd64.deb you should see >> dpkg: warning: downgrading xl2tpd from 1.3.16-1ubuntu0.1 to 1.3.12-1.1

3- Make sure the version is now 1.3.12 running xl2tpd --version you should see >> xl2tpd version: xl2tpd-1.3.12

4- Reboot and try to connect your L2TP VPN

NotTheDr01ds avatar
vn flag
It's okay to include screenshots, but if you do so, it's also highly recommended to include the actual text, formatted in markdown code-blocks. See [here](https://meta.stackoverflow.com/a/285557/11810933) for many reasons why. Thanks!
Vinicius avatar
gd flag
I have replaced the images with text, thanks. I have managed to have L2TP working, but PPTP shows the same error and still does not work.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.