PiVPN
The simplest way to set up and manage a VPN on your Raspberry Pi.
Setup:
Setup your Raspberry Pi with Raspberry Pi OS Lite using Raspberry Pi Imager.
For Raspberry Pi 3 use 32-bit and Raspberry Pi 4 use 64-bit OS.
Install:
curl -L https://install.pivpn.io | bash
pivpn -a
pivpn -qr
UFW:
sudp apt update
sudo apt install ufw
sudo ufw allow 22/tcp comment "SSH"
sudo ufw allow 51820/udp comment "PiVPN-1"
sudo ufw allow 51920/udp comment "PiVPN-2"
sudo ufw enable