VPN for MacOS

General Information

Access Anywhere The VPN service allows students and employees to access school resources (Library, Z: Drive) from home as if directly connected to the PJATK network.

VPN Client Configuration

MacOS Ventura (13.0+) and newer

System Settings

  1. Click Apple Logo > System Settings > Network.
  2. Click (bottom right) > Add VPN Configuration > L2TP over IPSec.

Configuration

Enter the details:

FieldValue
Service NamePJATK
Server Addressvpn.pjwstk.edu.pl
Account NamesXXXXX (ID number)
PasswordStudent Password
Shared SecretPJATKvpn4Mac
Group NameEmpty

Routing

Follow the Adding Routing Paths section below.

Adding routing paths is necessary for the VPN connection to work properly.

Older MacOS Versions

Network Preferences

  1. Click Apple Logo > System Preferences > Network.
  2. Click + (plus sign).
  3. Select Interface: VPN, Type: L2TP over IPSec.
  4. Service Name: PJATK. Click Create.

Settings

Enter details:

  • Server Address: vpn.pjwstk.edu.pl
  • Account Name: sXXXXX

Click Authentication Settings:

  • Password: Your password
  • Shared Secret: PJATKvpn4Mac

Traffic Options

  1. Click Advanced.
  2. Uncheck “Send all traffic over VPN connection”.
  3. Click OK and Apply.

Adding Routing Paths

To access internal resources effectively:

Create Config File

Open Terminal and run:

sudo touch /etc/ppp/ip-up
sudo chmod 755 /etc/ppp/ip-up
When typing the sudo command, you may be asked for your password. Type your macOS user password, the password is not visible, press Enter to confirm.

Edit File

Open the file in nano editor:

sudo nano /etc/ppp/ip-up

Add Routing Script

Paste this content:

#!/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 on Service Name If you named your VPN connection something other than “PJATK”, update the grep "PJATK" line in the script above.

Save and Exit

Press Ctrl+X, then Y, then Enter.

Mapping Network Drives

Connect to Server

  1. Open Finder.
  2. Press Cmd + K (or Go > Connect to Server).

Enter Address

Enter one of the addresses below and click Connect. Log in with your sXXXXX account.

Replace sXXXXX with your student ID.