how to setup a vpn

A Virtual Private Network (VPN) can make you secure and private online. However, setting up a VPN can be frustrating for those with no prior VPN experience. If youve tried installing a VPN on one of your devices before, you know that it can be difficult and time-consuming to figure out. But dont worry! This simple guide will teach you how to set up VPN connections on any device in just a few minutes!

Skip the manual setup and get a VPN app

Before diving in, does manually setting up a VPN sound like a daunting task? The best option is to use a VPN service provider that offers VPN apps that you can set up with a double-click of a button. Surfshark VPN offers applications for a wide range of devices, so you don’t have to worry about manually setting up your VPN or reading the rest of this guide.

Setting up a VPN manually

Note: It is not possible to set up a VPN without anyone providing you a server. These guides are for using certificates provided by your VPN provider (You can find Surfshark’s on your account page).

So, the first thing you should do is pull these certificates for your device and OS. You’ll usually find them on your VPN provider’s account page.

Now, let’s see what we can do with them.

How to set up a VPN on Windows

Most VPN services provide a Windows app. Once you allow the app access, it will automatically set up the devices. If your VPN company doesnt offer a VPN app, heres how to set up a VPN using IKEv2/IPSec for Windows:

  1. Click the Windows button. Navigate to Settings > Network & Internet. Then select VPN. Click Add a VPN connection.
  2. Select Windows (built-in) as your VPN provider in the menu field. This sets your VPN Type to Automatic. You can choose other protocol options (we recommend sticking to IPSec/IKEv2 as no other option is as secure).
  3. Under Connection Name, give your VPN a name. Fill in the remainder of the blanks with your VPN provider’s certificate details. Make sure to Save.
  4. Return to the VPN settings to get connected. Select your VPN by clicking on its name.
  5. The next step is optional but highly recommended. Go to Advanced Options and enter a username and password for further security. Here, you can also change the connection settings, clear your sign-in information, or set up a proxy. 
  6. Select Connect.

Note: If you prefer OpenVPN, here’s how to set it up (it is meant for Surfshark, but should work for any provider).

How to set up a VPN on Mac

Before setting up your VPN manually on a Mac, make sure your VPN provider doesn’t offer a Mac app for setting it up automatically. If your provider doesn’t have an app, here is how to set up a VPN manually using the IKEv2 VPN protocol: 

  1. Navigate to System Preferences > Network.
  2. Click the + icon on the bottom left, then select your VPN from the Interface drop-down box.
  3. Use your VPN provider’s details to fill out the VPN Type and Service Name fields.
  4. Click Create. Fill in the relevant fields with the VPN server IP, remote ID, and local ID.
  5. Select Authentication Settings. Enter your VPN’s username and password, which you can configure in your VPN app.
  6. Click OK, then Connect.

If you want to know more, we have all you need to know about setting up a VPN on macOS. 

How to set up a VPN on Linux

Manually setting up a VPN on Linux takes time, so be sure your VPN provider doesn’t have a faster method, like a dedicated Linux VPN app, before getting started. If that isn’t the case, here’s how to manually set up a VPN on Linux using OpenVPN:

  1. Open the terminal with Ctrl + Alt + T. Install OpenVPN first. To grab the packages, execute the following command: sudo apt-get install openvpn unzip. Enter your computer’s administrator credentials if asked for a password.
  2. To access the OpenVPN directory, run the following: cd/etc/openvpn
  3. Download your VPN provider’s OpenVPN configuration files. If you know where those files are, run the command: sudo wget (replace the URL with your provider’s VPN configuration file location).
  4. Extract the configuration files from the zip folder with the command: unzip configs View the list of available servers with the command: ls
  5. Connect to one of the listed servers using the following command: sudo openvpn [filename] (example: sudo openvpn udp.ovpn).
  6. Contact your VPN provider if you are asked for service credentials. These are NOT your VPN account username and password.
  7. Once you see Initialization Sequence Completed in your Terminal Log, your connection is successful.

