Create a Secure Private Network with Tailscale
Job to be done: Create a secure, private network for devices and serve local applications securely
🇳🇬 Ways to use this in Nigeria
Ideas to get you started, adapt to your situation.
- Small business
As a salon owner, securely access your local booking system or inventory database from your phone while at home, checking appointments or stock levels.
- Student
As a student doing web development as a side hustle, securely share your local dev environment with a client for review without deploying it publicly.
- Entrepreneur
As a solo founder, securely access your local development server for a new SaaS product from your laptop at a co-working space or your phone while commuting.
What you’ll get
You will create a secure, private network for all your devices, allowing them to communicate with each other as if they were on the same local network, no matter where they are. This approach works by creating an encrypted ‘mesh’ network that simplifies connecting devices without needing to manage complex network settings like port forwarding.
Tools you need
- Tailscale (freemium): Used to create and manage your private network, connecting all your devices securely.
- 1Password (paid): Used for securely storing and managing your SSH keys and other sensitive information, which can be integrated with Tailscale for enhanced security.
Steps
-
Sign up for Tailscale: Go to the Tailscale website and sign up for an account. You can use your existing Google, Microsoft, or GitHub account to sign up quickly. You should see a dashboard where you can manage your devices and network.
-
Install Tailscale on your devices: Download and install the Tailscale client on each device you want to include in your private network (e.g., your laptop, phone, home server). After installation, log in with the account you used to sign up.
-
Connect your devices: Once logged in, each device will automatically join your private network, often referred to as a ‘tailnet’. Each device will be assigned a stable IP address (starting with 100.x.x.x) and a name. You should see all your connected devices listed in your Tailscale dashboard.
-
Enable Tailscale SSH (Optional, for enhanced security): If you want to SSH into your devices without managing SSH keys, you can enable Tailscale SSH. On a Linux or macOS device, open your terminal and run:
tailscale up --sshYou should see output indicating that Tailscale SSH is enabled. You can then SSH into your devices using their hostnames (e.g.,
ssh your-device-name). -
Serve local applications securely (Optional): To make a local application (like a web dashboard running on port 3000) accessible only within your private network, use the
tailscale servecommand. On the device running the application, open your terminal and run:tailscale serve 3000This will provide you with a secure HTTPS URL (e.g.,
notes.your-tailnet.ts.net) that only devices on your tailnet can access. The application will be served with a real TLS certificate.
Original source
This workflow is based on the insights shared by eschmechel in their blog post “Protect Yourself, Mesh Yourself” on DEV Community. The author explains how Tailscale can simplify network management and enhance security for personal and home lab environments.
Notes & variations
- Free tier viability: Tailscale’s free tier is very generous and sufficient for most individual users and small businesses, offering unlimited devices and bandwidth.
- Common mistake: Forgetting to install Tailscale on all the devices you want to connect. Ensure every device is running the Tailscale client and is logged in to your account.
- Tip for better results: Explore Tailscale’s access control lists (ACLs) to define fine-grained permissions for which devices can communicate with each other, further enhancing your network’s security.