Convert Your Old Mac Into a Cheap VPN With OS X Server

VPN subscriptions cost money, and they often require a little research to find out if they are legal . If you have an old Mac, you can use it by turning it into the simplest DIY VPN, perfect for browsing securely on public Wi-Fi or grabbing files from your home computer on the go.

What do you get

For those who don’t know, VPN stands for Virtual Private Network. A VPN is a group of computers connected to a common network, usually the Internet. VPNs can be used by your office so you can access your work computer from home, but they are also useful for securing public Wi-Fi in a coffee shop or hotel.

When you’re done with this project, you will have your own personal VPN, accessible from any computer, both on and off your home network. Your VPN will be able to act as a secure means of browsing the web and connecting to your home network from anywhere, so you can access your files wherever you are. You can do it all with $ 20 software that works on any Mac.

Plus it’s very simple. Deploying your own VPN usually means tricky OpenVPN setup , but OS X Server makes this process a lot easier – you don’t even have to go into the command line. If you have an old Mac that collects dust and $ 20 to spend on software, you can get this VPN up and running in no time.

What do you need

Step one: connect everything and boot the OS X server

You will need a wired connection between your Mac and your router for the fastest and most reliable connection possible, so before doing anything else, connect your Mac to your router using an Ethernet cable.

After that, head over to the Mac App Store on your old Mac and upgrade to OS X El Capitan if you haven’t already. Then grab a copy of OS X Server from the App Store. OS X Server is just an application, not a complete operating system, so installation should be done with a single click.

If your Mac does not support El Capitan, you can still download OS X Server here , but we have not tested these instructions with every version of OS X, so they may be slightly different. Basically, your mileage may vary.

Step 2. Register for a dynamic DNS address

Then you need to get the public DNS address for your old Mac in order to access the server from afar. You can use your home IP address (e.g. 12.345.678.9), but chances are your ISP changes that IP address periodically, making the domain name (jimsVPN.crabdance.com) infinitely better – it’s easy to remember. and it’s always the same.

If you have your own website, chances are good that your domain provider offers dynamic DNS for free ; otherwise, you will need to subscribe to the service. We recommend FreeDNS because it’s free, but you have other options as well .

  1. Register for an account with FreeDNS and verify your email address.
  2. Click Dynamic DNS .
  3. Click Add.
  4. Enter the subdomain name (it could be anything, although for simplicity you can use something like jimssecretVPN) and click the domain name you want (again, it could be any of them).
  5. Click Save.
  6. Make a note of your domain name (it will be something like jimssecretVPN.crabdance.com).

You now have a permanent address for your VPN, so you can connect to it from any computer on any network around the world.

Step 3. Configure port forwarding on the router

Before you can set up a VPN on OS X Server, you need to configure your router to allow incoming connections on the correct ports. To do this, you enable port forwarding . This is the hardest part because the process varies from router to router. We’ve covered in detail how to set up port forwarding , but let’s take a general overview of the process:

  1. Go to your router’s admin page from your web browser. This is usually something like 192.168.1.1 . If you’re not sure which one you have, you can usually find the information on a sticker on your router (if not, check your router manual or google it).
  2. Find the DHCP or static lease section. Before we do anything, you need to reserve your Mac DHCP (sometimes called static lease) so that its local IP address doesn’t change. This process varies from router to router, but we’ll describe how to do it here . If your router doesn’t have this option, you can give your Mac a static IP address instead . Make a note of the new Mac IP address as you will need it below.
  3. Now find the port forwarding section. Depending on your router and firmware, it is usually located in a separate tab, firewall, NAT, or virtual servers.
  4. This is where you enable port forwarding. On the port forwarding page, you will usually find a place to enter information such as port from, protocol, IP address, and port to. VPN OS X Server requires four open ports to run: UDP 500, UDP 1701, TCP 1723, and UDP 4500. Add these four ports as shown in the screenshot above. Save the settings when finished.

Thanks to this, your home VPN server is now open to the Internet at large, so you can access it from anywhere. Let’s do the rest.

Step four: set up your server

Remember that Dynamic DNS account we created earlier? Now you need to enable it on your Mac so you can connect to it when you are away from home:

  1. Start OS X Server on your old Mac.
  2. Click your computer name in the left menu.
  3. Click “Edit Hostname …” and click “Next” when prompted.
  4. Click Internet and click Next.
  5. In the Host Name field, enter the domain name you registered in the second step, then click Finish.
  6. When prompted, click “Configure DNS” and let it automatically start and configure DNS. You do not need to change any of these parameters.

That’s it for the server side. OS X Server’s auto-settings should work for most people.

Step five: start the VPN

It’s time to finally launch this VPN. This part is pretty simple:

  1. Click the VPN section in the sidebar in OS X Server.
  2. The default options should have filled in most of what you need, but if not, make sure your VPN hostname matches the hostname you entered in step four.
  3. Create a Shared Secret password. Think of a password here that you will remember, it will need to be entered on any device from which you are trying to connect.
  4. Find the “Client Addresses” section and click “Edit Addresses”. These are the IP addresses that your server will distribute to computers connected to the VPN. By default, it should already have your network IP address entered (something like 192.168.1.xx ). Set the last three digits to some high value, for example 100, so that it reads 192.168.1.100 (or whatever network you have). This will prevent any VPN connection issues interfering with other connections on your network.
  5. Set VPN to On.

After about 10-20 seconds, the status should change to “Available on [your hostname]”. This means that you are all set and ready to go.

How to access your VPN from other devices

Now that your VPN is up and running, you need to configure other computers and mobile devices to route traffic through them. Remember that a VPN slows down your internet connection, so only use it when you need to, such as when you are on an unsecured public network or when you need to access files from your home network.

You need to configure each of your devices separately. No matter where you connect from, the information in your account is always the same. Your username is the username you use to log in to your Mac, and password is the password to log in to your Mac. You also have a Shared Secret, which is the second password that you set in step five. This process is very different for different devices, but here are the main ones:

Windows 10

  1. Click Start> Settings.
  2. Open network and Internet.
  3. Click VPN.
  4. Click Add VPN Connection.
  5. Fill out the form with your VPN information, including the public IP address you set in the first step, your password, account, and shared secret. When finished, click Save.
  6. Select the VPN you created and click Connect.

Mac

  1. Open System Preferences> Network.
  2. Click the + sign.
  3. Select VPN, then select L2TP.
  4. Enter your server address and account name, then click Authentication Options.
  5. Enter your password and shared secret, then click OK.
  6. Click Connect.

iOS

  1. Tap Settings> General> VPN.
  2. Click Add VPN Configuration.
  3. Enter all your account information including type (L2TP), server, account, shared secret, and password.
  4. Tap Save.
  5. Set the status to On.

Android

  1. Tap Settings> Wireless & Network Settings> VPN Settings.
  2. Select Basic VPN and then Add VPN.
  3. Select Add L2TP / IPSec PSK VPN.
  4. Enter your server address, account information, shared secret, and password.

Congratulations! Your VPN is up and running, and all of your devices are routing their traffic securely through it. You can always check the status of your VPN on OS X Server in the VPN tab or the overview tab under your computer name.

More…

Leave a Reply