Home / Articles / Security / How VPN Works

How VPN Works? A Very Detailed VPN Guide for the Beginners

How VPN Works
A VPN is a service that creates an encrypted connection from your device to a VPN server through your Internet connection. Think of it as a tunnel through a mountain, in which your Internet service provider (ISP) is the mountain, the tunnel is the VPN connection and the exit is to the world wide web.

Virtual Private Network (VPN) services are somewhat of a hot topic nowadays since Internet privacy is coming under fire from many directions. Companies are trying to gather more data on their users to the extent that it is becoming overly intrusive while countries are divided on how to manage the situation

Want example? See this, this, this, and this.

For years we have been using major products such as Facebook, Google, Microsoft and more but rapidly advancing technology has tempted these companies to squeeze users account of every bit of information they can for commercial purposes.

And while governments may struggle to control the situation, in some cases it is they themselves who are guilty of the same sins that the corporates are getting in trouble for – intrusion of privacy and illegal collection of private data.

So, what can we as individual do to protect our privacy online? The answer leads us back to our topic of VPNs.

Table of Contents



VPN Offers & Discounts
NordVPN
> 63% off + Free 3 Months; Standard NordVPN starts $3.29/mo
Surfshark > 82% off; Connect & protect unlimited devices at $2.39/mo
ExpressVPN > Free 3 months when signup; Plan starts at $6.67/mo


What is a VPN?

A VPN is a service that creates an encrypted connection from your device to a VPN server through your Internet connection.

Think of it as a tunnel through a mountain, in which your Internet service provider (ISP) is the mountain, the tunnel is the VPN connection and the exit is to the world wide web.

There are some people who may mistake VPNs as alternatives to having an Internet connection, but this is incorrect.

Originally, VPNs were created to connect business networks together for more secure and convenient communications. Today, VPN service providers work hard to forward all your traffic to the Internet – bypassing government or ISP monitoring and even forced censorship in some cases.

In a nutshell, think of a VPN as a service that’s designed to help you gain full access to the Internet and protect you while doing it.

What Does a VPN Do?

The primary purpose of a VPN is to create a secure tunnel for your data to travel through to its servers before passing on to the Internet. This however, has resulted in some other benefits, such as location spoofing.

While that might seem insignificant to you, there are many times when location spoofing has helped people overcome geo-location barriers. Take the Great Firewall of China for example. The Chinese government heavily censors the Internet and many things we take for granted online are blocked in China. Only by using a VPN can China-based users access sites like Google and Facebook.

For peer-to-peer (P2P) users, aside from the risk of identification, you also run the risk of having your port maps identified through Torrenting. VPNs help mask all of this so that your open ports can’t be easily exploited.

Here's a list of VPN services that still work in China by CompariTech.

Advantages of using a VPN Connection

In short –

  • Anonymity
  • Security
  • Accessing geo-location blocked services (Netflix, Hulu, etc)

As I’ve mentioned, the first and foremost purpose of VPNs today is anonymity. By creating a secure tunnel from your device to their servers and encrypting the data that travels through that tunnel, VPNs effectively shield all your data activity.

Anonymity

This means that anyone trying to discover what you’re doing on the Internet, such as the sites you visit and so on won’t be able to find out much. VPNs are so much focused on anonymity that many of them today have taken to accepting payments that can’t be traced, such as crypto currency and gift certificates.

Location spoofing

Location spoofing came about as a side benefit of VPN services. Because VPN services have servers in many locations around the world, by connecting to those servers you can ‘spoof’ your location as being the same as that of the VPN server.

Expert tips

Some providers in the marketplace might not be honest with their service offerings. They claim to offer physical servers in varied locations, but some of them are actually virtual. In other words, you may be connected to a server located in one country, but receive an IP address assigned to another country. For instance, a server in China could actually be from the US.

This is bad because this means your data passes through multiple servers in different parts of the world before reaching the final destination. There is no guarantee that cybercriminals, secret intelligence agencies, or copyright infringement hunters have their hand in one of these intermediate servers.

