Using Wireguard For The First Time
Could not find how to set up wireguard, or how things come together anywhere? Well, here it is. Or at least it tries to be.
This is a post in progress. Please check back later!
Wireguard is a powerful VPN solution. But setting it up for the first time can seem hard, given it works a little different than other solutions out there. And there’s little to none resources out there that explains it for the absolute begineer. (At least I could not find when I started out.) So, here’s a guide for the laymen. Hopefully after reading this, wireguard will be the easiest thing on earth. You’ll be able to
- Set up a wireguard server.
- Set up port forwarding rules, if you would like.
- Add clients (peers) to the server.
- Set up a client to connect to the sever, and internet.
Outline
This guide tries to provide some background knowledge about the related things. You can read it if you find it interesting. Otherwise, you can just skip over to this section.
Asymetrical Encryption
Most of the internet uses an encryption system called asymmetrical encryption, to make sure no one else other than the intended recepient receives the message. It is also known as a public-private key pair encryption.
Generally, when we talk about a lock, there’s only one key involved. You use that to lock the lock, then you use the same key to unlock the lock. But in asymmetrical system, we need two keys. To lock the lock, you need to use key A. But you cannot unlock the locked key using key A. To unlock it, you need a second key B.
Now, let’s say Alice wants to send a message to Bob. In our first case, the same key is used to lock and unlock the message. So Alice and Bob needs to have the same key to them, probably shared beforehand.
[Insert Image Here]
But this has a problem. Alice and Bob has to share the key securely beforehand. Also, let’s say a middle-man somehow works out the key, and now he has access to all later messages, until Alice and Bob make a new key.
This problem is solved by the asymmetrical key system.