Still have questions? We have answers about how to set up a VPN on Linux.

How to set up a VPN on Android

Setting up a VPN on an Android device is easy. But if youre looking to manually set it up rather than allowing an app to automatically configure VPN on Android for you, heres how to go about it:

  1. Get your provider’s OpenVPN configuration files. Extract the files to any directory.
  2. Download an OpenVPN client. For maximum security and convenience, use OpenVPN Connect. Once downloaded, select OVPN Profile.
  3. Open the menu in the left top corner. Click Import on the top right and open the configuration files folder you unzipped previously.
  4. Fill in the details:
  5. Connect by clicking your new profile. Click OK if you’re asked if you trust the source of this service. 

How to set up a VPN on Android TV

Some VPN services provide Android TV apps. Simply search for your VPN provider’s app on the Android market. If your VPN provider doesn’t offer a standalone app, you’ll need to do it manually with an OpenVPN GUI :

  1. On your Android TV, download OpenVPN Connect and Google Chrome from the Google Play Store.
  2. Download the OpenVPN configuration files from your VPN provider’s website.  If you recently installed Google Chrome, you’ll need to allow it to write files to your device.
  3. To import, open OpenVPN Connect and click the downward-pointing arrow in the top right-hand corner.
  4. Pick the configuration files you have downloaded from your VPN service provider’s website and save them.
  5. Navigate back to your profile screen, click the newly uploaded file, and enter your VPN service credentials (These are not your usual credentials. You’ll need to get them from your provider). Click OK.

Note: The OpenVPN GUI is usually used with a touch-screen or mouse; it might be difficult to maneuver with a gaming controller or remote. Also, you must re-open the OpenVPN software to disable the VPN or change VPN servers.

 Check out our guide if you want to know more about setting up a VPN on Android TV. 

How to set up a VPN on iOS

While downloading an iOS VPN app directly from the App Store is the easiest way to set up your iOS mobile devices, heres how to do it manually with the IKEv2 protocol: 

  1. Download the IKEv2 protocol certificate from your service provider. Surfshark’s can be downloaded from this page.
  2. Select Settings. A Profile Downloaded tab should appear beneath your profile tab. Click on it. After the download, click Install on the top right of the prompt.
  3. Your device will ask you to trust your providers root certificate. To do that, click Install on the upper right corner again. Click Done.
  4. To select a VPN server, you will need the server’s hostname and service credentials. This is not your regular login information, so ask your provider or find Surfsharks here.
  5. After copying the hostname, go to Settings > General > VPN > Add VPN Configuration.
  6. You will need to fill out some crucial information:
    • Type – IKEv2.
    • Description – name your connection how you like.
    • Server – paste the hostname of the VPN server that you got in Step 2.
    • Remote ID  – enter the same hostname as in the Server line.
    • Local ID – you dont need to enter anything.
    • User Authentication – select Username.
    • Username – the credentials username you got in Step 2. 
    • Password – the password of the credentials you got in Step 2.
  7. After that, click Done. To connect, simply slide the Not Connected button to Connect.

Need more information? Check out our guide on setting up a VPN on iOS devices.

How to set up a VPN on Firestick

