3

I just updated to 22.04 from 20.04 and my l2tp vpn stoped to work, tried some tutorials making a purge to xl2tpd and downloaded a old version but still not working, is there any workaround? i work remotely and need to activate vpn to connect to the services.

sudo apt remove --purge xl2tpd
wget http://archive.ubuntu.com/ubuntu/pool/universe/x/xl2tpd/xl2tpd_1.3.12-1.1_amd64.deb
sudo dpkg -i xl2tpd\_1.3.12-1.1\_amd64.deb
sudo apt install network-manager-l2tp network-manager-l2tp-gnome
sudo reboot

added credentials again => failed to activate network connection

Pilot6
  • 88,764
  • 91
  • 205
  • 313
Daniel Favero
  • 39
  • 1
  • 1
  • 2
  • 1
    There is a new xl2tpd package in 22.04 Updates to replace the broken xl2tpd ( https://packages.ubuntu.com/jammy-updates/xl2tpd ). If it still doesn't work, you have some other issue and is hard to tell without looking at the output of `journalctl -b --no-hostname _SYSTEMD_UNIT=NetworkManager.service + SYSLOG_IDENTIFIER=pppd` – Douglas Kosovic May 08 '22 at 06:41

8 Answers8

3

I have also encountered the same issue after upgrading popos to 22.04. Below are the steps that resolved my issue. You can try it.

Step 1

sudo apt remove --purge xl2tpd

Step 2

wget http://archive.ubuntu.com/ubuntu/pool/universe/x/xl2tpd/xl2tpd_1.3.12-1.1_amd64.deb

Step 3

sudo dpkg -i xl2tpd\_1.3.12-1.1\_amd64.deb

Step 4

sudo apt install network-manager-l2tp network-manager-l2tp-gnome

Step 5

sudo service xl2tpd stop

Step 6

sudo reboot

  • For me, neither this answer nor the Pilot6's answer worked. The command mentioned by Douglas Kosovic showed `Received out of order control packet on tunnel` so I followed https://github.com/xelerance/xl2tpd/issues/136 but nothing worked. – umitu May 31 '22 at 10:58
  • this didn't work for me – caduceus Oct 18 '22 at 07:16
  • Worked like a charm for me! – Ben Oct 31 '22 at 11:48
2

Liker our friend said:

sudo apt remove --purge xl2tpd
wget http://archive.ubuntu.com/ubuntu/pool/universe/x/xl2tpd/xl2tpd_1.3.12-1.1_amd64.deb
sudo apt install ./xl2tpd_1.3.12-1.1_amd64.deb 
sudo apt install network-manager-l2tp network-manager-l2tp-gnome
systemctl restart xl2tpd

Works on, ubuntu 22.04 with Mikrotik VPN Router.

Pilot6
  • 88,764
  • 91
  • 205
  • 313
0

you can find the solution here https://www.reddit.com/r/Ubuntu/comments/u8uwzv/ubuntu_2204_lts_vpn_l2tp_stops_working/

the problem is newer xl2tpd likely doesnt compatible with l2tp

  • This is not an answer, this is a comment. It's fine to link to a post but this provides no value to other users. At least provide the fix in your answer or provide something that won't force other to go looking for the solution. – Jeremy May 12 '22 at 17:58
0

This solved it for me:

  • sudo apt install golang-go
  • go install "github.com/katalix/go-l2tp/...@latest"
  • sudo mkdir /usr/local/sbin
  • sudo cp go/bin/kl2tpd /usr/local/sbin

In that case, the Network Manager uses kl2tpd instead of xl2tpd.

andyrandy
  • 101
  • 2
0

I followed the instructions to use xl2tpd-1.3.12, as other uses have suggested, and also had to uncheck the IPsec Phase1 and Phase2 Algorithms. Previously I was using Phase1 Algorithms: 3des-sha1-modp1024 and Phase2 Algorithms: 3des-sha1. The defaults seemed to work just fine.

Scott
  • 1
0

try to remove libreswan!

sudo apt remove libreswan

I have the same problem.

sudo apt remove --purge xl2tpd
sudo apt remove  libreswan
wge  http://archive.ubuntu.com/ubuntu/pool/universe/x/xl2tpd/xl2tpd_1.3.12-1.1_amd64.deb
sudo dpkg -i xl2tpd_1.3.12-1.1_amd64.deb
sudo apt install network-manager-l2tp network-manager-l2tp-gnome
sudo reboot -f
...
sudo apt-mark hold xl2tpd
Eric Li
  • 1
  • 1
  • This does not provide an answer to the question. Once you have sufficient [reputation](https://askubuntu.com/help/whats-reputation) you will be able to [comment on any post](https://askubuntu.com/help/privileges/comment); instead, [provide answers that don't require clarification from the asker](https://meta.stackexchange.com/questions/214173/why-do-i-need-50-reputation-to-comment-what-can-i-do-instead). - [From Review](/review/late-answers/1234215) – David Jul 02 '22 at 21:56
0

I also encountered the same issue while upgrading the Ubuntu version to 22.04

This is what helped me to resolve the issue.

Install this package first -

sudo apt-get install libreswan network-manager-l2tp  network-manager-l2tp-gnome resolvconf

In IPsec Settings, enable Enforce UDP encapsulation and in PPP settings, only enable MSCHAPv2

Hope this helps!

Prince Kukreja
  • 305
  • 1
  • 2
  • 10
0

you must use Point-to-Point Protocol (PPP) connection. In the context of VPNs, PPP is often used as the underlying protocol for L2TP/IPsec connections.

To create a new PPP configuration file for an L2TP/IPsec VPN connection, you can use the pppd command with a text editor to manually create the configuration file. Here's how:

Open a terminal window.

  1. Open a terminal window.

  2. Create a new configuration file in the /etc/ppp/peers directory with a unique name, such as myvpn:

    sudo nano /etc/ppp/peers/myvpn

  3. Add the following lines to the configuration file:

ipparam myvpn
name <vpn_username>
password <vpn_password>
remotename <vpn_server_name>
require-mschap-v2
refuse-pap
refuse-eap
refuse-chap
noauth
idle 1800
mtu 1410
mru 1410
defaultroute
persist
ipcp-accept-local
ipcp-accept-remote
noipdefault
usepeerdns

Replace <vpn_username>, <vpn_password>, and <vpn_server_name> with the appropriate values for your VPN connection.

  1. Save the file and exit the editor.

  2. To establish the VPN connection, use the following command:

    sudo pppd call myvpn

Then you can run vpn connection.