If you’re on a MacBook, I’d recommend Algo as it’ll handle setting up a VPN for you in a matter of just a few minutes – pretty much hassle free.
If you’re not, or if you’d prefer to handle configuring the VPN on your own, there’s a guide here that details how to go about setting up StrongSwan (which is what Algo uses).
Algo will run on Linux and Windows, though my experience with it is limited to OS X / MacOS right now. They do provide instructions on how to set it up on the GitHub page though.
Once a VPN is setup, you’d simply firewall off Port 22 and only allow the static IP of your VPN to connect using:
ufw allow from VPN_IP to any port 22
VPN_IP is the IP address of your VPN. Just make sure you’re connected to the VPN when you try to connect :-).
For example, if our VPN IP was 22.214.171.124, we’d run:
ufw allow from 126.96.36.199 to any port 22
Keep in mind, if you disconnect from the VPN, you won’t be able to login. If you delete the Droplet that your VPN is on, you’ll lock yourself out.
A virtual private network, or VPN, allows you to securely encrypt traffic as it travels through untrusted networks, such as those at the coffee shop, a conference, or an airport. IKEv2, or Internet Key Exchange v2, is a...