4

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
  • 90,100
  • 91
  • 213
  • 324
  • 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

9 Answers9

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
  • 90,100
  • 91
  • 213
  • 324
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
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
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!

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.

0

I have PopOS 20.04 fresh installed on my PC, and using PPTP my VPN works well, but after some OS updates it's broken, and never connect again. Later I know that my workplace VPN works best using L2TP.

Below are the steps that resolved my issue. You can try it.

  1. sudo apt remove --purge xl2tpd
  2. wget http://archive.ubuntu.com/ubuntu/pool/universe/x/xl2tpd/xl2tpd_1.3.12-1.1_amd64.deb
  3. sudo dpkg -i xl2tpd_1.3.12-1.1_amd64.deb
  4. sudo apt install network-manager-l2tp network-manager-l2tp-gnome
  5. sudo service xl2tpd stop
  6. sudo reboot

And after reboot

  1. Create VPN using L2TP
  2. Check "Use L2TP ephemeral source port"
  3. Click on "IPSec Setting" and enabled, enter the Preshared Key from your VPN Provider (in my case my Network Admin)

Hope my case could help you, cheers.

Kharis
  • 11