Skip to content

Instantly share code, notes, and snippets.

@North-West-Wind
Last active January 11, 2024 09:49
Show Gist options
  • Save North-West-Wind/ca991c2e553fa2b7bdbe395fee67edff to your computer and use it in GitHub Desktop.
Save North-West-Wind/ca991c2e553fa2b7bdbe395fee67edff to your computer and use it in GitHub Desktop.
CUHK CSE VPN Linux Guide

The CUHK CSE VPN Linux Guide

The CUHK CSE page for the VPN doesn't have the best tutorial for Linux. In fact, they have none.

After a few hours combined of messing around, I have figured it out, and I'm sharing it with everyone in case you're also stuck.

This guide uses OpenVPN 3 as the client. If you want to use IPsec instead, use the scripts made by some former CSE students.

Do note that those scripts are 8 years old (at the time of writing) and I have not tested them, so good luck! Still want to use OpenVPN 3? Cool.

My Laptop

It runs Endeavour OS, but the solution should be similar for all distros.

Step 1: Get your .ovpn config file

  1. Go to https://openvpn.cse.cuhk.edu.hk
  2. Login with your CSE VPN account.
  3. Scroll down to the bottom of the page and click on "Yourself (locked something something)".
  4. The .ovpn file will be downloaded.

Step 2: Install the stuff

Install openvpn3 for your distro.

An Arch Linux example:

yay -S openvpn3

Alternative

If you are using KDE Plasma as your desktop environment, you can just use Plasma's integration.

  1. Open "System Settings".
  2. Go to "Network" -> "Connections".
  3. Click "Add new connection" (the + symbol).
  4. Scroll down and choose "Import VPN connection".
  5. Choose your downloaded .ovpn file.
  6. Put your CSE account details into the "Username" and "Password" fields.

Step 3: Connecting

openvpn3 session-start --config path/to/client.ovpn

Then login with your CSE account.
Or, if you are using the KDE Plasma way, just click "Connect" in the network applet.

Congratulations! You're now using the CSE VPN!

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