To avoid this issue, users should conduct proper testing to verify the true locations of a VPN. Here are four tools you can make use of Ping Test Tool, Traceroute Tool, BGP Toolkit, or the Command Prompt Tool a.k.a. CMD on Windows.

– Hamza Shahid, BestVPN.co

Security

Many VPN services today are also beginning to implement greater security measures to benefit their users. It started out mainly to help block online data collection and tracking but has now expanded to include ad-blocking and in some cases even anti-virus solutions.

How Virtual Private Network Actually Works

It is a little difficult to describe how a VPN works unless a little technical detail is involved. However, for those who just want the basic concept, a VPN creates a secure tunnel from your device to the VPN server and then from there out to the world wide web.

In greater detail, the VPN first establishes a communication protocol from your device. This protocol will set the boundaries of how the data will travel from your device to the VPN server. There are a few main VPN protocols which are common, although each has their own advantages and disadvantage.

Common VPN Protocols

Although there are many communication protocols, there are some mainstream ones which are commonly supported irrespective of VPN service brand. Some are faster, some are slower, some more secure, others less so. The choice is yours depending on your requirements, so this might be a good section for you to pay attention to if you’re going to be using a VPN.

In Summary –

  • OpenVPN: Open source protocol which is of average speed yet offers strong encryption support.
  • L2TP/IPSec: This is quite common as well and offers decent speeds but is easily blocked by some sites which do not favour VPN users.
  • SSTP: Not so commonly available and aside from good encryption doesn’t have much to recommend itself for.
  • IKEv2: Very fast connection and especially good for mobile devices though offering weaker encryption standards.
  • PPTP: Very fast but has been poked full of security loopholes over the years.

VPN Protocols Comparison

VPN ProtocolsEncryptionSecuritySpeed
OpenVPN256-bitHighest encryptionFast on high latency connections
L2TP256-bitHighest encryptionSlow and highly processor dependant
SSTP256-bitHighest encryptionSlow
IKEv2256-bitHighest encryptionFast
PPTP128-bitMinimum securityFast

1. OpenVPN

OpenVPN is an open source VPN protocol and that is both its strength as well as its possible weakness. Open source material can be accessed by anyone, which means that not only can legitimate users use and improve on it, but those with not so great intentions can also scrutinize it for weaknesses and exploit those.

Still, OpenVPN has become very much mainstream and remains one of the most secure protocols available. It supports very high encryption levels including what is considered to most as ‘unbreakable’ 256-bit key encryption requiring 2048-bit RSA authentication, and a 160-bit SHA1 hash algorithm.

Thanks to it being open source, it has also been adapted for use on almost all platforms today, from Windows and iOS to more exotic platforms such as routers and micro devices like the Raspberry Pi.

Unfortunately, high security has its downsides and OpenVPN is often seen as being very slow. This however is more of a trade-off, since it is normal that the higher the encryption rates being used, the more time it will take to process data streams.

2. Layer 2 Tunnel Protocol (L2TP)

Layer 2 Tunnel Protocol (L2TP) is the de facto successor of Point to Point Tunneling Protocol (PPTP) and Layer 2 Forwarding Protocol (L2F). Unfortunately, since it didn’t come equipped to handle encryption it was often distributed together with the IPsec security protocol. To date, this combination has been seen as the most secure and having no vulnerabilities yet.

One thing to note is that this protocol uses UDP on port 500, which means that sites that do not allow VPN traffic can detect and block it easily.

3. Secure Socket Tunnelling Protocol (SSTP)

Secure Socket Tunnelling Protocol (SSTP) is one that is lesser known among regular people, but it is very useful simply because it has been fully tried, tested and tied into every incarnation of Windows since the days of Vista SP1.

It is also very secure, using 256-bit SSL keys and 2048-bit SSL/TLS certificates. It is also unfortunately proprietary to Microsoft, so it’s not open to public scrutiny – again, both good and bad.

4. Internet Key Exchange version 2 (IKEv2)

Internet Key Exchange version 2 (IKEv2) was co-developed by Microsoft and Cisco and was originally intended simply as a tunneling protocol. It therefore also makes use of IPSec for encryption. Its agility in reconnecting to lost connections has made it very popular among those who leverage on it for mobile deployment of VPNs.

5. Point-to-Point Tunnelling Protocol (PPTP) 

Point-to-Point Tunnelling Protocol (PPTP) is one of dinosaurs amongst VPN protocols. the oldest VPN protocols. Although there are still some instances of use, this protocol has largely fallen by the wayside due to large, glaring gaps in its security.

It has several known vulnerabilities and has been exploited by both the good and bad guys long ago, making it no longer desirable. In fact, it’s only saving grace is its speed. As I mentioned earlier, the more secure a connection is, the more likely speed is to see a decline.

Encryption Methods and Strength

The simplest way to describe encryption that I can think of is perhaps messing up information so that only a person who has the guide to how you messed it up can translate it back to its original meaning.

Take for example a single word – Cat.

If I apply 256-bit encryption to that one word, it would be completely scrambled and undecipherable. Even the most powerful supercomputer on earth would take millions of years trying to decrypt that single word with 256-bit encryption applied to it.

Also, the levels of encryption are exponential, so 128-bit encryption doesn’t offer half the security of 256-bit encryption. Although still formidable, experts believe that 128-bit encryption will soon be broken.

These encryption methods and strengths are normally applied automatically, depending on which application we use, such as email, browsers, or other programs. VPNs on the other hand allow us to choose what types of encryption we want, since the type we choose will affect our VPN performance.

In this way we can ‘adjust’ the performance of our VPN service. For example, some may prefer extreme encryption and be willing to sacrifice speed. Others may prefer speed and so accept a lower level of encryption.

All of this is necessary and affected by encryption because when you’re logged in to a VPN service, the data you send when trying to browse the Internet goes through the encrypted VPN connection.

My Personal VPN Experience

I have now been researching, testing and experimenting on VPNs for the better part of a year. While I may not be a technical expert at VPNs yet, I have for sure found out more than I’ve ever really wanted to about these services.

My experiments have included the use of VPNs on various platform, including their android mobile apps, browser plugins and with different usage models. Some I’ve been pleasantly surprised at, but some utterly disappointed in.

I have to say that at the end of the day, no matter the capabilities of a product, there is absolutely no reason for any of these companies to have bad customer service. And yes, I rate incompetence and sloth as ‘bad customer service’.

Example – My SurfShark user dashboard (Windows).

The Equipment

For the most part, my tests were carried out using either an open source VPN client or a VPN app installed on a Windows-based machine. These are usually fine, and I have found that it is usually the case whereby the hardware we have at home limits our VPN more than the service itself.

The most important thing I learned about equipment is that if you intend to deploy the VPN directly on your router, you need to be aware of one very important factor – your VPN must have a kick-ass processor. These are usually limited to the ‘oh-my-God’ price range of consumer wireless routers, and even then, are quite limited.

As an example, I tried a few VPNs on a lowly Asus RT-1300UHP which if fine for most homes. It certainly can handle even full gigabit speeds (via LAN) and up to 400+ Mbps on WiFi. Yet it only managed a throughput of about 10 Mbps once the VPN was set up. At that rate, the processor was already straining at 100% constantly.

The kind of router you need that we’re talking about is in the range of the ROG Rapture GT-AC5300 / Netgear Nighthawk X10 – Expensive and not the norm for most households. Even then, if your Internet speeds are fast – the bottleneck will remain your router.

The Internet Connection

I started out testing VPNs on a 50 Mbps line which was giving me close to advertised speeds – I usually got around 40-45 Mbps. Eventually I shifted to a 500 Mbps line for which I get around 80% of advertised speeds – normally 400-410 Mbps.