The best way to use a VPN on Firestick is to download a VPN provider’s native app. Connecting manually requires more work. But, it’s doable with the Firestick’s Android APKs! Here’s how to set up a VPN connection on Firestick: 

  1. Go to Settings > Device > Developer Options. Enable Allow Apps from the Unknown Sources option.
  2. Now navigate to the Search screen, and type in Downloader.
  3. Install and Launch the Downloader.
  4. Once you reach the main page, select the URL address bar and type in the website for your VPN services Android APK download. (For example,
  5. Select Download.APK if it doesnt start automatically.
  6. Once downloaded, launch the installer and follow through with the prompts. Youll be required to add in your credentials for your VPN service (ask your provider for these, or get Surfsharks on the account page).
  7. When completed, youll want to go back to Settings > Device > Developer Options, then disable Allow Apps from Unknown Sources.

How to set up a VPN on Apple TV

Apple makes it difficult to modify anything on its products. You’ll need smart DNS to use a VPN on your Apple TV. Verify that your VPN service provider has smart DNS enabled and provides you with the required IP address before following these steps:

  1. Go to Settings > Network.
  2. Select the connection your Apple TV is currently using to connect to the internet. In most cases, youll select Wi-Fi.
  3. Click on the network youre connected to on the next screen.
  4. Select Configure DNS. Select Manual under Configure DNS.
  5. Enter the IP address your VPN Service provider gave you for smart DNS use.

Read our dedicated guide to learn how to set up a VPN on Apple TV.

Setting up Smart DNS on Xbox and PlayStation

Gaming consoles don’t support virtual private networks, but you can easily set up your Xbox or Playstation to use one if your VPN provider supports smart DNS. Smart DNS is not a VPN client and does not provide an encrypted tunnel, but it can unblock material like a VPN. Some VPN providers offer apps for manual setup on Xbox, Samsung TV, and other devices. Here’s how to do it manually: 

How to set up Smart DNS on PlayStation

  1. Go to Settings > Network > Set up Internet Connection. Depending on your connection, choose Wi-Fi or LAN Cable.
  2. Select Custom for the internet connection setup.
  3. Select Automatic in IP Address Settings.
  4. For DHCP Host Name, choose Do Not Specify
  5. Click Manual on DNS Settings.
  6. Select Primary DNS, enter your VPN provider’s smart DNS IP address, then click Done. Smart DNS may be enabled in your Surfshark account.
  7. Click Next when prompted for the Secondary DNS address.
  8. Select Automatic in MTU Settings.
  9. Select Do Not Use use for Proxy Server.
  10. Test your internet connection. Then, turn off your PS4 and then restart it after 30 seconds.

See our guide for more information about setting up a VPN on PlayStation.

How to set up Smart DNS on Xbox 

  1. Navigate to Settings > Network > Network Settings > Advanced Settings > DNS Settings.
  2. Select Manual for IPv4 DNS.
  3. Enter your VPN’s smart DNS IP address. If you have a secondary DNS, enter it. In the DNS Settings view, under DNS, you’ll notice your new IP address.
  4. Update your device’s location. This update ensures that the DNS of the VPN server address you’re visiting matches your physical location. Select System > Language & Location. Set your device’s location to the server you’re trying to connect to, or rather, the DNS location you’re imitating.
  5. Restart your Xbox.

How to set up a VPN on your router

Setting up a VPN on your router has several benefits. First, you won’t have to bother about getting all of your devices connected to a VPN on your home network. By connecting the VPN to your router, you protect your whole network. 

Plus, you can bypass website restrictions and prevent surveillance from internet service providers! A VPN on a router isn’t as straightforward as downloading VPN apps, and the process differs depending on the type of router, but we do have a dedicated guide for it, see:

How to set up a VPN on a router.

Even if you don’t use Surfshark, the process should be fairly similar, if not identical.

Final thoughts: Should I set up a virtual private network on my device?

In today’s environment, protecting your privacy, data, and internet traffic should be a top priority, especially when it comes to your home or Wi-Fi network. Technology has made it possible to do so on any device. Setting up a Virtual Private Network connection is straightforward. So, treat yourself to a little bit of digital safety and privacy.

If you’re still undecided, Surfshark makes configuring numerous devices a breeze. With applications for almost every operating system, platform, browser, and device, it will be uncommon that you need to go through the manual settings described above. Even then, Surfshark offers a 24/7 customer care crew that can assist you. Get Surfshark if you want a VPN subscription that easily works for all your devices.

Download easy-to-set-up VPN apps

With a 30-day money-back guarantee

Get Surfshark