Skip to content

Instantly share code, notes, and snippets.

@alexllc
Last active February 12, 2023 07:33
Show Gist options
  • Save alexllc/333bc7e252d179bc62fa58b40662e688 to your computer and use it in GitHub Desktop.
Save alexllc/333bc7e252d179bc62fa58b40662e688 to your computer and use it in GitHub Desktop.
How to connect to L2TP/IPsec VPN for linux users

Connecting to L2TP/IPsec VPN client with Linux

CUHK VPN

(Tested on Manjaro, Ubuntu 18.04, Ubuntu 20.04)

Our school uses the L2TP/IPsec with PSK protocol, and I've read plenty of stackexchage and forum posts regarding issues with setting up L2TP/IPsec on a Linux system. After many trials and errors I managed to set it up, and helped friends and colleagues who use Linux as their PC. I haven't shared or replied to any threads about the solution I found, primarily because I don't really know why the other methods didn't work and why this setting in particular works 🤷 So here we go.

I am going to set this up with the GUI Networkmanger, which should be installed on your MANJARO distro by default, if not, run sudo pacman -S NetworkManager

Next, open up your Networkmanager by Systems Settings > Network - Connections

  1. Click (+) and select Cisco compatible VPN (vpnc)

  2. Fill in the following information:

Connection name: CUHK VPN (or anything else you like)

Gateway: vpn.cuhk.edu.hk

User name: yourComputingID (e.g. s1155xxxxxx for students, bxxxxxx for staff)

User password: yourOnePassPassword*

Group name: ipsec

Group password: ipsec-vpn

  1. (Optional) Check "All users may connect to this network", keep everything else default.
  2. Apply.

Since the Duo 2FA is now mandatory for all users, as soon as you click "Connect" next to your newly created VPN profile, you should head over to your Duo2FA app and confirm the setting. Check the links below for details.

References: Ofiicial CUHK Duo 2FA guide

CUHK VPN android guide

CUHK duo 2FA briefing

@alexllc
Copy link
Author

alexllc commented Mar 16, 2022

Hi, hi do you get the "group name"? I am trying to connect to CUHK CSE VPN, but I don't know the group name.

Hi, this gist was only for connecting to the ITSC VPN. As I am not from the CSE department, I don't have the credentials or details about that VPN. But I believe the staff responsible for the CSE VPN will be more helpful than the instructions I got for ITSC VPN setup.

@CyanFi
Copy link

CyanFi commented Mar 16, 2022

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment