Powered by
/src$ make
  • Home
  • About
  • Directory
  • Contact
  • Home
  • About
  • Directory
  • Contact

What Is a VPN? How Do They Work? Setting Up Our Own.

12/30/2017

 
(Note: It's recommended to read the article on How The Internet Works before reading this article. It'll really help increase your understanding.)
To watch the youtube video where I explain this topic, please click here.

What Is a VPN?

A VPN (Virtual Private Network) is a method for making an encrypted connection to a computer/server on another network over the internet, and sending all (or most) internet traffic to go through that connection. 

For example, if we're on our phone at a coffee shop and we're using their wifi, it's possible that everything we do online (visiting websites, logging in to an account, making posts etc.) can be intercepted by hackers (or whoever is providing the internet). Think about it, everything we do is passing through someone else's wifi/router, as seen on the picture to the right. If the website/app we're using doesn't have SSL implemented, then anyone looking at the data packets can see plain-text information about what we post. That means they can see our username and password for the websites we visit. That's bad.
Picture
When on public wifi, anything we send to the internet could also be seen by a local hacker.
Well, that's why VPNs come in handy. VPNs encrypt your data, send it to a VPN server (which is just a special computer on a trusted network) which then unencrypts the data and proceeds to do exactly what we were going to do with it before, as seen in the picture below. (Follow the colors to see what's happening! Start from the bottom left.)
Picture
A VPN works by encrypting your data right on your device, and sending that data to the VPN Server. That VPN server unencrypts the data, and sends it to the website's server like you normally would. The difference is, the hacker on your local network only sees encrypted (inaccessible) data now. (Hopefully, the VPN network is safe and has no hackers on it.)

Of course, the whole purpose of a VPN is predicated on the VPN's network being secure. (If there's a hacker on the VPN's network, then there's no point in using a VPN at all.) 
The theory behind the VPN also comes with some additional benefits. Let's look at the reasons to use a VPN.

Why/When To Use a VPN

There are three main reasons to use a VPN:

1. Security - If you're away from home and on someone else's wifi, then the websites you visit and anything you do (ex. login, post information) can be intercepted by a hacker or by the network owner. If you use a VPN, then all the information on your device is encrypted, meaning that anyone who intercepts the data won't be able to do anything useful with it. 

2. To be on a certain network - VPNs basically make it so that your device is "on" the VPN server's network. There are three reasons this could matter:
  • You're at home and want to access files from your work network.
  • There are region/local locks for something you're accessing, and a VPN would let you bypass it. For example, a country block for viewing a youtube video. Or perhaps the network you're on blocks a certain website or activity (such as in school or at work). Using a VPN can bypass this.
  • Personally, I pay for cable and internet as a package at my house. Sometimes when I'm away from home, I'd like to use my Cable/ISP's app/website to stream a TV show or sports game so that I can watch it on my phone/laptop/whatever. The problem is, the app usually only allows you full access if you're at home on the home network. (They know.) Using a VPN tricks the app into thinking that I'm on my home network, and will give me full access to my cable provider's apps.

3. To hide your activity - Using a VPN hides the activity from the wifi/network that you're on. This not only hides it from the network owner or hackers, but also hides the activity from the network ISP. This is useful in cases where people want to use VPN's to download copyrighted content without getting in trouble with their ISP (ex. torrenting). (I don't recommend this, by the way.)

Those are the main reasons for using a VPN. . We'll be focusing on reasons (1) and (2) as the motivation behind creating our own VPN. 

How Can We Make Our Own VPN Server?

Let me preface this by saying: I don't know of any paid VPN solutions. ("Paid solution" meaning that you pay to connect to someone else's VPN server.) I'm not going to recommend any, and I personally wouldn't use them since I don't know whose computers I'm connecting too. (That defeats the entire purpose of being secure, lol...)

Personally, I like to set up an old laptop up, a cheap Raspberry Pi, or even my main desktop up as a VPN server so that when I'm away from home, I can still be on my home network. However, it is possible to create your own VPN server on a cloud hosting service, such as AWS or Digital Ocean. (If you trust their networks.)

There are two things we need to do to make a VPN server:
  1. Actually set up a computer/laptop/Raspberry Pi/cloud server/whatever with the proper configuration to accept incoming traffic.
  2. ​Set up the port forwarding in our router. (Did you see the "VPN Network's Router" box in the picture above? Yeah...we need to set it so that traffic actually gets sent to the VPN computer.)​
There's a simple way to do this for Windows, and a Super Hard (but proer) way to do this for Linux. Don't be scared, I'll walk through everything necessary. 

The Simple Way (Windows 10 Built-In PPTP)

This is a topic in itself, and so I've moved this section to be a separate blog post. Click here to set up your own VPN server on Windows 10.

The Super Hard, Super Hacker Way (Linux + OpenVPN)

To be honest, the method of creating your own VPN Server using Linux isn't for the faint of heart. However, I've made it as simple as possible by giving only the necessary commands.

Want to make your own Linux VPN Server? Then go to this blog post. {Link to be added later.}

Conclusion

We looked over what a VPN is and how it works, as well as the benefits that come with using them. If you feel that there's some aspect of using a VPN that you'd like to have available to you, then you can create your own.

​I personally find it great to set them up at your own house (or at a relative's house), but if you want to set it up on a cloud service like Digital Ocean, then try to find a service you trust. 
To watch the video of me explaining this topic, please watch the following video:
Like this content and want more? Feel free to look around and find another blog post that interests you. You can also contact me through one of the various social media channels. 

Twitter: @srcmake
Discord: srcmake#3644
Youtube: srcmake
Twitch: www.twitch.tv/srcmake
​Github: srcmake

Comments are closed.

    Author

    Hi, I'm srcmake. I play video games and develop software. 

    Pro-tip: Click the "DIRECTORY" button in the menu to find a list of blog posts.
    Metamask tip button
    License: All code and instructions are provided under the MIT License.

    Discord

    Chat with me.


    Youtube

    Watch my videos.


    Twitter

    Get the latest news.


    Twitch

    See the me code live.


    Github

    My latest projects.

Powered by Create your own unique website with customizable templates.