How do I setup an L2TP VPN to access a Unifi Network on my Mac?

L2TP is a VPN standard built into macOS that allows you to securely connect over the internet to a company or home network and access files and applications on that network.

Step-by-step guide

To setup an L2TP client VPN on a Mac:

  • From the Apple menu, choose System Preferences...
  • Click Network to open the networking panel. 

  • Click on the + sign and Select VPN for the Interface, L2TP over IPSec for the VPN Type, enter a name that makes sense to you for the Service Name or keep it as VPN (L2TP) if you prefer and click Create

  • Leave Configuration as is (unless you're using them) and in the Server Address field enter the IP address of the server you've been given.
  • Enter the Account Name you've been given and click Authentication Settings...

  • Under User Authentication, click the radio button for Password and enter the password you've been given.
  • Under Machine Authentication, click the radio button for Shared Secret and the Shared Secret you have been given again.
  • Click OK

  • Finally click Advanced..., check Send all traffic over VPN connection, then click OK. Without this setting ticked, you will not route all your network traffic over the VPN and so will be accessing the internet insecurely. 

  • If you want to access the VPN connection from the menu bar check Show status in menu bar.
  • To connect, click Connect and to disconnect click on Disconnect (only visible if you're connected).

Problems?

Some network providers will prevent you from connecting to a VPN. If you find that sometimes you can connect from home, but can't connect from other locations whilst on other networks, it could be that the network provider is specifically blocking VPN connections. 

 

Only use the VPN when you are away from the location that the VPN connects you to, in other words, don't connect to the VPN if you are in the Office that the VPN connects you to as this will cause network problems for you (potentially slow, unreliable or no internet for you.