VPN for MacOS

Languages: plpolski

VPN for MacOS – access to the school network

A VPN service (Virtual Private Network) is available for students and employees. It allows access from any place on the Internet to school resources, as if the computer was connected to the PJATK network.

1a. Setup on macOS Ventura 13.0.0 and later

  • Click on the Apple logo in the upper left corner of the screen.
  • Select system preferences, from them we select the network.
  • In the lower right corner press the three dots, press add L2PT VPN configuration over IPSec
  • Display Name: Must be set to PJATK
  • Server address: vpn.pjwstk.edu.pl
  • The account name is sXXXXX ( where XXXXX is your student number).
  • In the Password field, enter your student account password
  • In the Shared secret field, enter: PJATKvpn4Mac
  • Leave the group name field blank.
  • Follow the next steps described below in the “Adding network routes”.

1b. Setup on macOS prior to Ventura

  • Click on the Apple logo in the upper left corner of the screen.
  • Select system preferences, from them select the network.
  • Select the plus sign in the lower left corner.
  • From the Interface menu, select: VPN.
  • VPN type: L2TP over IPSec.
  • Service Name: Must be set to PJATK
  • Click create.
  • Server address: vpn.pjwstk.edu.pl
  • The account name is sXXXXX ( where XXXXX is your student number).
  • Click on authentication settings.
  • In the Password field, enter your student account password
  • In the Shared secret field, enter: PJATKvpn4Mac
  • Click OK.
  • Select the Advanced Options and uncheck the option “Direct all traffic through VPN support”.
  • Click OK and Apply.
  • Follow the next steps described below in the “Adding network routes”.

2. Adding network routes,

To do this, we need to launch the terminal (Applications > Utilities > Terminal) and enter these two commands:

sudo touch /etc/ppp/ip-up
sudo chmod 755 /etc/ppp/ip-up

Then we run the created file for editing, for example with vim or nano:

sudo nano /etc/ppp/ip-up

And paste the following content into it:

#!/bin/sh
counter=$(/usr/sbin/scutil --nc list | grep "PJATK" | grep "(Connected)" | wc -w)
if [ "$counter" -gt 0 ] ; then
/sbin/route add -net 10.0.0.0/8 -interface "$1"
/sbin/route add -net 172.16.0.0/12 -interface "$1"
fi

NOTE, if the name of your VPN connection is not “PJATK”, change it in the second line of code.

We save the file (in nano we need to click ctrl + X, then Y and then enter confirming the name of the file).

Mapping network drives

First, open the Finder application and from the Go menu select the Connect to server… command. Alternatively, you can use the keyboard shortcut Command + k.

Then, in the newly opened window, enter the address of the network share in the Server address field and click the Connect button. Then authorization windows will pop up in which we will have to log in with domain accounts. The addresses of our network shares (of course you need to change the LOGIN to your login) are:

Disk Z: smb://win-zet.pjwstk.edu.pl/Users/LOGIN

Disk P: smb://win-zet.pjwstk.edu.pl/public

Disk WWW: smb://users.pjwstk.edu.pl/LOGIN

Languages: plpolski