Setting Up a VPN on a Raspberry Pi

So I had a problem with some websites and access to them with one country's local internet. It was not possible to use instagram or facebook without vpn. It seemed to be a pretty easy solution to use free vpn with best reviews, but it worked only for some small amount of time. All of those vpn services were blocked pretty fast and were not very reliable. Paid vpn services worked for some time, but had thiers limitations and also were blocked in short time. And Im speaking about 2022. So the best solution I came up with was creating my own vpn server, or rather renting it from google. It worked perfectly, so I used for myself and gave it some of my family members. It was not very expensive cause traffic was not huge.

In the next years my personal need to use vpn were nor relevant for me, but became much more relevant for my relatives cause less and less even paid vpn services were doing a good job. My Vpn worked pretty good though and the only downside was that it became pretty expensive. It was about 55 euros per month now, but using it was out of question even with this price. I've tried to optimise the cost, but with less expensive settings vpn became less reliable andthe expensive one still were needed.

Number of users was growing rapidly with price, until at some point I decided to have my own vpn server at home and just use my wifi for the internet access. As the server I decided to use raspberry pi. The reason was that I wanted to do something with this mini computer, I just never knew what exactly and in my thoughts about potential applications I came to the idea to use it as a server. Math was pretty simple: new PI costed around 110 euro, just around 55 euros, which was just 2 months of vpn server. Risks was that the system will never work and that my internet will not be enough, or even that system will never work. Anyway, I decided to risk and in couple of hours received my PI (it was literally the fastest delivery).

I approached configuration from the perspective that all user were using outline vpn application from my previous setup and I didn't want to change that to avoid complications. So everything should have been done only from my side (except probably keys). I used help from Notion AI to record all the steps and not miss anything in configuration.

Process of creating was very straightforward and the only thing that was time consuming to fix was that my internet provider dont give clients real ip addresses by default and I was forced to contact customer support so they give me real ip addresses accessible from the outside internet. I set up keys for family and everything started to work properly. As far as I understood there were no limits for abroad usage of my wifi and the only precautions i gave to users was not use any torrents of any sort. I also blocked access to most popular torrent websites for all users. The whole system worked for more then two months and all resources were accessible for users even when other services were failing.

Unfortunately in couple of months open vpn technology started failing cause this technology is now completely blocked. So, the only way to have a working wi-fi setup was to set up new vpn system using some new technology instead of openvpn. As a new system I chose amneia vpn installed directly on my raspberri pi. I still need to generate keys for every user separately (though I do it voluntary to be able to fix one key without changing others). So now instead of Outline VPN application users should install Amnezia VPN and have a new key installed.