It was only when I shifted to a higher speed line that I realised many VPNs struggle to manage at such speeds due to a combination of factors. This includes the machine you run it on, the distance between you and the VPN server you choose, what encryption rates you prefer, and more.

ExpressVPN speed test results
Example – One of the speed test results I got from ExpressVPN.

What I’ve Used a VPN For?

1. Streaming

At first it was mostly speed testing, just to keep a track record as well as experiment. Once I had established a baseline, I began to test other download sites or streaming videos. For the most part, I found that almost all VPNs are capable of streaming 4k UHD videos.

2. Torrenting

Torrenting was tested as well, of course, and I found that a little disappointing. I think that once your home Internet speeds reach a certain point, you’ll find that the performance of your VPNs service drops dramatically unless you invest significantly into better infrastructure.

3. Gaming

I don’t really game much (at least not the games that matter for VPN performance) but I did take note of ping times. If you’re a gamer hoping to use a VPN to access a game that’s out of your country, you might be disappointed. Ping times increase a lot the further you are from the VPN servers, even if speeds are fast and stable.

Conclusion: Do you Need a VPN?

Personal privacy online is under siege from so many directions and it seems to have happened overnight. Gone are the days when we only had to worry about cyber criminals, but now we also must worry about companies and governments who want to steal our data for the same reason – to exploit for their own purposes.

Naturally, your need for a VPN would largely depend on which country you are in, since each has different threat levels. The question is not something which can be answered by a simple yes or no.

Size of the virtual private network (VPN) market worldwide in 2019 and 2027. In 2027, the global VPN market is forecast to reach 75.59 billion U.S. dollars (source).

However, from the rate of increase in value of the global VPN market, I will say that it is very likely you’ll need one sooner or later. It is past time that individual users started taking their privacy and security online for granted and look for ways to secure their information.

We have been complacently using the Internet much the same way in which we always have, just browsing as carefree as can be. True, viruses and Malware have made us more cautious, but not much has changed.

Personally, I feel that the adoption of a VPN service should be the next step each Internet user undertakes. There is a pressing need to break out of the mindset that we are not threatened by what we do online.

Take for example someone who just wants to go online and look for a few pictures of some cute cats. While doing that, information such as his/her browsing habits, likes/dislikes, location, and so much more is being collected by authorities or organizations. Isn’t that thought scary enough to compel some form of action?

So, I say yes, even if you think you don’t need a VPN – You really do.

FAQs on Virtual Private Network (VPN)

Do I need an internet connection to use VPN?

A VPN is designed to mask and protect your location and data, but you still require an Internet connection.

How much does a VPN service cost?

Like all service providers, VPN companies want you to stay with them for a long time, since that’s their income stream. Most VPN service providers offer various terms of payments such as monthly, quarterly and so on. Most times the longer the plan, the cheaper your monthly rate will be, but you will have to pay the entire contract in advance. Expect to pay between $9 to $12 per month on average for monthly contracts, with discounts of up to 75% for long term contracts. Here's the list of best VPN services where we compare the prices and features.

Will using a VPN slow down my internet speed?

VPNs are designed first and foremost to protect your identity and keep your data safe. Unfortunately, one of the side effects of encryption that is used to protect your data is that it slows down your Internet connection. As a rule of thumb, expect to achieve no more than 70% of your actual line speed when using a VPN. Other factors such as distance from VPN server, server load and so on will also affect your Internet speed while using a VPN.

How fast can VPN connections go?

Most VPN service providers will tell you that they will not limit your speed. However, there are other circumstances to consider as well. As mentioned above, expect to get no more than a maximum of 70% of your actual line speed.

How difficult is it to set up a VPN connection?

By right it should be as simple as installing an application and entering your username and password. Then all you must do is click a button and you’ll be connected to a VPN server. Unfortunately, this isn’t always the best solution and some connections may need to be tweaked for optimal performance. Many VPN service providers such as NordVPN, Surfshark and ExpressVPN will have tutorials on how to do this, failing which it’s time to get in touch with their customer service staff.

