Easy VPN Server/Client Setup Using Tailscale
Introduction
Tailscale is a wireguard-based VPN software (with a free tier which is more than enough for personal use) that allows you to connect your devices easily and with minimum codeing.
Installation and setup of Tailscale is extremely easy. You can install it on 10 devices with a free plan.
Installation
On Ubuntu run
It gives you a URL which you can use to login. It supports multiple login methods including Google and GitHub. After logging in, you are done!
On an Android or iOS device, you just need to download their app and install it and then log in. For a Windows machine, use this link to download the application:
Windows Installer Link
Set Up
The way Tialscale is set up, you don't have a server and client configuration. Each device you add can let other devices to connect to it.
You can view and configure your Tailscale on their portal.
Let's see how we can enable ssh connection on an Ubuntu machine. On the machine you want to connect to run:
If enerything goes according well, on the portal you will see an "ssh" logo added to the name of your Ubuntu machine.
Now, let's see how we can let other devices to connect to the internet through your Ubuntu machine (or any other device).
On the device you want to act as the access point, enter
This will add another logo with the text "Exit Node" to that device on the portal.
Click on the three-dot menu at the end of the machine's name and select "Edit Route Settings..."
Then, click on "Use as exit node".
Now, on other devices, you can choose the Ubuntu machine as your exit node (more on that later).
Local Network Access
To give your other devices access to the local network of your Ubuntu machine, you need to crate a subnet on your Ubuntu.
First, let's make sure port forwarding is enabled:
echo 'net.ipv6.conf.all.forwarding = 1' | sudo tee -a /etc/sysctl.d/99-tailscale.conf
sudo sysctl -p /etc/sysctl.d/99-tailscale.conf
Then, we advertise the ruote we want (this is the subnet of your local network).
To enable it, go to the portal and again use the same menu (Edit Route Settings ...) and now you should see the subnet route.
Starting Tailscale
To starting Tailscale on Ubuntu, simply run:
You then need to login using any of the services provided there.
To connect to another machine as your exit node (access internet through that machine), install tailscale on your current machine, and then run