What devices can I run a VPN on?

This depends on which VPN service provider you sign up with. Almost all providers will support Windows, MacOS, and Linux along with mainstream mobile platforms. Many will also support router deployment (depending on model of router) while a few cater to more exotic devices such as the Raspberry Pi.

Since 256-bit encryption will slow my connection a lot, is it safe for me to use 128-bit encryption?

This is a little tricky, since both encryption rates are quite strong. The question you should be asking yourself should be, ‘How much is my privacy and online safety worth to me?’

Will anyone know I am using a VPN?

Some websites try to keep out VPN users and have ways to detect if an incoming connection is from a VPN server. Thankfully, VPNs are aware of this and have come up with countermeasures which help. Look out for service providers which offer Stealthing, or Server obfuscation.

Can I just use a VPN browser extension?

I’ve tried out a few VPN browser extension and have found that for the most part, these fall into two main categories. There are those which act as proxies and merely bounce your connection off a server, and some which act as a browser control for a full VPN app. The latter means you’ll still need a VPN app installed in order to use the extension. VPN browser extensions are usually not full VPN services.

Are VPNs legal to use?

Yes and No. Although most countries do not have laws against VPN usages, some outright ban it. In extreme cases, some countries not only ban VPN usage but also potentially jail VPN users. Thankfully, there are only a handful of countries where VPNs have been banned so far.

Am I completely untraceable with a VPN?

This largely depends on how safely you use your VPN connection and which provider you choose. There have been many cases whereby VPN users have been arrested after putting their faith in a service provider that eventually turned over user logs to authorities.

Can I be tracked with a VPN on?

In general you can’t be tracked while using a VPN unless it’s leaking data. VPNs create an encrypted connection between your device and a secure server. Outgoing connections adopt the server’s details, so websites or services see that as the incoming connection.

What are the disadvantages of VPN?

VPNs come with some disadvantages, but the most notable is that they sometimes affect latency. Websites or services may take longer to respond since your connection first needs to pass through the VPN server.

Does VPN work on Wi-Fi?

Yes, VPNs work on Wi-Fi. They're the best way to secure your data while using a public wireless hotspot. The reason is that VPNs provide end-to-end encryption, preventing data from being useful to anyone even if it’s leaked.

Is a VPN safe?

The short answer is yes — VPNs are safe. VPN services provide additional privacy and security. They encrypt your data and make it very difficult for anybody to monitor your online activity or track you.

Can police track VPN?

Most VPN services do their best to hide their customer's identities, but that doesn't mean you're completely anonymous. Some VPNs keep logs of user activity, which they may hand over to law enforcement agencies if demanded via a warrant or court order.

How much does a VPN cost?

VPNs are available in various forms, ranging from free to paid. The best VPNs will cost money but provide all the features you need to protect your privacy — and much more. Most VPN services cost anywhere between $4 to $12 per month for a subscription plan.

Does a VPN work on all my devices?

VPNs will work on most mainstream devices like PCs, laptops, and smartphones. In some cases, VPN providers will support additional platforms like the Xbox, PlayStation, or even a range of smart TVs.

How do I setup a VPN?

The easiest way to get a VPN running is to install the app provided by the VPN. Once you’ve installed it on your device, simply launch the app, sign in with your credentials, and choose a server to connect to.

Does VPN work on mobile data?

Yes, VPNs will work on mobile data. It’s essentially the same as using the VPN on WiFi or a direct connection. Using a VPN on your phone or tablet gives you an extra layer of protection when connected to public WiFi or cellular data.

Does VPN protect from hackers?

Most VPNs provide standard security and privacy services, but some offer greater protection against hackers. NordVPN, for example, includes threat protection that prevents you from visiting malicious websites and scans the files you download.

Who needs a VPN?

A VPN is helpful for anyone who wants to keep their browsing activities private and secure. But it's a perfect tool for those who travel, especially since it allows you to access local media services from anywhere.

Photo of author

Article by Jerry Low

Keep Reading